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

ez-Upsell & variant thumbnail images - 4.1.3

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #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
  #2  
Old 09-09-2006, 07:23 PM
 
carpeperdiem carpeperdiem is offline
 

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

Default Re: ez-Upsell & variant thumbnail images - 4.1.3

I tried a bunch of other edits on this issue -- damn... could it be in the encrypted, "added.php" code? I sure hope not...

As I've been adding hundreds of variants to my products this weekend, and some of my variants have the product's unique name and color IN THE THUMBNAIL IMAGE - it's pretty stupid to have the customer see the correct thumb image on the product page, then when they "add to cart", they see a thumb image of a different product (since ez-upsell is displaying the same thumb image as the DEFAULT product detail page thumbnail, which is the defualt variant thumb, not the "primary" thumb that is provided on the product detail page.) -- wow that's a mouthfull.

[note: x-cart needs to change the terminology of the thumbs since there are 2 distinct types of thumbs since 4.1:

a) the thumb that is displayed on category pages;
b) the thumb displayed on product detail pages -- and if there is a thumb associated with a variant, it supercedes thumb (a) on product detail pages]


THEN -- if the customer clicks on "checkout" - then they see the correct thumb, and the correct variant/product options (cart.tpl).

Of course, this only surfaced on 4.1, since there was no way to do this on a stock 4.0 config...

Jon, I know you're reading this! What am I missing here? Is there a magic line of code that will let me steal the same thumb image as cart.tpl and get it into ezupsell.tpl ?

Thanks to anyone who can help...

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 09-10-2006, 07:15 AM
 
carpeperdiem carpeperdiem is offline
 

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

Default Re: ez-Upsell & variant thumbnail images - 4.1.3

I gave this another hour...

Here's what I determined:

1. In product.tpl, products.tpl and cart.tpl, all the thumbnail code is essentially the same (and related)...

product.tpl:
product=$products[product].product tmbn_url=$products[product].tmbn_url

products.tpl:
product=$products[product].product tmbn_url=$products[product].tmbn_url

cart.tpl:
product=$products[product].product tmbn_url=$products[product].tmbn_url

However, in ezupsell, the thumbnail code is very different:
Quote:
ezupsell:
product=$product_info.product tmbn_url=$product_info.tmbn_url

Is this a remnant from 4.0.x that just happens to work with 4.1? Since the php file is encrypted, I can't get in there... Please enlighten me! I am FAR from an expert at smarty, so sometimes I am simply guessing... but in this case, I have been very successful moving segments of code around, and my gut tells me this should work, if the php file could be edited...

Issue #2: adding the option/variant name to the "You have added 1 "_product-name_" to your shopping cart." --- I tried to bring in the same code used in the cart.tpl

Code:
{if $products[product].product_options ne ""} {include file="modules/Product_Options/display_options.tpl" options=$products[product].product_options} {/if}
... and this doesn't do anything.

Of course, in cart.php, there is a defined array... is that what's missing? If this is a "Jon must modify 'added.php' or else you won't be able to do anything..." ?

I'm learning lots about how things fit here... so I don't consider this time wasted -- BUT I would like to know if I'm banging my head into a brick wall... doesn't this seem like an obvious and almost REQUIRED function of ez-Upsell to be compatible with 4.1 and how it handles variants and variant images?

Thanks to anyone who can contribute.

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #4  
Old 09-10-2006, 09:04 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: ez-Upsell & variant thumbnail images - 4.1.3

Hi Jeremy,

I will be looking into this for you on Monday. Please update your support ticket (if you haven't already) with FTP information and a product to use for testing.

FYI, the only difference between these two lines of code is that one one is for displaying multiple products (i.e. in the shopping cart) and one is for displaying one product:

Code:
product=$products[product].product tmbn_url=$products[product].tmbn_url product=$product_info.product tmbn_url=$product_info.tmbn_url i.e. $products[product] vs. $product_info

Jon Peters
Reply With Quote
  #5  
Old 09-10-2006, 09:26 AM
 
carpeperdiem carpeperdiem is offline
 

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

Default Re: ez-Upsell & variant thumbnail images - 4.1.3

Quote:
Originally Posted by Jon
FYI, the only difference between these two lines of code is that one one is for displaying multiple products (i.e. in the shopping cart) and one is for displaying one product:

Code:
product=$products[product].product tmbn_url=$products[product].tmbn_url product=$product_info.product tmbn_url=$product_info.tmbn_url i.e. $products[product] vs. $product_info

Cool, Jon. Thanks for chiming in. I didn't expect you to comment on this over the weekend!

The only thing about the "displaying multiple products" idea is that this is the same exact code used in product.tpl - only displaying a single product - BUT - (this is where the logic may work out) - since product.tpl is displaying a VARIANT image, maybe, possibly, since 4.1, xcart is treating all variant images the same as multiple products (in effect, they are multiple products, with their own skus, etc...) - so this may answer this. This could be a 4.1 thing?

I will make a product for testing purposes only that you can go to town with. I'll send this to you via your ticket system.

Thanks so much for looking into this...

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #6  
Old 09-12-2006, 02:29 PM
 
carpeperdiem carpeperdiem is offline
 

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

Default Re: ez-Upsell & variant thumbnail images - 4.1.3

Hi Jon,

THANK YOU for bringing ezupsell to 4.1 land... not only "compatible" with 4.1, but the edits you made today make it "optimized" for 4.1 (in my opinion)

For anyone following this thread, ez-Upsell now (since today, in version 4.1.3) keeps the consistency of unique thumb images for variants, all the way through the checkout process.

1. In detailed product view (product.tpl) - if a customer selects a variant, and the variant has its own unique thumbnail image, then the unique thumb is displayed;

2. If the customer clicks on "add to cart" - as they are brought to the ez-upsell page, the customer will now see the correct, unique thumbnail image for the variant (exactly as in the product detail page) --AND the text for the variant/option <modules/Product_Options/display_options.tpl> is now available to ez-Upsell!! This helps the customer know that the EXACT product/variant combo is what they are buying -- no risk of an abandoned cart due to incomplete transaction info. This was a big complaint from my beta sites (they weren't sure what was added to their cart until final checkout);

3. If the customer clicks "checkout" in ez-Upsell (added.php) - then when cart.tpl is displayed, the EXACT thumb image that the customer has been viewing since the product page is displayed (and variant details)

This is EXACTLY how the UI should be -- the customer sees the exact product image and variant name all the way to checkout.

I'm not sure Jon has released this to the world yet (I'm still testing today's revision), but this fix for 4.1 makes ez-Upsell a SPECTACULAR addition to 4.1 -- especially if you are using product variant thumbs. ez-Upsell in 4.1 now seamlessly shows your product images and variant data all the way to checkout. Thanks, Jon, for making this happen.

With these changes, this now puts ez-Upsell as my #1 "must-have" mod.

[/unsolicited_rave_from_a_happy_customer]

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4


Thread Tools

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:05 PM.

   

 
X-Cart forums © 2001-2020