Hello,
I’m a PHP/JS developer and I’m trying to debug an issue for a client of ours. The client has a WordPress site which allows visitors to register for online or in-person courses. Each course page uses Shopify “Add to Cart” buttons added to their pages via a chunk of Javascript. The script essentially loads buy-button-storefront.min.js from the Shopify CDN and then runs the ShopifyBuyInit() function which uses variables to render the options and buy button in an iframe (image below).
When working successfully, clicking the Add to Cart button will add the selected item to the cart and pop open the Shopping Cart itself, which slides in from the right side of the screen. However this is where we are seeing an issue. The item is always added to the cart, but intermittently the cart will not open, and a loading spinner will be displayed instead. The spinner simply sits there and the cart will not open. Refreshing the page will usually fix the issue and allow the cart to be displayed. I’ve looked at the console when this happens and the site does not seem to be throwing an JS errors.
I’m not sure if there’s something we can even do on our end to fix this. The JS is from Shopify, the buy button is being rendered in an iframe from Shopify, the cart is from Shopify, even the loading spinner is from Shopify. If there’s something we can fix we are more than happy to do it. As you can imagine, this is very confusing to potential customers, and is surely blocking some sales for our client. If there’s anything we can do, any avenue we can investigate, tests we can run, or anything else you need from us, please let me know.
The site is https://www.bomicanada.ca (Shopify account is ‘bomi-education’). You can usually reproduce the issue on the first few visits to the site; simply click Register in the main menu, then click the Choose Your Course button. On the resulting page, select any course, and then add to your cart from the subsequent page.
Thank you!
m.
