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

Display of Related products ?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-27-2005, 06:06 AM
 
Paul H Paul H is offline
 

eXpert
  
Join Date: Sep 2005
Posts: 246
 

Default Display of Related products ?

I managed to get my related products to show with a thumbnail and eventually got them to resize to 150 but now i need to know how to display them in 2 colum format.

Here's my code so far

Code:
{* $Id: related_products.tpl,v 1.10.2.1 2004/10/07 10:52:42 max Exp $ *} {if $product_links ne ""} {capture name=dialog} <TABLE border="0" cellspacing="0" height="278" width="264" cellpadding="0" bordercolor="#333333"> {section name=cat_num loop=$product_links} <TR class="ItemsList"> <TD width="41%"><A href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}>{include file="product_thumbnail.tpl" productid=$product_links[cat_num].productid image_x=150}</A></TD> </TR> <TR class="ItemsList"> <TD><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> </TR> <TR class="ItemsList"> <TD></TD> </TR> {/section} </TABLE> {/capture} {include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.dialog extra="width=100%"} {/if}
__________________
Xcart Gold 4.1.11-Gone
= 4.7.11-Live
Reply With Quote
  #2  
Old 12-27-2005, 06:10 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

http://forum.x-cart.com/viewtopic.php?t=14995
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 12-27-2005, 06:30 AM
 
Paul H Paul H is offline
 

eXpert
  
Join Date: Sep 2005
Posts: 246
 

Default

Yep Works good !!

Any way of constraining the vertical size of the image ?

Thanks
__________________
Xcart Gold 4.1.11-Gone
= 4.7.11-Live
Reply With Quote
  #4  
Old 12-27-2005, 06:32 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

You need to constrain one or the other. If you constrain the y, x will vary. If you want to constrain y, just replace this:

image_x=150

with this:

image_y=150

Replace 150 with whatever size you want to set the y dimension.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 12-27-2005, 06:45 AM
 
Paul H Paul H is offline
 

eXpert
  
Join Date: Sep 2005
Posts: 246
 

Default

Yep that worked great too now all my ducks are in a row !
__________________
Xcart Gold 4.1.11-Gone
= 4.7.11-Live
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 11:22 AM.

   

 
X-Cart forums © 2001-2020