Zen Follower
- Join Date:
- Jul 2008
- Posts:
- 495
- Plugin Contributions:
- 0
Enlarge product picture is cutoff
v1.5beta
go to meaningfulaccents.com
click on figurines
click on Enlarge image
you will notice the shoe is cut off
using IE8.0
Views: 5,194
Zen Follower
v1.5beta
go to meaningfulaccents.com
click on figurines
click on Enlarge image
you will notice the shoe is cut off
using IE8.0
Totally Zenned
Just don't start with an image larger than your intended screen size.
Zen Follower
hi dbltoe,
can u give more details? i don't understand what you mean. thanks.
Zen Follower
I have the same issue ebaobao. At first I thought it was the template I was using, but when I switched back to the classic contemporary green template the behavior was still present. You will also find many sites exhibiting this behavior with the popup enlarge image (unless they are using one of the lightbox mods). You will find some forum posts about it, but back when I was troubleshooting it there were no solutions found. I never had time to dig into it so ended up just leaving it alone. I am using 1.3.9h (behavior was also present in v1.3.8a).
Totally Zenned
That's not a bug, if you are seeing it on Firefox, that's its usual behavior. If you look at it on IE, Safari or Chrome, the images show up just fine.
Now, you have bigger problems because there's something wrong with your categories, I just can't click on specific ones, the hover is all over the place (too big) so is difficult to click the right one.
Zen Follower
hi ideasgirl,
in my original post, the problem exists on IE. It also exist on latest version of FF. Thanks for pointing out the categories hover issue. I just fixed it.
Totally Zenned
ebaobao:
hi ideasgirl,
in my original post, the problem exists on IE. It also exist on latest version of FF. Thanks for pointing out the categories hover issue. I just fixed it.
You are welcome...
I don't see the issue using IE8, Safari, or Chrome. It has always been an issue on FF (since I recall). Here are my 3 screenshots for you, hope that helps:
http://img545.imageshack.us/img545/6594/screenshotff.jpg (FF)
http://img225.imageshack.us/img225/9408/screenshotie8.jpg (IE8)
http://img194.imageshack.us/img194/9259/screenshotsafari.jpg (Safari)
Zen Follower
hi ideasgirl,
what I meant is that the window that encapsulates the picture cuts off the shoe. But the image itself is fine. Once you resize the window you can see everything. I was talking about the initial window size right after clicking enlarge. Sorry if i wasn't clear. This is not that big of a deal. Just want zc to be as great as possible.
Totally Zenned
ideasgirl:
It has always been an issue on FF (since I recall)That is because Zen Cart detects FF and does some incorrect adjustment to the popup size (was probably needed for Netscape, a long long time ago....). The fix is easy: just remove the size adjustment value (it's in some js popup file, might post details later).
Totally Zenned
The code has changed over the years it seems....
But the popup height adjustment is in this part of the code:
(includes\modules\pages\popup_image\jscript_main.php)
if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1 && window.navigator.userAgent.indexOf('SV1') != -1) {
i=30; //This browser is Internet Explorer 6.x on Windows XP SP2
} else if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1) {
i=0; //This browser is Internet Explorer 6.x
} else if (window.navigator.userAgent.indexOf('Firefox') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) {
i=25; //This browser is Firefox on Windows
} else if (window.navigator.userAgent.indexOf('Mozilla') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) {
i=45; //This browser is Mozilla on Windows
} else {
i=80; //This is all other browsers including Mozilla on Linux
}
```Adjustment for FF colored red, and 45 seems to be a better value than the current 25.
Not sure about IE 8 though, probaly it also depends on the users browser (compatibility) settings?
(In FF it also depends if the user settings allow javascript to resize the window. If resizing is disallowed the image will fit)
Totally Zenned
what I meant is that the window that encapsulates the picture cuts off the shoe. But the image itself is fine.
Yes, I know...
The fix is easy: just remove the size adjustment value
Worked like a charm, thanks! :smartalec:
Zen Follower
paulm:
The code has changed over the years it seems....
But the popup height adjustment is in this part of the code:
(includes\modules\pages\popup_image\jscript_main.php)
if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1 && window.navigator.userAgent.indexOf('SV1') != -1) {
i=30; //This browser is Internet Explorer 6.x on Windows XP SP2
} else if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1) {
i=0; //This browser is Internet Explorer 6.x
} else if (window.navigator.userAgent.indexOf('Firefox') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) {
i=25; //This browser is Firefox on Windows
} else if (window.navigator.userAgent.indexOf('Mozilla') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) {
i=45; //This browser is Mozilla on Windows
} else {
i=80; //This is all other browsers including Mozilla on Linux
}
>
> Not sure about IE 8 though, probaly it also depends on the users browser (compatibility) settings?
>
> (In FF it also depends if the user settings allow javascript to resize the window. If resizing is disallowed the image will fit)
Thanks for identifying the where the problem was coming from and what file needed to be modified. Changing it to i=45 made negligible difference in Firefox. I had to change it to **i=80** and the popup re-sizes perfectly in Firefox showing the entire image (same as in IE and Chrome now).
Zen Follower
crunch are you saying it fixes it in IE as well? the line in red says specifically firefox on windows. can you clarify?
Zen Follower
No, the Firefox modification above does not fix the issue in IE 8.
I also just noticed there was a little bit of the image cut off in IE 9, so there is still an issue with IE browsers. I did some more testing with my site.
I added the following to the \includes\modules\pages\popup_image*jscript_main.php* file and it has fixed the problem in both IE 8 and IE 9 (not sure if issue is in IE 7, but probably is).
} else if (window.navigator.userAgent.indexOf('MSIE 8.0') != -1) {
i=80; //This browser is Internet Explorer 8.x
} else if (window.navigator.userAgent.indexOf('MSIE 9.0') != -1) {
i=80; //This browser is Internet Explorer 9.x
and of course to fix the issue in Firefox, change the Firefox entry from i=25 to i=80 as I posted above.
This has resolved the issue on my site, so when editing your own site, make a backup of that jscript_main.php file (just in case something goes wrong).
Here is how that whole section of the file looks now:
if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1 && window.navigator.userAgent.indexOf('SV1') != -1) {
i=30; //This browser is Internet Explorer 6.x on Windows XP SP2
} else if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1) {
i=0; //This browser is Internet Explorer 6.x
} else if (window.navigator.userAgent.indexOf('MSIE 8.0') != -1) {
i=80; //This browser is Internet Explorer 8.x
} else if (window.navigator.userAgent.indexOf('MSIE 9.0') != -1) {
i=80; //This browser is Internet Explorer 9.x
} else if (window.navigator.userAgent.indexOf('Firefox') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) {
i=80; //This browser is Firefox on Windows
} else if (window.navigator.userAgent.indexOf('Mozilla') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) {
i=45; //This browser is Mozilla on Windows
} else {
i=80; //This is all other browsers including Mozilla on Linux
}
Zen Follower
Correction to IE 8 and IE 9 values (too much playing around and I copied in wrong data in the previous post.
The following will make the popup re-size windows behave the same in IE 8 and IE 9 and show the entire image (not cutting any of the bottom of the image off). NOTE: I tested all this using the stock Classic Contemporary Green template:
} else if (window.navigator.userAgent.indexOf('MSIE 8.0') != -1) {
i=55; //This browser is Internet Explorer 8.x
} else if (window.navigator.userAgent.indexOf('MSIE 9.0') != -1) {
i=30; //This browser is Internet Explorer 9.x
Zen Follower
Here is an update to my testing using the stock Classic Contemporary Green template.
Issues:
I updated the \includes\modules\pages\popup_image\jscript_main.php file to add IE 8 and IE 9 agents and changed the Firefox value.
Here is how that whole section of the file looks now:
if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1 && window.navigator.userAgent.indexOf('SV1') != -1) {
i=30; //This browser is Internet Explorer 6.x on Windows XP SP2
} else if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1) {
i=0; //This browser is Internet Explorer 6.x
} else if (window.navigator.userAgent.indexOf('MSIE 8.0') != -1) {
i=55; //This browser is Internet Explorer 8.x
} else if (window.navigator.userAgent.indexOf('MSIE 9.0') != -1) {
i=30; //This browser is Internet Explorer 9.x
} else if (window.navigator.userAgent.indexOf('Firefox') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) {
i=60; //This browser is Firefox on Windows
} else if (window.navigator.userAgent.indexOf('Mozilla') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) {
i=45; //This browser is Mozilla on Windows
} else {
i=80; //This is all other browsers including Mozilla on Linux
}
These updates above fix these issues with the popup re-size box in IE8, IE9 and Firefox.
NOTE: If your template modifies the behavior of the box somehow you may need to tweak these values a bit. The reason I say this is that the custom template I use (cherry zen) has something screwy in it that pushes the image down in the box leaving white space above the image. So, I have to tweak these values a bit to compensate for that template behavior.
Oba-san
Do you have a demo of where you are using these settings?
I am not so sure about the FireFox setting, FireFox 6 is going to have issues with that being so large ...
Zen Follower
I PM'd you.
Oba-san
What operating system do you have on your computer?
I am using Windows 7 ...
Zen Follower
Windows 7 Ultimate 64-bit
Fields marked required must be completed.
Tell staff why this post should be reviewed.