DomBrady Posted May 20, 2023 Posted May 20, 2023 (edited) Hello support, Product variant images seem to only work on the 'Shop' page. Whenever I insert a product block on any other page, the following happens: The featured image always displays, but... ...whenever you select a different image, the inventory image simply disappears completely. It does this for every product that we are selling. We have triple checked that all the variant options are correct and linked to images. And, as said, they work perfectly fine on the shop page. Have pictures attached showing step by step what happens. Thank you, Dominic Edited May 21, 2023 by DomBrady
paul2009 Posted May 21, 2023 Posted May 21, 2023 (edited) On 5/20/2023 at 9:41 PM, DomBrady said: Product variant images seem to only work on the 'Shop' page. Whenever I insert a product block on any other page, [the second and subsequent images disappear] @DomBrady This is a bug. According to Squarespace Customer Care, Engineering teams are currently prioritizing a fix for this [21 May 2023]. Did this help? Please give feedback by clicking an icon below ⬇️ Edited July 15, 2023 by paul2009 Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
DomBrady Posted June 4, 2023 Author Posted June 4, 2023 Thanks. It is been there a long time. If you hear anything, I would love to hear it. Surprised noone else seems to have mentioned it.
Hungryfijian Posted March 12 Posted March 12 (edited) I've raised the issue as well, and just now, after almost a year, there's still no fix. Is there any code I can add to fix this, in my mind, major issue with Squarespace? Selecting the colour and the pair or single option should show the desired image, as it does in the main store, but it just removes the standard image and shows none. This is essential for my customers to be able to choose a product. Does anyone have any suggestions; code or workarounds? https://www.pockethearing.com/signia-silk-x Edited March 12 by Hungryfijian
mkalnicki Posted March 28 Posted March 28 I ran into this issue and in my case it looks like the other variant images lack the src attribute for some reason. I was able to hack a workaround for this. If you add this to your header code you should be able to see the other images: <script> document.addEventListener("DOMContentLoaded", function() { // Find all variant images var imgTags = document.querySelectorAll('img.sqs-product-block-variant-image'); imgTags.forEach(function(img) { // Check if the img tag has a src attribute if (!img.hasAttribute('src')) { // If it doesn't have a src attribute, add one from the data-src attribute var dataSrc = img.getAttribute('data-src'); if (dataSrc) { img.setAttribute('src', dataSrc); } } }); }); </script>
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment