Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Click to Enlarge


matthew_scullion

Recommended Posts

Posted

Hi,

 

I would like to change the 'Click to Enlarge' function to make it open a slightly larger box. My product images are 300x300 pixels and the bottom always gets cut off.

 

I have edited the JavaScript at the top of the product_info.php file, to read:

 

function popupWindow(url) {

window.open(url,'popupWindow',& #39;toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=yes,copyhistory=no,width=300,height=450,screenX=150,screenY=150,top=150,l

eft=150')

}

 

This seems to open a larger box momentarily but as soon as the image loads it shrinks again to cut the bottom of the image off.

 

You can see this happening on the site at http://www.yourlightsource.co.uk (and there are completed products in the 'Contemporary Interior Lighting' category).

 

Can anyone tell me how to make the "click to enlarge" function open a bigger box?

 

Many thanks for any help in advance.

Posted
Check 'catalog/popup_image.php'

 

I think what you want is a padding around the image, correct? catalog/popup_image.php line 30.

 

if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);

self.focus();

 

I have not tried this so do back up.

 

Try increasing the +30 and the +60 values

  • 2 weeks later...
Posted
I think what you want is a padding around the image, correct? catalog/popup_image.php line 30.

 

if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);

self.focus();

 

I have not tried this so do back up.

 

Try increasing the +30 and the +60 values

I have just removed the -i from the above line and it seems to work ok.

 

If there is any peril in this can somebody be kind enough to point it out.

 

Rick

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...