Build a discounts function

You can create a new type of discount that's applied to a particular product or product variant in the cart. In this tutorial, you'll use Shopify Functions to create a new discount type called "Volume discount" that offers a percentage off when customers purchase more than the minimum quantity of a product.