Hi everyone, for some weird reason our product images dont show, its only on a few ones and on desktop.
On mobile they all work but some in desktop don’t.
URL is www.lunalucente.com
Hi everyone, for some weird reason our product images dont show, its only on a few ones and on desktop.
On mobile they all work but some in desktop don’t.
URL is www.lunalucente.com
Hello [email removed]
You can add code by following these steps
.m-product-media--slider .swiper-container,
.m-product-media--slider .nav-swiper-container {
opacity: 1;
}
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
No thats not the issue, some product images aren’t showing, but the ones that are showing are good, so no need to change the appearance of the slider.
Slider doesn’t work in it.
Shows errors in console, needs to be fixed. It is possible that the slider is not working due to errors.
And how can we fix that?
There are Javascript errors in your theme.
In particular, function getProductJson in the following files: product-media.js, product-media-mobile.js and variant-picker.js.
You should contact the theme developer as their demo site has these errors fixed.
Quick fix – the function should look like this:
getProductJson() {
const e = document.querySelector("#productData[type='application/json']");
try {
if (!e) throw new Error("Product data element not found in the container.");
return JSON.parse(e.textContent)
} catch (e) {
return null
}
}
The productData script tag should be moved inside an element with the m-main-product–wrapper class so that the error is not displayed in the console.
Hi, thanks for the tip! In which file can we find these lines?
Hi,
Thanks for the clear tips, where can we implement the quick fix?
The theme code, frankly, looks inconsistent, but, you should go to your theme assets, open each of the files I mentioned (product-media.js, product-media-mobile.js andvariant-picker.js, maybe product-card-swatch.js if you use swatches), search for function getProductJson, and replace it with the code I’ve provided.
It’s possible that the file is minified (looks like one long line of code), then it would be a bit more complex, I’d recommend enlisting someone to help you, preferably theme developers…
The theme code, frankly, looks inconsistent, but, you should go to your theme section and snippets, open each of the files I mentioned (product-media.liquid, media.liquid, main-product.liquid), search for productData id, and move inside an element with the m-main-product–wrapper class.