Re: 3 column layout with thumbnail for Related Products
To add the price (including VAT) I used this to replace /modules/Upselling_Products/related_products.tpl:
{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%">
{/if}
{if $smarty.section.cat_num.index is div by 3}
</tr><tr>
<tr>
<td><img src="{$ImagesDir}/spacer.gif" width="400" height="10"></td>
</tr>
<tr valign="top">
{/if}
<td width="33%" align="center">
<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 tmbn_url=$product_links[cat_num].tmbn_url}</a>
<br>
<a 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="ProductPrice">{include file="currency.tpl" value=$product_links[cat_num].taxed_price}</font>
{if $product.taxes}<font class="ProductPriceVat">
{include file="customer/main/taxed_price.tpl"
taxes=$product.taxes}</font>
{/if}
</td>
{ if %cat_num.last% }
</tr></table>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" title="Recommended products" content=$smarty.capture.dialog extra="width=100%"}
{/if}
I had to add:
<a style="text-decoration: none;"
to the <A HREF> tag for the image, because the original code enclosed both the image and the product name in the same tag, and with my CSS A:hover is set to 'text-decoration: underline;', so the image showed an underline whenever you moused over it, which looked odd.
My CSS for the selectors I used above is:
.ProductPrice {
COLOR: #bc0000;
FONT-WEIGHT: bold;
FONT-SIZE: 16px;
FONT-FAMILY: Arial, Verdana, Helvetica, Sans-serif;
}
.ProductPriceVat {
COLOR: #bc0000;
FONT-WEIGHT: bold;
FONT-SIZE: 11px;
FONT-FAMILY: Arial, Verdana, Helvetica, Sans-serif;
}
__________________
X-Cart Gold Version 4.3.2
|