Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to: Larger Image Pop-up Size for Product Info

How to: Larger Image Pop-up Size for Product Info

Locked

Views: 1,998

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
6 Sep 2007, 1:13 AM
#1
robu avatar

robu

New Zenner

Join Date:
Sep 2007
Posts:
3
Plugin Contributions:
0

How to: Larger Image Pop-up Size for Product Info

The size and placement of the product image pop-up / popup window in the product info page appears to be hardcoded to 100x100 pixels.

/includes/modules/pages/product_info/jscript_main.php

function popupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')

On the above line one can change the size, position, scrollbars and other attributes of the image pop-up window.

Also, putting the file in the override dir:
/includes/modules/pages/product_info/TEMPLATE/jscript_main.php
did did not work for me. I had to overwrite the original file.

There is a resize function in
/includes/modules/pages/popup_image/jscript_main.php
but that was not being called for some reason. If it is working, then one can probably make adjustments there instead.

/Robert

6 Sep 2007, 1:20 AM
#2
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: How to: Larger Image Pop-up Size for Product Info

I seriously don't think any of the image size is hard coded, you can changed the size of any image.
Edit: Install Image Handler for better control and display of your images.

6 Sep 2007, 2:08 AM
#3
robu avatar

robu

New Zenner

Join Date:
Sep 2007
Posts:
3
Plugin Contributions:
0

Re: How to: Larger Image Pop-up Size for Product Info

I do have image handler installed. The pop up window was still coming up 100x100. The resize function was not being called. Maybe as a result of some config value somewhere not being set. I could not find it any setting for it.

There are many postings on this forum related to the pop-up not resizing as it should, and there are not may answers.

I'm not expert but I think the initial values are hard coded because that is how javascript works. If the image is not preloaded by the html code, you cannot read the size attributes for it. That is why the window size is fixed when the window is opened and then resized after the image has loaded. No if only the resize function was called by zen cart...

6 Sep 2007, 2:16 AM
#4
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: How to: Larger Image Pop-up Size for Product Info

There is no reason to hardcode javascript, you can just have php echo the variable there. Anyway, can you pm your site url?

BTW, I use IH2 on my site too, you may want to have a look.

6 Sep 2007, 12:12 PM
#5
robu avatar

robu

New Zenner

Join Date:
Sep 2007
Posts:
3
Plugin Contributions:
0

Re: How to: Larger Image Pop-up Size for Product Info

It is just a quick hack to change the default pop up window size. If I get time, I'll try to figure out why it does not resize as it should. It seems it is a problem on firefox only. IE seems to resize the window as it should.

6 Sep 2007, 1:33 PM
#6
francocauter avatar

francocauter

Zen Follower

Join Date:
Jun 2007
Location:
Milton Keynes UK
Posts:
153
Plugin Contributions:
0

Re: How to: Larger Image Pop-up Size for Product Info

yellow1912:

There is no reason to hardcode javascript, you can just have php echo the variable there. Anyway, can you pm your site url?

BTW, I use IH2 on my site too, you may want to have a look.

Why the small images for new products and featured products in the welcome page do not resize?

6 Sep 2007, 3:13 PM
#7
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: How to: Larger Image Pop-up Size for Product Info

They should. Check your admin settings. IH2 is in use on the site in my sig and I haven't had a problem with the resizing.