X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Thumbnails in related_products.tpl (https://forum.x-cart.com/showthread.php?t=46517)

jholley 03-24-2009 03:37 PM

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?

jholley 03-27-2009 12:10 PM

Re: Thumbnails in related_products.tpl
 
Looks like no one else has worked this one out yet either.

Dowhatchalike 03-30-2009 09:25 PM

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...

Learner 03-30-2009 09:50 PM

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.

jholley 03-31-2009 03:02 AM

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.

Dowhatchalike 04-28-2009 01:04 PM

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 :(

Christofer 05-12-2009 07:25 AM

Re: Thumbnails in related_products.tpl
 
still noone?

Bouma 06-05-2009 05:32 AM

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.

Dowhatchalike 06-05-2009 07:34 AM

Re: Thumbnails in related_products.tpl
 
Bouma

Thanks!!! worked perfect


All times are GMT -8. The time now is 06:05 AM.

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