Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I uploaded 4 images for my product, but landing on the page it only shows 3 images. However, when I select the color variations that's when they show the right images. The part that really bothers me is that on mobile, it says I have 4 images but I can only scroll to the third image. And then when I click on a variation, it says I have 3 images for that variation when I actually just have 2. I don't want my customers struggling to scroll for the last image and getting frustrated when there's nothing there.
This is an issue across all my products. For some products, the displayed amount of images fluctuates up and down. It'll say there's 4 images in the slide, but there's actually 5 so the slider says 5/4. On the same product but different variation, it'll say there's 6 images but you can only slide to the 5th image. And so then the slider says 5/6
My shop url is yours2keep.store
I followed a tutorial to link color variations to specific images using this video.
Image Slider says 5/6 but there's only 5 images available for this variation
Image Slider says 5/4 which shouldn't be possible
Hello.
Quick solution:
1. Go to the https://yours2keep.store/admin/themes
2. Actions-Edit Code
3. Select Layouts-theme.liquid
4. Add this code to the bottom of page. Before </body> tag.
<script>
(() => {
try {
const total = document.querySelector(".slider-counter--total");
total.innerText = parseInt(total.innerText) - 1;
} catch (e) {}
})()
</script>
Result should be looks like:
There's no Layouts-theme.liquid on Dawn theme 9.0
uncheck this box