Guest Steve Wilson Posted July 3, 2006 Share Posted July 3, 2006 Hi I'm nearly there with my first cube cart. What a great product and the help here has been first class. Now I've got all my products in I'm showing them on the homepage in Latest Products but I can't get them to line up correctly. I haven't touched any code this is how they look by default. Is there anyway of them all having the same space so they line up 'hor' and 'vert'? My images are different sizes is this causing this issue? Steve Quote Link to comment Share on other sites More sharing options...
Guest valencia Posted July 3, 2006 Share Posted July 3, 2006 This was covered in a topic at http://www.cubecart.com/site/forums/index....topic=15347&hl= It requires editing one of your files or getting a simple mod and it shows your products in individual boxes. My latest products are enclosed in their own box and it makes it much neater in my estimation. There is a second post on simply realigning your boxes with the codes provided, see http://www.cubecart.com/site/forums/index....showtopic=10101 Have Fun :unsure: Quote Link to comment Share on other sites More sharing options...
roban Posted July 3, 2006 Share Posted July 3, 2006 In the includes/content/index.inc.php find this line: CODE for($i=0;$i<count($latestProducts);$i++){ Replace with this code CODE $across=4; $index->assign("TW",100/$across); for($i=0;$i<count($latestProducts);$i++){ if (!(($i+1) % $across)) { $index->assign("TXT_TR","</tr><tr>"); } else { $index->assign("TXT_TR",""); } in skins/{insert skin name}/styleTemplates/content/index.tpl replace all code between CODE <!-- BEGIN: repeat_prods --> and CODE <!-- END: repeat_prods --> including those two lines above with this code CODE <table width="100%" border="0"><tr> <!-- BEGIN: repeat_prods --> <td width="{TW}%"> <div style="float: center; text-align: center;"> <a href="index.php?act=viewProd&productId={VAL_PRODUCT_ID}"><img src="{VAL_IMG_SRC}" alt="{VAL_PRODUCT_NAME}" border="0" /></a> <br /> <a href="index.php?act=viewProd&productId={VAL_PRODUCT_ID}" class="txtDefault">{VAL_PRODUCT_NAME}</a> <br /> {TXT_PRICE} <span class="txtSale">{TXT_SALE_PRICE}</span> </div> </td> {TXT_TR} <!-- END: repeat_prods --> </tr></table> The $across variable is used to specify number products across. Quote Link to comment Share on other sites More sharing options...
Guest Steve Wilson Posted July 3, 2006 Share Posted July 3, 2006 Thanks Roban and Valencia for your help. I'll get on to it straight away. All the best Steve PS: Tried your code Roban and it's spot on. I believe that's twice in two days you've helped me out. I owe you one. Thanks. 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.