X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Display of Related products ? (https://forum.x-cart.com/showthread.php?t=18885)

Paul H 12-27-2005 06:06 AM

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}


balinor 12-27-2005 06:10 AM

http://forum.x-cart.com/viewtopic.php?t=14995

Paul H 12-27-2005 06:30 AM

Yep Works good !!

Any way of constraining the vertical size of the image ?

Thanks

balinor 12-27-2005 06:32 AM

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.

Paul H 12-27-2005 06:45 AM

Yep that worked great too now all my ducks are in a row ! :D


All times are GMT -8. The time now is 07:26 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.