Wednesday, December 8, 2010

Image Handler for zencart - making the large image the hover image

Image handler creates 3 sizes of image

  1. -Small thumbnail
  2. -Product image - medium sized image that appears on the product info page and is the hover image that appears when you mouse over a thumbnail) 
  3. -Larger image, which you see by clicking the larger image link on the product info page
A previous commenter (Mathias) asked if it was possible to have the hover image be larger than the product image, this cannot be done out of the box, but you can do it with a small tweak to the code.

as always backup your files before making changes

 In your

 Find the following (around line 697)
$zoom_sizetype = ($this->sizetype=='small')?'medium':'large';
and replace it with
$zoom_sizetype = ($this->sizetype=='small')?'large':'medium';
 Save the file and upload, you may need to refresh the page you are viewing to see the change

Now when you mouse over a thumbnail the large image is shown as the hover

Let me know if it works for you