View Single Post
  #1  
Old 09-07-2006, 06:21 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default ez-Upsell & variant thumbnail images - 4.1.3

As I am fine tuning my store in 4.1.3, I have discovered (as I am sure Jon and WebsiteCM will as well, once more users migrate to 4.1) ez-Upsell is missing a very important display function in 4.1.x:

A product with variants in 4.1 will display the variant thumb in the product detail page, and when the customer adds the item to their cart, the variant thumb also appears (good!). Since ez-Upsell is an intermediate step before cart.tpl, in my opinion, if cart.tpl displays the variant thumb, so should ez-Upsell.

From ez-Upsell, once the customer clicks on "proceed to checkout", the customer then gets to see the variant thumb again, in cart.tpl --

So, basically, we need to get the variant thumb image into ezupsell.tpl

I messed around a little, but my $marty is only so-so -- good enough to hack away, but not really good enough for everything...

Here's what I have figured out:

1. I THINK -- In cart.tpl the code that decides what thumb image is to be displayed is:
Code:
{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}

2. I THINK -- in ezupsell.tpl the code that decides what thumb image is to be displayed is:
Code:
{include file="product_thumbnail.tpl" productid=$product_info.productid image_x=$config.Appearance.thumbnail_width product=$product_info.product tmbn_url=$product_info.tmbn_url}
SO, I tried to steal code from cart.tpl, and that didn't work. Anyone have any ideas?

While we're at it, I think it would be useful to have ez-Upsell display the product's variant (if it has one) in the "You have added 1 "Product Name" to your shopping cart. If a variant is present, wouldn't it be better if ez-Upsell displayed:

"You have added 1 "Product Name" - "product option": "variant" to your shopping cart.

I tried to add the code from cart.tpl:

Code:
{if $products[product].product_options ne ""} {include file="modules/Product_Options/display_options.tpl" options=$products[product].product_options}

But that didn't work. (of course it didn't, what di you expect?)

Any $marty experts care to dig in here?

Jon, if you are reading this, do you want to improve ez-Upsell for the 4.1 version? if not, we're just going to hack away at it...

Thanks to anyone who might be able to point me in the right direction.

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote