View Single Post
  #45  
Old 10-08-2007, 02:54 AM
  TelaFirma's Avatar 
TelaFirma TelaFirma is offline
 

X-Adept
  
Join Date: Nov 2002
Location: North Carolina USA
Posts: 930
 

Default Re: Dynamic Images for X-Cart version 4.1.x

This is how the mode is supposed to work - it is just that in your case it is not exactly what you need. If variant images have been associated with a product and if you have that option checked, it will display the thumbnail of each variant. In your case, you are using the same image for many different variants, thus it seems like the same image is repeating. It is not. Also, this is not a limitation of the script. It is functioning correctly. You are using the same image multiple times. Just like if you were to upload the same image multiple times as a detail image, it would display them all. Also, it is not they the script knows they are the same color - the script knows that it is the same source image. The file name is generated by the source image parameters along with any parameter that you feed it. If you use the same source image for multiple variants and use the same parameters, then the generated images will have the same name.

For the timeout issues - this is tied back to how you are using the variants. In the screen shot you have one product image with 14 variants shown (before it timed out). This means that 45 images were generated before it timed out. 1 for the product image, 14 thumbnails, 15 variant images for use when a product option is changed and 15 images for use in the Lightbox popup.

It was requested by quite a few people that this mod use Lightbox for the popups. By doing this, it does cause the mod to generate 1/3 more images on the first load than it normally would. I guess this is the 80/20 rule. I included what the majority of the people asked for and in doing so made it fall slightly outside what might be usable in your special case.

Generating the images on product import defeats the function of this mod. It was structured so that it could be used as a Smarty function anywhere on the site. All you need to do is feed it the image location and the size parameters and it will generate and image that will be cached. This is how it can be used for all kinds of things across your site like in your shopping cart, in the best sellers list as well as integrate with third party mods. This also relates back to the first point in that the mod doesn't know that the options are the same, it knows that the source image is the same.

In your case, if you want to use the mod with all your variants there are two suggestions. My first suggestion, which is to use the detail images to show the different variation details or you can use variant images - just do not load the same image multiple times. You do not have to have a variant image with each product variant. You can have one image for the first brown variant, skip loading images for all other brown variants, then load an image for the first yellow variant.

The first option is still the best in your particular instance.
Quote:
Originally Posted by mffowler
Stephen,

Thanks for your post. But, it may help to see what I am referring to as I may not have done a sufficient job describing the issues. I have attached a screen shot of what is occuring.

In the screen shot, you can see:
  1. That every variant that has a defined image is displayed. Thus, I see multiple images of the same as variant images are set to ALL sizes/color combinations. But, it knows they are the same color as only one instance of the image is created (and their lightbox links are also the same) it just displays one for every variant size in my case. That is an issue in your script.
  2. You can also see that I am receiving errors upon the initial access of a page as it takes longer than 30 seconds to generate the images when you have a lot of variables of the same style of item.
  3. Regarding load time: there needs to be a function to generate all images vs. one by one or at the time of import the product feed. One can't expect customers to generate the sites images the first time around...
  4. My test product (I'll IM you a link) has all variant images assigned and thus, XC changes the image with the dropdown selector.
I'll IM you now... Thanks for your help.

- Mike
Reply With Quote