Image Handler2

Fred's picture

Image Handler 2 is a great addition to any Zen Cart install. Gone are the rather naïve, really old school "resized by the browser from much bigger images" images. instead, sensible, correctly proportioned and re-sized images are put in place.
However, when using SSL on a Zen Cart install in a sub-folder, the Image Handler2 Manager tends to fall apart a little. No images are shown. After some digging around and copious use of Firebug (thanks to the people who came up with that!) I figured out that Image Handler2 was not getting the correct URL to the images. As a temporary measure, until I can come up with a better way to handle this, do the following:
change:

echo zen_image(DIR_WS_CATALOG . $preview_image, addslashes($products_name), $width, $height) . '<br />';

to:
echo zen_image('/your/subdirectory/'. DIR_WS_CATALOG . $preview_image, addslashes($products_name), $width, $height) . '<br />';

on lines 789, 799, 814
change:
zen_image($selected_image_file, addslashes($products_name), $width, $height)

to:
zen_image('/your/subdirectory'. $selected_image_file, addslashes($products_name), $width, $height)

on line 857.
Of course, this is not very portable and is prone to being over-written when upgrading. However, until the Image Handler2 authors come up withh an alternative, at least this will get you going!