Hello all, I am currently trying to integrate the “Back in stock” button/modal on a landing page of a Shopify store.
So far I managed to correctly add the button, my main problem is that it looks like that the onsite.js is not loading the product/variation information. Without that data, when clicking on the button I get a “Uncaught TypeError: Cannot read properties of undefined (reading '0')”.
Checking the console it looks like Klaviyo / Onsite is loading, but it does not initialize the product data, like it does in the product page:
[Klaviyo / Onsite] Initializing.
[Klaviyo / Onsite] Executing: init
[Klaviyo / Onsite] Executing: enable
While on the product page i get:
[Klaviyo / Onsite] Initializing.
[Klaviyo / Onsite] Executing: init
[Klaviyo / Onsite] Executing: enable
[Klaviyo / Onsite] Variants: 5 Unavailable Variants: 5
[Klaviyo / Onsite] Selected Variant: 12345
I skimmed through the documentation but I cannot find anything useful, is there anything I can look for to initialize the product data correctly?
Thanks

