Quote:
Originally Posted by ach21
I know this isn't part of the mod but I was wondering if anyone was able to display thumnails in the related products section (upselling).
I am using the 3column mod from the following post:
http://forum.x-cart.com/showpost.php?p=178759&postcount=36
but the thumbnails won't show and was wondering if anyone knows how to make them appear.
Code:
{* $Id: related_products.tpl,v 1.15 2005/12/07 14:07:32 max Exp $ *}
{if $product_links ne ""}
{capture name=dialog}
{assign var="tmp" value="0"}
{section name=cat_num loop=$product_links}
{if $product_links[cat_num].productid}{assign var="tmp" value="1"}{/if}
{/section}
{section name=cat_num loop=$product_links}
{ if %cat_num.first% }
<table border="0" cellspacing="0" width="100%">
<tr>
{/if}
{if $smarty.section.cat_num.index is div by 3}
</tr><tr>
{/if}
<td align="center">
<div class="relatedsidebox">
<div class="relatedboxhead"><p>
</p></div>
<div class="relatedboxbody">
<a style="text-decoration: none;" 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=$config.Appearance.thumbnail_width product=$product_links[cat_num].product type="T"}</a>
<br>
<a style="color: #FFFFFF" href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}>
<b>{ $product_links[cat_num].product}</b>
</a>
<br>
<font class="ProductPriceRelated">{include file="currency.tpl" value=$product_links[cat_num].taxed_price}</font>
{if $product.taxes}<font class="ProductPriceVatRelated">
{include file="customer/main/taxed_price.tpl"
taxes=$product.taxes}</font>
{/if}
</div>
</div>
</td>
{ if %cat_num.last% }
</tr></table>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" title="Related products" content=$smarty.capture.dialog extra="width=100%"}
{/if}
|
Yeah i got them to display after hours and hours of work =)
This should work, but this comes from 4.018 and on a highly modified theme so it may differ some. alt=$recommends needs to be set.
{if $recommends}
{capture name=recommends}
{section name=num loop=$recommends}
<a href="product.php?productid={$recommends[num].productid}">{include file="product_thumbnail.tpl" productid=$recommends[num].productid alt=$recommends[num].product image_x=75 tmbn_url=$recommends[num].tmbn_url}</a><br/>
<strong><a href="product.php?productid={$recommends[num].productid}">{$recommends[num].product}</a></strong><br />
<br style="clear:both;">
{/section}
{/capture}
{include file="dialog_clean.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends}
{/if}