Context: I have a website with some products that have only a single product image (= there is only featured image set and no gallery images). In Kalium (version 3.0.1) settings, I have "Main Image with Thumbnails Below" layout active for single product pages.
Problem 1: I find it distracting to have a carousel displayed with a single thumbnail only underneath the main product image. More so as the thumbnail is useless, because clicking it does nothing (it links to already displayed image).
My attempt to solve it (does not work): I found out there is kalium_woocommerce_skip_featured_image_in_carousel filter available, it solves my problem for products without gallery images, but creates additional problem (see problem 2 below) for products with gallery images.
Problem 2: When the kalium_woocommerce_skip_featured_image_in_carousel filter is set (= returns true) relation between main images in slider and thumbnails in carousel is one image off, because there are only N thumbnails in carousel, but N+1 images in slider. So the 1st image in carousel, which is the 1st product gallery image, links to 1st image in slider which is the featured image, instead of linking to the 2nd image in slider...
Solution: Do not display the thumbnails carousel when there is only one image to display or make it possible to opt in for such behavior via a filter. I have a feeling that kalium_woocommerce_skip_featured_image_in_carousel filter has been designed with this use case in mind, but unfortunately it has its issues as described above.
I understand the point here, a great idea so I have made a fix for this, here are the files you can replace:
1. Download this file and replace it in this directory (of the theme): /kalium/includes/functions/template
2. Download this file, extract and replace it in this directory (of the theme): /assets/js
If you don't see the change immediately, please hard-refresh your browser (CTRL/CMD+R) because it takes longer to load the changes, as they are saved in browser cache. Another option is to open new private/incognito window and try if it works.
If this works fine for you we will implement in the next release.
I've replaced both files and it works as expected: no carousel if there is a single product image only. And once the carousel is there (product has more than one image), it is linked with slides properly.
Context: I have a website with some products that have only a single product image (= there is only featured image set and no gallery images). In Kalium (version 3.0.1) settings, I have "Main Image with Thumbnails Below" layout active for single product pages.
Problem 1: I find it distracting to have a carousel displayed with a single thumbnail only underneath the main product image. More so as the thumbnail is useless, because clicking it does nothing (it links to already displayed image).
My attempt to solve it (does not work): I found out there is kalium_woocommerce_skip_featured_image_in_carousel filter available, it solves my problem for products without gallery images, but creates additional problem (see problem 2 below) for products with gallery images.
Problem 2: When the kalium_woocommerce_skip_featured_image_in_carousel filter is set (= returns true) relation between main images in slider and thumbnails in carousel is one image off, because there are only N thumbnails in carousel, but N+1 images in slider. So the 1st image in carousel, which is the 1st product gallery image, links to 1st image in slider which is the featured image, instead of linking to the 2nd image in slider...
Solution: Do not display the thumbnails carousel when there is only one image to display or make it possible to opt in for such behavior via a filter. I have a feeling that kalium_woocommerce_skip_featured_image_in_carousel filter has been designed with this use case in mind, but unfortunately it has its issues as described above.
Best regards,
Česlav
Hi Ceslav,
I understand the point here, a great idea so I have made a fix for this, here are the files you can replace:
1. Download this file and replace it in this directory (of the theme): /kalium/includes/functions/template
2. Download this file, extract and replace it in this directory (of the theme): /assets/js
If you don't see the change immediately, please hard-refresh your browser (CTRL/CMD+R) because it takes longer to load the changes, as they are saved in browser cache. Another option is to open new private/incognito window and try if it works.
If this works fine for you we will implement in the next release.
Hi Arlind,
I've replaced both files and it works as expected: no carousel if there is a single product image only. And once the carousel is there (product has more than one image), it is linked with slides properly.
Thanks for listening to customers' feedback :-)
Kind regards,
Česlav
Hi Česlav,
I'm very happy to hear that, and thanks to you too for reporting this problem. We will include the fix in the next theme update too.
Have a great day!
P.S: If you like our theme, it would help us a lot if you could give us a five star rating on themeforest from your Downloads tab.
A huge thank you from Laborator in advance!