Volume discounts allow for merchants to provide a discount depending on how many eligible item is in a cart / subscription.
Front End Script
Below is the front-end code that will fetch a list of rules from the Skio API and select the eligible volume discount rule that would apply. Upon hitting the checkout button, a discount code will automatically be added to the cart to apply the volume discount.
For Shopify Plus, we recommend creating a custom script that matches the setup in Skio to automatically apply the discount.
Volume discounts will be updated to use Shopify Functions, which will work for both Plus and non-Plus merchants in the near future.
Create this file assets/skio-volume-discount.js and copy in the large code block below.
On all pages that have a checkout button, make sure to include this script using this script include.