doesnt on mine.. :O)
Printable View
looks like I need to use the varibale:
$products_image_directory
instead of using DIR_WS_IMAGES when checking for the image in the file
includes/modules/YOUR_TEMPLATE/additional_images.php
try changing this:
to this:PHP Code:
//added image checking image swap and jquery zoom
$products_image_extension = substr($file, strrpos($file, '.'));
$products_image_base = str_replace($products_image_extension, '', $file);
$products_image_medium = $products_image_base . IMAGE_SUFFIX_MEDIUM . $products_image_extension;
$products_image_large = $products_image_base . IMAGE_SUFFIX_LARGE . $products_image_extension;
//added for additional medium checking
$second_medium_image_check = $products_image_base . IMAGE_SUFFIX_MEDIUM . $products_image_extension;
// check for a medium image else use small
if (!file_exists(DIR_WS_IMAGES . 'medium/' . $products_image_medium)) {
$products_image_medium = DIR_WS_IMAGES . $file;
} else {
$products_image_medium = DIR_WS_IMAGES . 'medium/' . $products_image_medium;
}
// check for a large image else use medium else use small
if (!file_exists(DIR_WS_IMAGES . 'large/' . $products_image_large)) {
if (!file_exists(DIR_WS_IMAGES . 'medium/' . $second_medium_image_check)) {
$products_image_large = DIR_WS_IMAGES . $file;
} else {
$products_image_large = DIR_WS_IMAGES . 'medium/' . $second_medium_image_check;
}
} else {
$products_image_large = DIR_WS_IMAGES . 'large/' . $products_image_large;
}
//end added image checking
make sure you create a backup copy, not actually tested this, just off the top of my head..PHP Code:
//added image checking image swap and jquery zoom
$products_image_extension = substr($file, strrpos($file, '.'));
$products_image_base = str_replace($products_image_extension, '', $file);
$products_image_medium = $products_image_base . IMAGE_SUFFIX_MEDIUM . $products_image_extension;
$products_image_large = $products_image_base . IMAGE_SUFFIX_LARGE . $products_image_extension;
//added for additional medium checking
$second_medium_image_check = $products_image_base . IMAGE_SUFFIX_MEDIUM . $products_image_extension;
// check for a medium image else use small
if (!file_exists($products_image_directory . 'medium/' . $products_image_medium)) {
$products_image_medium = $products_image_directory . $file;
} else {
$products_image_medium = $products_image_directory . 'medium/' . $products_image_medium;
}
// check for a large image else use medium else use small
if (!file_exists($products_image_directory . 'large/' . $products_image_large)) {
if (!file_exists($products_image_directory . 'medium/' . $second_medium_image_check)) {
$products_image_large = $products_image_directory . $file;
} else {
$products_image_large = $products_image_directory . 'medium/' . $second_medium_image_check;
}
} else {
$products_image_large = $products_image_directory . 'large/' . $products_image_large;
}
//end added image checking
Ha ha!
I found the code!
I must have included that at some point. But there is a weakness there because of the way it uses explode. It will not account for sub-directory use.Code:if(sizeof($images_array))
{
// add in main image
$im = explode('/',$products_image);
$im = array_reverse($im);
$images_array[] = $im[0];
}
Not sure why I didn't just use $products_image_base. Maybe that doesn't have the extension? Need to go through the logic and check.
@chad
let me know if that ammendemnt above works for you.
@chad looks like you got it sorted?
Have you changed the js or css settings? How comes your zoom is set away from the main image?
philip:
VERY close:
http://96 .30. 58.67/index.php?main_page=product_info&cPath=6_110&products_id=460
You'll notice that I the image swaps, and jqzoom works (correctly) , but the base image doesn't resize to the dimensions of the swapped image... did I explain that right?
Is this a situation where additional images would have to be the same "shape" as the main image?
-chadd
Hmm not sure I completely follow.
I would suggest for it to work properly all images should be to the same scale otherwise some would appear to be zoomed and others not.
Again not sure why your zoom window is not the main image area as it should be?
In other words to me it looks like you have set your zoom window to a value you have chosen and your additional images are actually smaller than the window. That make sense?
he is not using 'innerzoom' in the initialisation.
I would suggest that if you don't want a zoom feature to go for image handler if you just want lager images to show when you hover.
If you really want the zoom effect then use the inner zoom so that it actually appears that you are zooming the in on the image in the main product image position