Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Pictures in recommends.tpl for 3 column format

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #51  
Old 04-27-2007, 08:21 AM
  shishapipe's Avatar 
shishapipe shishapipe is offline
 

Advanced Member
  
Join Date: Dec 2004
Location: London
Posts: 47
 

Default 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
__________________
Regards Maxking

SERVER: Microsoft-IIS/5.0
MYSQL Server: 4.0.18-NT
PERL: 5.006001
PHP: 4.3.6
X-CART pro: 4.3
X-AOM: 4..3
X-RMA: 4..3X-FancyCategories 4.3
Skin: Own Design
Marketing Manager Professional 3.0 Bundle
Reply With Quote
  #52  
Old 04-29-2007, 11:30 AM
 
alru111 alru111 is offline
 

eXpert
  
Join Date: Dec 2005
Posts: 244
 

Default 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?
__________________
X-Cart version 4.0.19
Reply With Quote
  #53  
Old 05-10-2007, 03:07 AM
 
simonc101 simonc101 is offline
 

Newbie
  
Join Date: May 2007
Posts: 6
 

Default 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}
__________________
Xcart 4.1.17
Reply With Quote
  #54  
Old 05-28-2007, 06:17 AM
  HWT's Avatar 
HWT HWT is offline
 

eXpert
  
Join Date: Jan 2005
Location: Massachusetts, USA
Posts: 392
 

Default 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}
__________________
x-cart 4.0.13 and 4.1.7 and 4.1.10
Reply With Quote
  #55  
Old 07-18-2007, 02:27 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default 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.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #56  
Old 07-18-2007, 02:31 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default 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.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #57  
Old 08-05-2007, 08:16 PM
 
Pilnik Pilnik is offline
 

Member
  
Join Date: Jul 2007
Posts: 18
 

Default 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.
__________________
X-Cart 4.1.8

africanartstall.com - an online store for african art
Reply With Quote
  #58  
Old 08-12-2007, 10:33 AM
  DreamCatcher's Avatar 
DreamCatcher DreamCatcher is offline
 

Senior Member
  
Join Date: Mar 2004
Posts: 178
 

Default 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.
__________________
X-Cart 4.7.8 Pro
php 7.x
Reply With Quote
  #59  
Old 08-17-2007, 06:01 PM
 
moniquelynn moniquelynn is offline
 

Member
  
Join Date: Jun 2007
Posts: 12
 

Default 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!

2. Read threads from back to front to get the latest mod code. hehehe
__________________
X-Cart Gold 4.2.3
Reply With Quote
  #60  
Old 10-22-2007, 09:38 AM
 
adriant adriant is offline
 

Senior Member
  
Join Date: May 2006
Posts: 190
 

Default 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
__________________
Xcart gold Plus V4.7.12
REBoot(REdux)

https://www.serpro.co.uk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

   

 
X-Cart forums © 2001-2020