To use the package, install the script in your theme's head before the closing tag
Please note that you should NOT use defer or async, which allows the script to load and be ready for use before the DOM content is loaded. The script is loaded from a CDN, so download times are typically below 40ms.
Once Shopify-Permalink.js is included, the package becomes globally available at
window.ShopifyPermalink. You can now easily create new Cart-backed Checkouts for your customers!
Instead of using Shopify's Storefront API to create a new Checkout with their cart contents, you can instead create a new
ShopifyPermalink object and simply call the
go() method to redirect the customer to the checkout process.
Additionally, you can set options on the ShopifyPermalink to automatically apply discount codes, pre-populate customer information such as email, phone, and shipping address, or set order attributes for tracking.