Not sure if this is a bug or 'as designed', but in version 4.3.4 the product thumbnail image that is shown on the category page is taken from the first product option image versus the default product thumbnail.
For example, we have a product that comes in multiple colors and of course we have all these images available as one chooses an option to see. It works great on the Product page, but not on the Category page.
The main Thumbnail image we added to the product is when it is red. On the Category page, the product is showing in black. This is because the first option color is black (alphabetical).
How do we tell cs-cart to ignore the option images on the Category page for a product and show the default uploaded thumbnail. Is there a setting or code I need to change to tell cs-cart to show the default thumbnail loaded for a product on the Category Page?
Thanks,
David
Note, if I disable the option that has many color variants, on the Category page it correctly shows as red (which is the product thumbnail image).
I also confirmed this only happens when the product option type is set to simultaneous. When I set the product option type to sequential, the image shows correctly as red on the Category Page. When I switch it back to simultaneous it shows as black (the first option variant). It seems like a bug to me so I submitted it to the bug tracker.
David, it looks like a bug. Try to reproduce it on the demo store and post to the bug tracker
OK, I got tired of waiting for cs-cart to fix this bug, so I fixed it myself.
In fn.catalog.php
change
if (!empty($params['get_icon']) || !empty($params['get_detailed'])) {
// Get product options images
if (!empty($product['combination_hash']) && !empty($product['product_options'])) {
$image = fn_get_image_pairs($product['combination_hash'], 'product_option', 'M', $params['get_icon'], $params['get_detailed'], CART_LANGUAGE);
if (!empty($image)) {
$product['main_pair'] = $image;
}
}
}
TO
if (!empty($params['get_icon']) || !empty($params['get_detailed'])) {
// Get product options images
if (!empty($product['combination_hash']) && !empty($product['product_options'])) {
$image = fn_get_image_pairs($product['combination_hash'], 'product_option', 'M', $params['get_icon'], $params['get_detailed'], CART_LANGUAGE);
if (!empty($image)) {
//DAVID MOD - Don'show option photo on Category Page
if ($_REQUEST[dispatch] != 'categories.view'){ $product['main_pair'] = $image; }
}
}
}
Thank you for sharing this information