Home About Blog Terms Docs Contact

Single-page apps/stores


Useful for headless stores using Javascript frameworks like React etc.

On a single page app, PreProduct’s script may not get reinitialized for each new product page. This causes an issue where the pre-order front-end doesn’t load. The below snippet should solve that issue.


if (typeof(ppPledgeDiv) != `undefined`){
  var ppPledgeDiv = document.getElementById(`preproduct-pledge`);
  let checkForPreorders = async() => { PPgetListingViaAPI() };