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)
-   -   3 Products per row in Upsell (https://forum.x-cart.com/showthread.php?t=1208)

HockeyGuy 01-17-2003 07:07 AM

3 Products per row in Upsell
 
Hi all,

I have been messing with this for a while, but just can't get it to look the way I want.

What I am trying to do is get 3 products in a row in the upsell area on product.tpl . Right now it is tiling vertically, which is kind of a waste of space.

http://216.147.62.107/xcart/customer/product.php?productid=16135&cat=&page=&PHPSESSID=7 4ecb2117feddb764e573049ed75b0a2

This is a link to one of my product pages, as you can see, the upsell products are showing up (with thumbnails), but I would like to have them tile horizontally, preferably with 3 in a row.

Does anybody have a way to do this???

I have tried using some of the code from Boomer's '2 products in a row on products.tpl' post, but I can't get it to work here.

Any help is appreciated.

funkydunk 01-17-2003 08:07 AM

Try having a look at http://forum.x-cart.com/viewtopic.php?t=287 This is based on two products per row but should be relatively easy to adapt.

funkydunk 01-19-2003 05:51 AM

Try this:

Code:

{* $Id: related_products.tpl,v 1.6 2002/05/20 06:55:24 lucky Exp $ *}
{if $product_links ne ""}
{capture name=dialog}
<table border=0 cellspacing=5>

{section name=cat_num loop=$product_links}

{if $smarty.section.cat_num.index is div by 3}
<tr valign="top">
{/if}

<td>#{$product_links[cat_num].productid}</td>
<td>
<a href="product.php?productid={ $product_links[cat_num].productid }">
<font class=TableCenterSubCategoryListTitleBlue>{ $product_links[cat_num].product|escape}</font>
</a>
</td>

{/section}
</tr>
</table>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.dialog extra="width=100%"}
{/if}


HockeyGuy 01-20-2003 10:28 AM

That did the trick!!

I tried something similar before posting this thread, but it never quite worked (I must have been missing something small in there).

Thanks for your help!!! Your solution was funky good.


All times are GMT -8. The time now is 08:56 PM.

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