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 cart pages (https://forum.x-cart.com/showthread.php?t=30786)

sakeena 04-28-2007 05:23 AM

thumbnails in cart pages
 
how do i show the thumbnails in the shopping cart pages and check out pages instead of the full sized version

sorry didnt know where to post this so put in another section at first

balinor 04-28-2007 05:31 AM

Re: thumbnails in cart pages
 
You can edit the size of your thumbnails in customer/main/cart.tpl

I have deleted your second post on this topic.

sakeena 04-28-2007 05:44 AM

Re: thumbnails in cart pages
 
HI
thanks can you tell me exactly what to change or replace, its hard for me to understand just started working with the cart
i dont want to adjust the sizing per say but what it to display the thumbnails instead of the product picture

balinor 04-28-2007 05:50 AM

Re: thumbnails in cart pages
 
Ok, first I need to know your exact version (i.e. 4.1.6). You can find this in your 'Summary' area of your admin. Post that in your signature and I'll fix you up :)

sakeena 04-28-2007 04:14 PM

Re: thumbnails in cart pages
 
4.1.6
signature is fixed
thanks!

balinor 04-29-2007 03:49 AM

Re: thumbnails in cart pages
 
Ok, in your version, the code for the thumbnail is this:

{include file="product_thumbnail.tpl" productid=$imageid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].pimage_url type=$products[product].is_pimage}

If you want to change the size, just replace this:

image_x=$config.Appearance.thumbnail_width

with

image_x=50

Replace 50 with the size you want for the width.

vtonya 04-29-2007 12:01 PM

Re: thumbnails in cart pages
 
Quote:

Originally Posted by balinor
Ok, in your version, the code for the thumbnail is this:

{include file="product_thumbnail.tpl" productid=$imageid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].pimage_url type=$products[product].is_pimage}

If you want to change the size, just replace this:

image_x=$config.Appearance.thumbnail_width

with

image_x=50

Replace 50 with the size you want for the width.


Doesn't work with 4.1.7 version :(

Any Ideas?

NightFire 04-29-2007 01:17 PM

Re: thumbnails in cart pages
 
Don't know if this works. But try the following:

Code:

{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url class="NoBorder" alt=$products[product].product|escape}

vtonya 04-29-2007 01:44 PM

Re: thumbnails in cart pages
 
Thank you, but it doesnt work :(

balinor 04-29-2007 01:46 PM

Re: thumbnails in cart pages
 
What didn't work about the code I posted?

vtonya 04-29-2007 01:54 PM

Re: thumbnails in cart pages
 
Quote:

Originally Posted by balinor
What didn't work about the code I posted?


Thumbs pics of products aren't available, it shows " No image available", but all the products have images!

inebriate 04-29-2007 02:23 PM

Re: thumbnails in cart pages
 
balinor left out the $imageid var assignment

Code:

{if $products[product].is_pimage eq 'W' }{assign var="imageid" value=$products[product].variantid}{else}{assign var="imageid" value=$products[product].productid}{/if}

...by the way, doesnt the cart have this be default?

balinor 04-29-2007 03:40 PM

Re: thumbnails in cart pages
 
vtonya, was it working before you replaced the code?

inebriate, that code you just posted isn't part of the change necessary here, so I didn't post it.

vtonya 04-29-2007 03:50 PM

Re: thumbnails in cart pages
 
Guys, thank you!
inebriate has helped me providing this code:
Quote:

{include file="product_thumbnail.tpl" productid=$item.productid image_x=90 product=$item.product tmbn_url=$item.pimage_url type=$item.is_pimage}


mmoville 06-09-2007 09:18 PM

Re: thumbnails in cart pages
 
can anyone give me the code to make this work on 4.1.7? i can resize the image but can't seem to make the product thumbnails instead of the product images show.

i use different images for thumbnails and products. it would really help just to show the thumbnail on checkout.

thanks!

Dima 04-27-2008 11:33 PM

Re: thumbnails in cart pages
 
Does anyone know how to make this work with v4.1.9?
I also need to use thumbnails in checkout, shoping cart, and wishlist, instead of the full size images.
Thank you.

fropirate 05-16-2008 12:06 PM

Re: thumbnails in cart pages
 
Hi,

I'm interested in getting this to work on 4.1.10 if anyone is willing to help. I'm sick of lookign at jaggy images in the cart, and I'm not sure I want to buy the dynamic image generation mod.

Thanks!

fropirate 05-20-2008 11:24 AM

Re: thumbnails in cart pages
 
Hi everyone,

I was able to make thumbnails instead of full sized images display in the cart so they aren't jaggy. It was really easy actually.

in /customer/main/cart.tpl find:
Code:

{include file="product_thumbnail.tpl" productid=$imageid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].pimage_url type=$products[product].is_pimage}

and repalce with:

Code:

{include file="product_thumbnail.tpl" productid=$imageid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].timage_url type=$products[product].is_timage}

all i had to do was replace the two "pimage" with "timage"

balinor 05-20-2008 11:30 AM

Re: thumbnails in cart pages
 
Nice one :)

tarty00 09-30-2008 01:27 PM

Re: thumbnails in cart pages
 
Ooooh this did the trick for me in 4.1.11 balinor. Thanks heaps Mate!!

Larry Stanford 10-28-2008 01:16 PM

Re: thumbnails in cart pages
 
Thank you.. that was quick and easy!!

fropirate 11-17-2008 08:19 AM

Re: thumbnails in cart pages
 
I've found a problem with the fix I posted. When you add a product to the cart that is a variant and has it's own image defined by the variant, the product thumbnail that shows up is incorrect. My cart seems to be displaying seemingly random product thumbnails in the cart for products with specific variant images. I don't have a fix for this short of returning to how the cart was before.

Edit: Fixed

In order to resolve this issue, I had to make it so it called the thumbnail for the productid, and not the variantid. So after you've done my previous fix, you need to do this:

(I do NOT recommend doing this if you want your variant images displayed)

Find in cart.tpl:
Code:

{assign var="imageid" value=$products[product].variantid}{else}{assign var="imageid" value=$products[product].productid}


Replace with:
Code:

{assign var="imageid" value=$products[product].productid}{else}{assign var="imageid" value=$products[product].productid}

This will make it so the thumbnail image that appears in your cart for regular products, and for products with variant images, all display the main product thumbnail image.

rshandel 03-21-2009 10:44 AM

Re: thumbnails in cart pages
 
Did anyone every come up with a solution to this problem? It seems that without being able to add thumbnail images to variants, you'd have to resize the product images in the cart.

This is how I did it:

I created an new template call cart_product_thumbnail.tpl:

and made the width and height to the desired size (in this example "75):

{if $config.Appearance.show_thumbnails eq "Y"}<img{if $id ne ''} id="{$id}"{/if} src="{if $tmbn_url}{$tmbn_url}{else}{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?type={$type|default:"T"}&amp;id={$produc tid}{/if}"
{if $image_x ne 0} width="75"{/if}{if $image_y ne 0} height="75"{/if}
alt="{$product|escape}" />{/if}


I changed the code in cart.tpl to call the new template:

before:


<a href="product.php?productid={$products[product].productid}">{if $products[product].is_pimage eq 'W' }{assign var="imageid" value=$products[product].variantid}{else}{assign var="imageid" value=$products[product].productid}{/if}{include file="product_thumbnail.tpl" productid=$imageid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].pimage_url type=$products[product].is_pimage}</a>

after:

<a href="product.php?productid={$products[product].productid}">{if $products[product].is_pimage eq 'W' }{assign var="imageid" value=$products[product].variantid}{else}{assign var="imageid" value=$products[product].productid}{/if}{include file="cart_product_thumbnail.tpl" productid=$imageid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].pimage_url type=$products[product].is_pimage}</a>

It does produce grainy images but at least it will show the customer the correct product image in the shopping cart.

cosy 03-31-2009 05:46 PM

Re: thumbnails in cart pages
 
Quote:

Originally Posted by fropirate
Hi everyone,

I was able to make thumbnails instead of full sized images display in the cart so they aren't jaggy. It was really easy actually.

in /customer/main/cart.tpl find:
Code:

{include file="product_thumbnail.tpl" productid=$imageid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].pimage_url type=$products[product].is_pimage}

and repalce with:

Code:

{include file="product_thumbnail.tpl" productid=$imageid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].timage_url type=$products[product].is_timage}



all i had to do was replace the two "pimage" with "timage"


pls explain bit new to all?

lash 11-03-2009 07:55 PM

Re: thumbnails in cart pages
 
Quote:

Originally Posted by cosy
pls explain bit new to all?


Use a ftp program. Go to skin1 click customer, then click main and find the above cart.tpl. Open that file and locate the code

products[product].product tmbn_url=$products[product].pimage_url type=$products[product].is_pimage}


Replace the two "pimage" with "timage". Basically you just have to change "p" with "t". Save the file as cart.tpl and upload to the same location (/customer/main/cart.tpl ), just overwrite the file and you are done.

Scott DeToffol 12-15-2009 01:29 PM

Re: thumbnails in cart pages
 
I'm getting no thumbnail at all in the cart, images are fine everywhere else on the site (sundogtrading.com).

Is there some real basic code I can use in cart.tpl that will show the thumbnail?

Here is my current code:

Code:

<tr><td class="PListImgBox">
<a href="product.php?productid={$products[product].productid}">{if $products[product].is_pimage eq 'W' }{assign var="imageid" value=$products[product].variantid}{else}{assign var="imageid" value=$products[product].productid}{/if}{include file="product_thumbnail.tpl" productid=$imageid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].timage_url type=$products[product].is_timage}
</a>
{if $active_modules.Special_Offers ne "" and $products[product].have_offers}
{include file="modules/Special_Offers/customer/product_offer_thumb.tpl" product=$products[product]}
{/if}
</td>



All times are GMT -8. The time now is 09:07 PM.

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