DomBrady Posted May 20, 2023 Share 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 Link to comment
paul2009 Posted May 21, 2023 Share 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 About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥. Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links. Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional. Link to comment
DomBrady Posted June 4, 2023 Author Share 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. Link to comment
dossdesignandco Posted July 14, 2023 Share Posted July 14, 2023 I am seeing the same thing. Any update? Link to comment
Hungryfijian Posted March 12 Share 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 Link to comment
mkalnicki Posted March 28 Share 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> Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment