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)

shishapipe 04-27-2007 08:21 AM

Re: Pictures in recommends.tpl for 3 column format
 
hi i wish i could hel;p others like your goodselves

just to say a big thank you for pips helping out here

alru111 04-29-2007 11:30 AM

Re: Pictures in recommends.tpl for 3 column format
 
I think somebody asked already about displaying price in recommended products. I tried to simply add SQL statement to pull price but it keeps giving me an sql error. Don't know what I am doing wrong. Did anyone figured it out?

simonc101 05-10-2007 03:07 AM

Re: Pictures in recommends.tpl for 3 column format
 
I have installed this mod on 4.1.7 and seems to sometimes work but most of the time the dialog box empty can anyone help me get this one working correctly? here is the code I put in related_product.tpl is there any other I need to add else?


{* $Id: recommends.tpl,v 1.9 2006/03/21 07:17:18 svowl Exp $ *}
{if $recommends}
{capture name=recommends}

{assign var="tmp" value="0"}

{section name=num loop=$product_links}
{if $$product_links[num].productid}{assign var="tmp" value="1"}{/if}
{/section}

{section name=num loop=$product_links}

{ if %num.first% }
<table border=0 cellspacing=5 width=100%>
{/if}

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

<td width="250" align="center">

{include file="product_thumbnail.tpl" productid=$product_links[num].productid image_x=100 product=$product_links[num].product tmbn_url=$product_links[num].tmbn_url}
<a href="product.php?productid={ $product_links[num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}>

<BR>

<span class="ProductTitle">{ $product_links[num].product|escape}</span><br>

</a></td>
{ if %num.last% }
</tr></table>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.recommends extra='width="100%"'}
{else}
{capture name=dialog}
No related products.
{/capture}
{include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.recommends extra='width="100%"'}
{/if}

HWT 05-28-2007 06:17 AM

Re: Pictures in recommends.tpl for 3 column format
 
Here's a copy/paste that is working in 4.1.7

Code:

{* $Id: related_products.tpl,v 1.15 2005/12/07 14:07:32 max Exp $ *}
{if $product_links ne ""}
{capture name=dialog}
{section name=cat_num loop=$product_links}
{ if %cat_num.first% }<table>{/if}
  {if $smarty.section.cat_num.index is div by 3}    </tr><tr valign="top">{/if}
 
<td align=center>
 <a href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Upselling_Products.upselling_new_window eq 'Y'} target="_blank"{/if} class="ItemsList">{include file="product_thumbnail.tpl" productid=$product_links[cat_num].productid image_x=75 product=$product_links.product}<br />
 {$product_links[cat_num].product}</a></li>
</td>
{ if %cat_num.last% }
</tr></table>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.dialog extra='width="100%"'}
{/if}


JWait 07-18-2007 02:27 PM

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

Originally Posted by Warwick
Sorry if this has been covered already but is it possible to just show related products from the same category of the page it is on?


That would be great, but I haven't seen it done.

JWait 07-18-2007 02:31 PM

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

Originally Posted by simonc101
I have installed this mod on 4.1.7 and seems to sometimes work but most of the time the dialog box empty can anyone help me get this one working correctly? here is the code I put in related_product.tpl is there any other I need to add else?


Um... this mod is for Recommended Products. It looks like you are confusing it with Related products (also known as Upselling Products. They are two different Modules.

Pilnik 08-05-2007 08:16 PM

Re: Pictures in recommends.tpl for 3 column format
 
Did somebody succeed to display prices of recommended products under their thumbnail?
In terms of usability is absolutely necessary, as nobody will be clicking images to check prices.

DreamCatcher 08-12-2007 10:33 AM

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

Originally Posted by HWT
Here's a copy/paste that is working in 4.1.7

Code:

{* $Id: related_products.tpl,v 1.15 2005/12/07 14:07:32 max Exp $ *}
{if $product_links ne ""}
{capture name=dialog}
{section name=cat_num loop=$product_links}
{ if %cat_num.first% }<table>{/if}
  {if $smarty.section.cat_num.index is div by 3}    </tr><tr valign="top">{/if}
 
<td align=center>
 <a href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Upselling_Products.upselling_new_window eq 'Y'} target="_blank"{/if} class="ItemsList">{include file="product_thumbnail.tpl" productid=$product_links[cat_num].productid image_x=75 product=$product_links.product}<br />
 {$product_links[cat_num].product}</a></li>
</td>
{ if %cat_num.last% }
</tr></table>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.dialog extra='width="100%"'}
{/if}



Awesome! Thank you and it is working in 4.1.8 as well but I noticed it is missing the correct alt tags for the images.

moniquelynn 08-17-2007 06:01 PM

Re: Pictures in recommends.tpl for 3 column format
 
Thanks from a newbie. I've leaned two fanastic things from this thread:

1. I now have pics in my recommends! :D

2. Read threads from back to front to get the latest mod code. hehehe

adriant 10-22-2007 09:38 AM

Re: Pictures in recommends.tpl for 3 column format
 
This was getting all a bit complicated for me. I just wanted 3 in a row with thums and prices.

Being a newbie I gleaned a lot from this previous messages and decided, bravely to have a go myself.

Here's what I did to recommends.tpl

{* $Id: recommends.tpl,v 1.9 2006/03/21 07:17:18 svowl Exp $ *}
{if $recommends}
{capture name=recommends}
<table border=0 width=100%>
<tr>

{section name=num loop=3}
<td width=33% align=center valign=top>
<a href="product.php?productid={$recommends[num].productid}" class="ItemsList">{$recommends[num].product}</a></font>
<br>
<a href="product.php?productid={$recommends[num].productid}">{include file="product_thumbnail.tpl" productid=$recommends[num].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url}</a>
<br>
<font class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$recommends[num].taxed_price}</font><font class="MarketPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price}</font>
</td>
{/section}

</tr>
</table>

{/capture}
{include file="dialog.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends extra='width="100%"'}
{/if}

It works for me.

All the best
Ade


All times are GMT -8. The time now is 07:18 AM.

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