| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
related products formatting | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hello,
I've been tweaking my product page significantly and after positioning the related products tpl where I wanted it and changing the {section} statement for the looping in order to display the items horizontally, I noticed that 3 related items fit nicely, but when there are 4, it stretches my template table. What I would like to do is have the a new row start after 3 items, but I'm having a little trouble. Here is the code for my related_products.tpl: {* $Id: related_products.tpl,v 1.10.2.1 2004/10/07 10:52:42 max Exp $ *} {if $product_links ne ""} {*capture name=menu*} <TABLE class="prdpage" cellspacing="0" align="left" cellpadding="0" bgcolor="ffffff" width="345"> <TR> {section name=cat_num loop=$product_links} <TD valign="top"> <table class="prdpage" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="one" width="100"><A href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}>{include file="modules/Upselling_Products/product_thumbnail.tpl" productid=$product_links[cat_num].productid image_x=100}</A></td> <td width="15"> </td> </tr> <tr> <td width="100"><A href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}>{ $product_links[cat_num].product}</A></td> <td width="15"> </td> </tr> </table> </TD>{/section} </TR> </TABLE> {*/capture*} {*include file="menu.tpl" menu_title=$lng.lbl_related_products menu_content=$smarty.capture.menu *} {/if} Here is a link showing the problem in action: http://thehomeloft.com/basket/product.php?productid=16230 Thanks!!
__________________
JW - Xcart Version: several dragged one cart's database kicking and screaming from 4.0.16 to 4.4.1. |
|||||||
#2
|
|||||||
|
|||||||
![]() I wonder if the key is in the section statement, or if there is and "if" statement that would begin a new row after 3 related items?
__________________
JW - Xcart Version: several dragged one cart's database kicking and screaming from 4.0.16 to 4.4.1. |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|