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

Thumbnails in related_products.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-24-2009, 03:37 PM
 
jholley jholley is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 66
 

Default Thumbnails in related_products.tpl

I did several searches and found a lot of mods that add the thumbnail and short description to the related_products.tpl, but can't get any of them to work on 4.2.

Anybody have a good way of doing this?
__________________
Joe Holley
4.2
Reply With Quote
  #2  
Old 03-27-2009, 12:10 PM
 
jholley jholley is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 66
 

Default Re: Thumbnails in related_products.tpl

Looks like no one else has worked this one out yet either.
__________________
Joe Holley
4.2
Reply With Quote
  #3  
Old 03-30-2009, 09:25 PM
 
Dowhatchalike Dowhatchalike is offline
 

Advanced Member
  
Join Date: May 2004
Posts: 84
 

Default Re: Thumbnails in related_products.tpl

I have been playing with this some, and I got the thumbnails to show, just have to work on having them display horizontally. I am borrowing some code and made a few changes from skin1/modules/Bestsellers/menu_bestseller.tpl .

In the file /skin1/modules/Upselling_Products/related_products.tpl

replace:

<a href="product.php?productid={$p.productid}"{if $config.Upselling_Products.upselling_new_window eq 'Y'} target="_blank"{/if}>{$p.product|amp}</a>

with:

<a href="product.php?productid={$p.productid}&cat={$c at}&&bestseller=Y">{include file="product_thumbnail.tpl" productid=$p.productid product=$bestseller.product tmbn_url=$bestseller.tmbn_url}</a>

it's a start...
__________________
X-cart Version 4.2.2
Reply With Quote
  #4  
Old 03-30-2009, 09:50 PM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Thumbnails in related_products.tpl

Quote:
Originally Posted by Dowhatchalike
I have been playing with this some, and I got the thumbnails to show, just have to work on having them display horizontally. I am borrowing some code and made a few changes from skin1/modules/Bestsellers/menu_bestseller.tpl .

In the file /skin1/modules/Upselling_Products/related_products.tpl

replace:

<a href="product.php?productid={$p.productid}"{if $config.Upselling_Products.upselling_new_window eq 'Y'} target="_blank"{/if}>{$p.product|amp}</a>

with:

<a href="product.php?productid={$p.productid}&cat={$c at}&&bestseller=Y">{include file="product_thumbnail.tpl" productid=$p.productid product=$bestseller.product tmbn_url=$bestseller.tmbn_url}</a>

it's a start...

Go to http://forum.x-cart.com/showthread.php?t=10773&page=3 where Balinor has done for ver 4.0.18.
__________________
4.6.1 Platinum


Reply With Quote
  #5  
Old 03-31-2009, 03:02 AM
 
jholley jholley is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 66
 

Default Re: Thumbnails in related_products.tpl

Quote:
Originally Posted by Learner
Go to http://forum.x-cart.com/showthread.php?t=10773&page=3 where Balinor has done for ver 4.0.18.

I've already looked at the one. It doesn't work on 4.2.
__________________
Joe Holley
4.2
Reply With Quote
  #6  
Old 04-28-2009, 01:04 PM
 
Dowhatchalike Dowhatchalike is offline
 

Advanced Member
  
Join Date: May 2004
Posts: 84
 

Default Re: Thumbnails in related_products.tpl

/bump for hoping someone can figure out how to display the thumbnails horizontally, I haven't had any luck
__________________
X-cart Version 4.2.2
Reply With Quote
  #7  
Old 05-12-2009, 07:25 AM
 
Christofer Christofer is offline
 

eXpert
  
Join Date: Apr 2009
Location: Thessaloniki, Greece
Posts: 202
 

Default Re: Thumbnails in related_products.tpl

still noone?
__________________
X-Cart Gold : 4.2.1 (on linux parallels plesk / mysql)
Php v5.2.9 (Zend: 2.2.0) - MySql v5.0.79 - LiteSpeed server
Modules : X-Offer & X-Aom & One page checkout
Product tabs & Product downloads & many more
Reply With Quote
  #8  
Old 06-05-2009, 05:32 AM
 
Bouma Bouma is offline
 

Member
  
Join Date: Sep 2007
Posts: 13
 

Default Re: Thumbnails in related_products.tpl

Quote:
Originally Posted by Dowhatchalike
/bump for hoping someone can figure out how to display the thumbnails horizontally, I haven't had any luck

Hi,

I think the solution is to change the location of <tr> and </tr>. So instead of <tr> after {foreach} you should place it before {foreach}. This is the code I use in related_products.tpl and it works for me:

<tr>
{foreach from=$product_links item=p}
<td><a href="product.php?productid={$p.productid}&cat={$c at}&&bestseller=Y">{include file="product_thumbnail.tpl" productid=$p.productid product=$bestseller.product tmbn_url=$bestseller.tmbn_url}<br />{$p.product|amp}</a></td>

{/foreach}
</tr>

Good luck.
__________________
X-Cart Version 4.4
Reply With Quote
  #9  
Old 06-05-2009, 07:34 AM
 
Dowhatchalike Dowhatchalike is offline
 

Advanced Member
  
Join Date: May 2004
Posts: 84
 

Default Re: Thumbnails in related_products.tpl

Bouma

Thanks!!! worked perfect
__________________
X-cart Version 4.2.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:24 AM.

   

 
X-Cart forums © 2001-2020