Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

related products formatting

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-10-2007, 04:02 PM
 
jwilkers jwilkers is offline
 

Advanced Member
  
Join Date: Oct 2005
Posts: 93
 

Default related products formatting

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">&nbsp;</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">&nbsp;</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.
Reply With Quote
  #2  
Old 10-11-2007, 09:36 AM
 
jwilkers jwilkers is offline
 

Advanced Member
  
Join Date: Oct 2005
Posts: 93
 

Default Re: related products formatting

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.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:44 AM.

   

 
X-Cart forums © 2001-2020