Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hey,
I'm working on a theme with a transitions manager called Highway.JS. This means no page reloading, which also means no reloading of the product page which renders the dynamic checkout button. My question is if there's any way to load the dynamic checkout button through JS, so I can include that in my own javascript to render it manually instead of Shopify rendering it itself through a page load.
Thank you!
Yes. Use
Shopify.PaymentButton.init()
Thank you!
Haven't tried it out yet, but I'm wondering how you found out?
I was also looking for a solution (that’s how I found your thread) because I was using BarbaJS, and I finally found by checking the Shopify object in the console 🤓.
Almost a year later and now I finally had some time to check it out! Whenever I run Shopify.PaymentButton.init(), the button renders disabled and there are no event handlers to navigate to the payment screen. Any way to fix this?
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024