Guest sunshine Posted October 9, 2005 Share Posted October 9, 2005 Hi Everyone, Need help please. The template has 3 columns; left for nav, language, etc. The middle is the main content. Now, for the right being the 3rd column, I would like to have 3 or 4 boxes that will provide random images of items that come from a particular category(department) identified in the nav bar. The customer, if interested in seeing this can click the pic and will be taken straight to the product. Just like the 'Random Product' we now show on the main page but for specific categories. I'm taking a wild guess and saying I would be just do a 'save as' for the boxes/random_prods but config wise I don't know. Quote Link to comment Share on other sites More sharing options...
Guest sunshine Posted October 9, 2005 Share Posted October 9, 2005 I tried just adding 3 random products to the right column. Every product that came up was the same. I'd like the products to be different in each box. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 9, 2005 Share Posted October 9, 2005 copy/paste the code you're using to put the 3 products up there and I'll see if I can point you in the right direction to get 3 unique products. Quote Link to comment Share on other sites More sharing options...
Guest sunshine Posted October 9, 2005 Share Posted October 9, 2005 Hi Sir William , Here's my 'code' and it wasn't very creative as you can see <div class="colRight"> {SHOPPING_CART} {RANDOM_PROD} {RANDOM_PROD} {RANDOM_PROD} </div> I simply input 'Random Prod' 3 times. The action above is due to having gone blank without my vitamins in narly a week. I went through the English Language folder to see if I could find anything specific related to the nav categories, as the intended idea was to do a 'save as' on the random product tpl and adjust it for the nav (departments). Quote Link to comment Share on other sites More sharing options...
Guest Posted October 9, 2005 Share Posted October 9, 2005 Ok, I can't test this (I don't have enough products in my store to be effective), but it *should* work just fine. In your template, do this: <div class="colRight"> {SHOPPING_CART} {RANDOM_PROD} {RANDOM_PROD2} {RANDOM_PROD3} </div> Then in /index.php, add a call for RANDOM_PROD2 & 3 as such: include("includes/boxes/randomProd.inc.php"); $body->assign("RANDOM_PROD",$box_content); include("includes/boxes/randomProd.inc.php"); $body->assign("RANDOM_PROD2",$box_content); include("includes/boxes/randomProd.inc.php"); $body->assign("RANDOM_PROD3",$box_content); What that should do is call the randomProd.inc.php file for each requested random product. It will choose a different product each time it's called. Now there is the chance that two instances will choose the same product, but it is reasonably unlikely. If you'd like a guaratee of three different random products, I'd have to rewrite some stuff....which I'm not willing to jump into as a freebie. :w00t: Quote Link to comment Share on other sites More sharing options...
Guest sunshine Posted October 9, 2005 Share Posted October 9, 2005 Thank you Sir William, I'm going to try that in a little while and post back with results. I do have a mod request for you Need to get a sample and I'll email you today with the info then you can give me price. Quote Link to comment Share on other sites More sharing options...
Guest sunshine Posted October 9, 2005 Share Posted October 9, 2005 Sir William It worked! Just have to change the words 'Featured Products' BTW emailed you a little while ago. Quote Link to comment Share on other sites More sharing options...
markscarts Posted October 10, 2005 Share Posted October 10, 2005 A very good and simple solution. By tweaking a few other files, you can display a group of randoms in the center column! Sounds like grounds for a new free tutorial in the minor mods section @ Sir William, what'd really be cool would be to have a row of three, and a script that says when and if the three all displayed the same image simultaneously, a large JACKPOT sign will flash :) Quote Link to comment Share on other sites More sharing options...
Guest Posted October 10, 2005 Share Posted October 10, 2005 Ok Mark, put away the laptop and get some sleep. The meds have caught up with you now. :( Quote Link to comment Share on other sites More sharing options...
Guest sunshine Posted October 10, 2005 Share Posted October 10, 2005 I slept like a baby last night, all night @ Didn't ya already know about Marks flash fetish @Markscarts Good idea for tutorials. Maybe you can add in how to move the shopping cart to the top header area where search is now. This way we can get rid of the third row altogether and being that the left nav isn't good for the little search' 'bots. Quote Link to comment Share on other sites More sharing options...
Guest idara Posted December 24, 2005 Share Posted December 24, 2005 Ok, I can't test this (I don't have enough products in my store to be effective), but it *should* work just fine. In your template, do this: <div class="colRight"> {SHOPPING_CART} {RANDOM_PROD} {RANDOM_PROD2} {RANDOM_PROD3} </div> Then in /index.php, add a call for RANDOM_PROD2 & 3 as such: include("includes/boxes/randomProd.inc.php"); $body->assign("RANDOM_PROD",$box_content); include("includes/boxes/randomProd.inc.php"); $body->assign("RANDOM_PROD2",$box_content); include("includes/boxes/randomProd.inc.php"); $body->assign("RANDOM_PROD3",$box_content); What that should do is call the randomProd.inc.php file for each requested random product. It will choose a different product each time it's called. Now there is the chance that two instances will choose the same product, but it is reasonably unlikely. If you'd like a guaratee of three different random products, I'd have to rewrite some stuff....which I'm not willing to jump into as a freebie. Hi Sir I want 3 random products too. Can't understand which files to be modified, please write the file names tobe modified I am using CC v 3.0.6 with killer skin Regards Yunus Quote Link to comment Share on other sites More sharing options...
markscarts Posted December 24, 2005 Share Posted December 24, 2005 Yunus, the "template" Sir Will writes of is skins/. . ./styleTemplates/global/index.tpl That is where you would add {RANDOM_PROD2} and {RANDOM_PROD3} (random_prod should already be there somewhere). The other change is to index.php which lies at the root of your store :dizzy: Quote Link to comment Share on other sites More sharing options...
Guest idara Posted December 24, 2005 Share Posted December 24, 2005 Thanks Markscarts, will give it a try Yunus Quote Link to comment Share on other sites More sharing options...
Guest ardwyn Posted January 6, 2006 Share Posted January 6, 2006 A big thank you once again Sir William and also to you Mark for the directions of the files. (I'm thinking of writing a script that says "Thank You Sir William" to make it easier for me. I modded this on my site and also took the words "Featured Product" out and it does the job very well. If You'd like to take a look Here. Quote Link to comment Share on other sites More sharing options...
markscarts Posted January 6, 2006 Share Posted January 6, 2006 Very, very cool, ardwyn. I took that principle yesterday, and came up with this design showing three randoms. The top pic would look best if your main product pix are at least 300 px wide. Some of these sample item pics are very small and get stretched with this design, but you can get the idea I hope: http://allservico.com/skinTest/ Quote Link to comment Share on other sites More sharing options...
Guest ardwyn Posted January 7, 2006 Share Posted January 7, 2006 See what you mean about the stretch but the site looks clean, nicely cut, and very smooth. Well done Mark Quote Link to comment Share on other sites More sharing options...
Guest aikdo Posted January 7, 2006 Share Posted January 7, 2006 Heads up in 800x600 mark the site doesn't fit when it comes to most of the pages with that design... and on the homepage the latest products are all in 1 column... Looks great but think would only work in a 2 column design... Quote Link to comment Share on other sites More sharing options...
markscarts Posted January 7, 2006 Share Posted January 7, 2006 Good point about the two-column design. This is just an experiment, I'm not using it anywhere yet. Thanks for the heads up, m8 :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.