X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Dynamic Images for X-Cart version 4.1.x (https://forum.x-cart.com/showthread.php?t=33191)

Lionel 10-28-2007 09:27 AM

Re: Dynamic Images for X-Cart version 4.1.x
 
In product_image.tpl there are many references to $number. Where do you assign that number? It was displaying all the variants images one below the other in product page. I manually changed $number to 2 in the variants section of that template and all is fine. But I still would like to know where to define it because of the other references.

Thank you

TelaFirma 10-29-2007 04:37 AM

Re: Dynamic Images for X-Cart version 4.1.x
 
At the top of the file /skin1/modules/Dynamic_Images/product_image.tpl

find the line
Code:

{math equation="floor(x / y)" x=$config.Dynamic_Images.di_product_image_width y=$config.Dynamic_Images.di_detail_thumb_width assign=number}

and change this to

Code:

{math equation="floor(x / y)+1" x=$config.Dynamic_Images.di_product_image_width y=$config.Dynamic_Images.di_detail_thumb_width assign=number}

The purpose of this assignment is to take the width of the product image and divide it by the width of the thumbnails to determine how many thumbnails can fit in the row below the main product image. It was just a math error - 1 should have been added to the calculation.

Quote:

Originally Posted by Lionel
In product_image.tpl there are many references to $number. Where do you assign that number? It was displaying all the variants images one below the other in product page. I manually changed $number to 2 in the variants section of that template and all is fine. But I still would like to know where to define it because of the other references.

Thank you


TelaFirma 10-29-2007 04:44 AM

Re: Dynamic Images for X-Cart version 4.1.x
 
Unfortunately no. Each image is generated by the data fed to it from the template at the time the template is processed. This includes destination image size, type, location, admin settings, etc..

Unless you change a configuration setting on an image, they will only have to be generated that first time. It does take longer on the product page now the first time due to the number of images that have to be generated. If - in your instance - you can get away with not using the unsharp mask, this will really speed things up. The unsharp mask does use a lot of resources. It runs much faster on PHP5, but on PHP4, it is a little slower.

I have done a lot of benchmarking and the setting that I have for the unsharp mask are the most optimal that I can find and still have a good quality on the output.

Another thing that will help speed things up the first time is to disable the image swap if you do not need it. This is something that can be enabled later and not effect having to generate the images again. It will only have to generate the image used for the swap on mouseover.


Quote:

Originally Posted by Lionel
Is there a way to generate the cache automatically for all products at once instead of clicking on each one of them? That process takes a long time to generate and makes the site appear slow.


Lionel 10-29-2007 06:55 AM

Re: Dynamic Images for X-Cart version 4.1.x
 
Hummm... it was
Quote:

{math equation="floor(x / y)-1" x=$config.Dynamic_Images.di_product_image_width y=$config.Dynamic_Images.di_detail_thumb_width assign=number}


adding +1 made it do the first row with 2 thumbs then, the next 2 went one below the other.

So I made it without the -1 or +1 and all is fine.

Vacman 11-02-2007 12:59 PM

Re: Dynamic Images for X-Cart version 4.1.x
 
You know - I am still having some trouble getting images to display. About half the time the images appear in the pop-up light box, and the half they load on a separate page. Obviously, we only want this to pop up, not the new page thingy...

TelaFirma 11-02-2007 04:29 PM

Re: Dynamic Images for X-Cart version 4.1.x
 
I think this has to do with a couple of things. First, you are using Fancy Categories. This created an extream amount of overhead on your pages. For your site (are you ready....)

4,000 lines and a size of 164K !!

I say this because if the page does not load fully, then the popup script will not function correctly. It never gets to the end of page load to fire off the event that enables the popup.

In addition your tracker code (<script src="http://www.vacsew.com/collector/tracker.js.php" type="text/javascript"></script>) has an error in the JavaScript. It is calling a function that does not exist...

So, my first suggestion - get rid of Fancy Categories. There are much better ways to handle the categories that are not "code bloat".

Vacman 11-05-2007 12:02 PM

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

Originally Posted by TelaFirma
I think this has to do with a couple of things. First, you are using Fancy Categories. This created an extream amount of overhead on your pages. For your site (are you ready....)

4,000 lines and a size of 164K !!

I say this because if the page does not load fully, then the popup script will not function correctly. It never gets to the end of page load to fire off the event that enables the popup.

In addition your tracker code (<script src="http://www.vacsew.com/collector/tracker.js.php" type="text/javascript"></script>) has an error in the JavaScript. It is calling a function that does not exist...

So, my first suggestion - get rid of Fancy Categories. There are much better ways to handle the categories that are not "code bloat".




yeah- yeah yeah.... Ok - I disabled the Fancy Cat thing... and all is well. I will have to look into the missing function....

maineiac 11-06-2007 06:13 AM

Re: Dynamic Images for X-Cart version 4.1.x
 
Thank you for this wonderful add-on! It's working almost perfectly for me. So far, the problem I'm encountering happens only in IE7 - if a product does not have any detailed images, then when clicking on the product image it opens in the same window. I've found that if I do have a detailed image for the product and disable the detailed image, then IE7 is fine with it and opens in the lightbox as intended. Any ideas? This is on v4.1.8

TelaFirma 11-06-2007 08:43 AM

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

Originally Posted by matrixa59
thank you for sending me the updated mod. most of my problems were acturly not related to this mod but my php setup. i have now moved to a new server with PHP 5 and all problems are sorted now.

I am having one small problem which is probably where i have not set this up correctly. when adding an item to the cart the product image is not displaid and instead i get the default noimage. Can you tell me what i am doing wrong. Once again a great Mod


Have you done any customization to the shopping cart?

TelaFirma 11-06-2007 08:44 AM

Re: Dynamic Images for X-Cart version 4.1.x
 
I will send you a PM - there are 1 or 2 things that are IE7 specific that I need to help you with.

Quote:

Originally Posted by maineiac
Thank you for this wonderful add-on! It's working almost perfectly for me. So far, the problem I'm encountering happens only in IE7 - if a product does not have any detailed images, then when clicking on the product image it opens in the same window. I've found that if I do have a detailed image for the product and disable the detailed image, then IE7 is fine with it and opens in the lightbox as intended. Any ideas? This is on v4.1.8



All times are GMT -8. The time now is 08:57 AM.

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