View Single Post
  #376  
Old 03-10-2008, 04:32 PM
  TelaFirma's Avatar 
TelaFirma TelaFirma is offline
 

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

Default Re: TelaFirma - X-Cart Dynamic Image Generator

Quote:
Ok, thanks. Might I suggest adding a "Cache Folder Cleanup" button to the mod? If the filenames are generated based on known parameters like that, it seems like it would be pretty easy to make a utility that runs through all of the image files in the cache directory and deletes those that are no longer in use based on the current image settings. Just a thought.

This is something that I have thought about but it is not as easy as outlined above. Since this is done as a Smarty Plugin, most of the parameters that are used are fed to it at the time the template is called. It would be a very complicated routine to go through all the templates, look for all calls to the plugin, log all the parameters that were passed, add those to the config parameters and come up with a list of MD5 hashes and then compare them against the actual files, deleting those that are lot listed.

I would need to write a routine that deleted all .jpg, .gif and .png files. This - of course would force the mod to have to regenerate all the images again, plus this is something that can easily be done via FTP.

Quote:
I have done as you said above, but (for #1 and #3) it did not solve the problem. I did a little more investigating, and there are never any image thumbs below the main image on the product page unless I also add a Detailed Image in X-Cart. I was hoping not to always have to add a separate Detailed Image in order to get the image thumbs....

For #2, I understand what you said, but I really wish it wasn't the case. Unless I'm misunderstanding something, that means that there will always be a redundant pop-up image if the image thumbs are displayed. Shouldn't the mod be able to tell that the main product image wants to display the same pop-up as one of the thumbs and link them both to a single pop-up image, getting rid of the redundancy in the pop-ups?

Lets back up a little on what is going on. If you only have one product image, this should be loaded ad the product thumbnail (not the product image). If you ALSO want the small thumbnail of this displayed below the main product image on the actual product page, you will need to check the option to "Display Main Product Thumbnail as first Detail Image thumb below the main product image on the product page".

There are three settings that are very important:
  • Display Detail Image thumbs below the main product image on the product page
  • Display Main Product Image as first Detail Image thumb below the main product image on the product page
  • Display Main Product Thumbnail as first Detail Image thumb below the main product image on the product page

The first setting tells the mod whether to display thumbnails (below the main product image) of the Detail Images that are uploaded for the product.
The next setting tells the mod whether to display a thumbnail of the Main Product Image (as defined by X-Cart) before it displays the thumbnails of the Detail Images (if they exist).
The other setting tells the mod whether to display a thumbnail of the Product Thumbnail (as defined by X-Cart) before it displays thumbnails of the Detail Images (if they exist).

In addition as we have talked about before, if you only have ONE image, it should be loaded as the Product Thumbnail (as defined by X-Cart). If you want this image to also be displayed as a thumbnail below the main product image on the product page, then check the third option listed above (Display Main Product Thumbnail as first Detail Image thumb below the main product image on the product page).

Keep in mind - this goes right back to the other question about why there are two popup images that are identical. If you choose to display the Product Thumbnail again below the product image on the product page - you are duplicating images and you will have two popups that are the same. There is no way around this since they are the same image.
Reply With Quote