Guest blacknightcomputers Posted March 9, 2006 Share Posted March 9, 2006 Hi all on the home page i would like to have 3 randum products in the same box on the left hand i have modded the store so i can have them on the left hand side i just need it to display the randum products, i can get it to display 3 products but they are all the same product i have modded the file randumprod.tpl and changed it to :- <!-- BEGIN: random_prod --> <div class="boxTitleRight">Featured Product</div> <div class="boxContentLeft" style="text-align: center"> <a href="index.php?act=viewProd&productId={PRODUCT_ID}" title="{PRODUCT_NAME}"><img src="{IMG_SRC}" alt="{PRODUCT_NAME}" border="0" title="{PRODUCT_NAME" /></a> <br /> <span class="txtCopy"><a href="index.php?act=viewProd&productId={PRODUCT_ID}" title="{PRODUCT_NAME}" class="txtDefault">{PRODUCT_NAME}</a></span> <br><br><div align="center"> <a href="index.php?act=viewProd&productId={PRODUCT_ID}" title="{PRODUCT_NAME}"><img src="{IMG_SRC}" alt="{PRODUCT_NAME}" border="0" title="{PRODUCT_NAME" /></a> <br /> <span class="txtCopy"><a href="index.php?act=viewProd&productId={PRODUCT_ID}" title="{PRODUCT_NAME}" class="txtDefault">{PRODUCT_NAME}</a></span> <br><br><div align="center"> <a href="index.php?act=viewProd&productId={PRODUCT_ID}" title="{PRODUCT_NAME}"><img src="{IMG_SRC}" alt="{PRODUCT_NAME}" border="0" title="{PRODUCT_NAME" /></a> <br /> <span class="txtCopy"><a href="index.php?act=viewProd&productId={PRODUCT_ID}" title="{PRODUCT_NAME}" class="txtDefault">{PRODUCT_NAME}</a></span> </div> </div> </div> <div class="boxFootLeft"> </div> <!-- END: random_prod --> the code above show the same 3 products in the same box how can i have the differant products in the same box ??? Quote Link to comment Share on other sites More sharing options...
markscarts Posted March 9, 2006 Share Posted March 9, 2006 1. In the index.inc.php in the root of your store, find the following code: include("includes/boxes/randomProd.inc.php"); $body->assign("RANDOM_PROD",$box_content); ADD AFTER this new code: include("includes/boxes/randomProd.inc.php"); $body->assign("RANDOM_PROD2",$box_content); include("includes/boxes/randomProd.inc.php"); $body->assign("RANDOM_PROD3",$box_content); 2. Get rid of your edited randomProd.tpl - replace it with the original version, then remove the divisions that create the box. Example from Legend skin: ORIGINAL: !-- BEGIN: random_prod --> <div class="boxTitleRight">{LANG_RANDOM_PRODUCT}</div> <div class="boxContentLeft" style="text-align: center"> <a href="index.php?act=viewProd&productId={PRODUCT_ID}" title="{PRODUCT_NAME}"><img src="{IMG_SRC}" alt="{PRODUCT_NAME}" border="0" title="{PRODUCT_NAME}" /></a> <br /> <span class="txtCopy"><a href="index.php?act=viewProd&productId={PRODUCT_ID}" title="{PRODUCT_NAME}" class="txtDefault">{PRODUCT_NAME}</a></span> </div> <!-- END: random_prod --> CHANGE TO: !-- BEGIN: random_prod --> <div style="text-align: center"> <a href="index.php?act=viewProd&productId={PRODUCT_ID}" title="{PRODUCT_NAME}"><img src="{IMG_SRC}" alt="{PRODUCT_NAME}" border="0" title="{PRODUCT_NAME}" /></a> <br /> <span class="txtCopy"><a href="index.php?act=viewProd&productId={PRODUCT_ID}" title="{PRODUCT_NAME}" class="txtDefault">{PRODUCT_NAME}</a></span> </div> <!-- END: random_prod --> 3. CREATE new box in global/index.tpl, and ADD random prod code in the new box. EXAMPLE: <div class="colLeft"> {CATEGORIES} <div class="boxTitleRight">Featured Products</div> <div class="boxContentLeft" style="text-align: center"> {RANDOM_PROD} {RANDOM_PROD2} {RANDOM_PROD3} </div> {INFORMATION} {CURRENCY} {LANGUAGE} </div> Quote Link to comment Share on other sites More sharing options...
Guest blacknightcomputers Posted March 9, 2006 Share Posted March 9, 2006 Cheers Mate .... worked a treat 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.