We're working on speeding up our website.
Currently we have the restock notification form in our theme.liquid as per following this page: https://help.klaviyo.com/hc/en-us/articles/360001895651-How-to-Install-Back-in-Stock-for-Shopify
Is that code able to be added just on the product page? As i think having it in theme.liquid causes it to load on places like the homepage too etc.
Just thinking if I can add it to product pages in Shopify OS2.0 as a liquid block as shown.
Will that work okay?
Best answer by DovView original
Thanks for this update.
I’m afraid the community team is not equipped at this time to conduct tests on individual users’ websites.
For a second set of eyes on this, I recommend reviewing this with a member of our support team (if you’re using one of our support themes). If you are using a custom theme, I recommend reaching out to one of our wonderful partners for further assistance.
Thanks for being a community member.
Thanks for your reply. I have since added the restock script to our product page custom blocks instead of theme.liquid - can you kindly have a quick test on your side to see if it all works as it should for you?
Normal sold out product: https://proteinpackage.co.uk/products/grenade-carb-killa-protein-bar-gingerbread-festive-limited-edition
Variant sold out: https://proteinpackage.co.uk/products/per4m-advanced-whey-protein-powder-2-01kg-67-servings
Thanks for sharing this question with our community.
This is an interesting question. You certainly can add the code into the discrete product files if wish, but I cannot say definitively if it will help speed up your site.
Your best bet is to create a test Shopify store and Klaviyo account and use that as a staging environment for testing using the Back in Stock snippet in the product files and then evaluate the difference in speed.
I hope that’s helpful.