X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Pictures in recommends.tpl for 3 column format (https://forum.x-cart.com/showthread.php?t=7506)

modibaba 10-20-2008 10:17 AM

Re: Pictures in recommends.tpl for 3 column format
 
Any idea on how can I make the number of recomended products to be 9, or 12 so i fill in the gaps, thanks

fafbr 11-05-2008 04:47 PM

Re: Pictures in recommends.tpl for 3 column format
 
Thank you MoonDog

I am gratefull for the code on post #62
It works fine in 4.1.11 version

cbostard 11-30-2008 02:37 PM

Re: Pictures in recommends.tpl for 3 column format
 
Thanks everyone & MoonDog Im using ver. 4.1.11 with telafirma dynamic image gen, and appears and works great, but can you tell me how or why I have 2 recommened products list the top or 1st one shows images,name,price and the 2nd one below on page is just the original generic list. would be great to just have the second list deleted.

this is the code i have in modules/upsell_products/related_products.tpl
Quote:

{* $Id: related_products.tpl,v 1.15 2005/12/07 14:07:32 max Exp $ *}
{if $recommends}
{capture name=recommends}
{assign var="tmp" value="0"}
{section name=num loop=$recommends}
{if $recommends[num].productid}{assign var="tmp" value="1"}{/if}
{/section}
{section name=num loop=$recommends}
{if %num.first%}
<table border=0 width="100%">
<tr>
{/if}
{if $smarty.section.num.index is div by 3}
</tr><tr valign="top">
{/if}
<td width=33% align=center valign=top class="PListCell";>
<a href="product.php?productid={$recommends[num].productid}" class="ItemsList">{$recommends[num].product}</a>
<br />
<a href="product.php?productid={$recommends[num].productid}">{include file="product_thumbnail.tpl" productid=$recommends[num].productid image_x=$config.Appearance.thumbnail_width tmbn_url=$recommends[num].tmbn_url}</a>
<br />
<font class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$recommends[num].taxed_price}</font>
</td>
{if %num.last%}
</tr></table>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends extra='width="100%"'}
{else}
{capture name=dialog}
No recommends with this product.
{/capture}
{/if}


modibaba 12-01-2008 12:27 AM

Re: Pictures in recommends.tpl for 3 column format
 
hi cbostard

where did u get the dynamic image generator from please?, and if it is free can u send me a copy please?

thanks

Sherif Nassar 01-20-2009 07:15 AM

Re: Pictures in recommends.tpl for 3 column format
 
Hi,

Anyone has an idea how to implement it in v 4.2?
Thanks

Yurij 01-29-2009 02:19 AM

Re: Pictures in recommends.tpl for 3 column format
 
Quote:

Originally Posted by Sherif Nassar
Hi,

Anyone has an idea how to implement it in v 4.2?
Thanks


Try to use this modification for file "skin1\modules\Recommended_Products\recommends.tpl " but first - backup original file.

seaCOAST 03-08-2009 04:24 PM

Re: Pictures in recommends.tpl for 3 column format
 
Works like a charm in 4.2.

The only error I found was the reference to dialog.tpl near the end...should be customer/dialog.tpl

mrerotic 03-10-2009 07:58 PM

Re: Pictures in recommends.tpl for 3 column format
 
How did you get this to work in 4.2, when some of the classes in the css are not defined. Also if you did get it working, what example did you use? I would like to have 3 products seperated equally show up in the "recommended products" area.

Thanks In Advance.

seaCOAST 03-11-2009 12:17 AM

Re: Pictures in recommends.tpl for 3 column format
 
Quote:

Originally Posted by mrerotic
How did you get this to work in 4.2, when some of the classes in the css are not defined. Also if you did get it working, what example did you use? I would like to have 3 products seperated equally show up in the "recommended products" area.

Thanks In Advance.


This is the code exactly how I have it running.

Code:

{* $Id: related_products.tpl,v 1.15 2005/12/07 14:07:32 max Exp $ *}
{if $recommends}
{capture name=recommends}
{assign var="tmp" value="0"}
{section name=num loop=$recommends}
{if $recommends[num].productid}{assign var="tmp" value="1"}{/if}
{/section}
{section name=num loop=$recommends}
{if %num.first%}
<table border=0 width="100%">
<tr>
{/if}
{if $smarty.section.num.index is div by 3}
</tr><tr valign="top">
{/if}
<td width=33% align=center valign=top class="PListCell";>
<a href="product.php?productid={$recommends[num].productid}" class="ItemsList">{$recommends[num].product}</a>
<br />
<a href="product.php?productid={$recommends[num].productid}">{include file="product_thumbnail.tpl" productid=$recommends[num].productid image_x=$config.Appearance.thumbnail_width tmbn_url=$recommends[num].tmbn_url}</a>
<br />
<font class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$recommends[num].taxed_price}</font>
</td>
{if %num.last%}
</tr></table>
{/if}
{/section}
{/capture}
{include file="customer/dialog.tpl" title=$lng.txt_recommends_comment content=$smarty.capture.recommends extra='width="100%"'}
{else}
{capture name=dialog}
No recommends with this product.
{/capture}
{/if}


LoveHurts 03-16-2009 07:18 AM

Re: Pictures in recommends.tpl for 3 column format
 
Thanks for coding.
For recommended products :
how do i exclude products that are not in stock??

thx in advance.


All times are GMT -8. The time now is 02:09 AM.

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