When clicking on inactive tabs the Shopify Buy Button does not display as it seems the embedded Shopify script is not firing when switching between tabs. Maybe a tab animation issue?
If you inspect where the Buy Buttons on the inactive tab pages the button magically appears and all the code is there that needs to be.
The problem is that Shopify CSS interferes with Webflow’s tabs CSS script. An easy way to fix is to put the following CSS script into the <head> of the page where your products are.
Hello @dynamo and @dmitry_deskree were you able to resolve this issue? I’m currently having the same dilemma and i’m not sure if I have put the right code as well since I don’t have any coding background. Your response would be a huge help. Thank you!
I’ve noticed this same issue. The problem occurs when a Shopify Buy Button embed is in a parent that starts off as “display: none” on page load. The code is still there but the browser won’t recognize it until the window is resized with the embed no longer on “display: none.”
My workaround was to create a Page Load Interaction that loads the buy button embeds (or their greatest parent) as “display: static” and then returns them to their normal initial state once the page finishes loading. As this is a tedious process, any code that would be simpler than this workaround would be greatly appreciated.
Hi Henry - pewww… so happy that I read your post on this - as I do see the shopify content when resizing window (I would never have tried if I had not read your post)
I’m wondering if you ever found another workaround than the page load interaction?
Hoping to hear from you soon as I’ve been struggling with this for way too long ;-/
Best regards, Louise from Denmark
I know this is an old comment, but this solved my problem thank you! Created a pre-loader page and suddenly my buy button stopped loading on my initial page load but it would appear after I opened developer tools. So glad I found this forum.
Any way you could share a screenshot the page load interaction setup? I’m not quite able to figure out the “returns them to their normal state” aspect.
I’d love to second this…a video of the whole process would be amazing!
Will this slow the page down much? I’m building a business that requires me to have nearly 40 collection buy buttons on every partner’s webpage…I must have tabs in order to organize it properly… (love to hear if anyone has an opinion on if you think that will be a problem…)
I tried inserting the script in the head section recommended by [dmitry_deskree], but this did not work for me…seems like enough people are having this issue that webflow should provide a native solution…
@Wade_Luplow
Add this to the before-/body custom code area of your page-
The Shopify button is created by a script, and it seems to recalculate and redraw the button & product content on browser resize. Since it’s initially hidden that doesn’t happen.
Here, we listen for tab click events, and when one happens, we wait 200ms for Webflow.js to display that content and then we trigger a resize so that the shopify button script is notified to redraw.