Apply Discount
Give a percentage, fixed or per-item discount to the customers, carts and items you choose. It’s the most flexible discount template. A Playwright Checkout Rules template for cart, pricing and discount codes.
What it does
When the rule’s conditions match, Playwright discounts the selected items, cheapest first, up to the maximum number of items you set.
Use it for VIP and wholesale pricing, first-order offers, discounts on a collection of products, or removing tax for tax-exempt customers.
For example:
- 10% off the 5th order for VIP customers
- No tax charged to customers tagged with 'tax-exempt'
Settings
Find it under Line Item Rules in Playwright, in Other. Give the rule a name, fill in these settings and select Save Rule.
- All or any criteria
- Whether all of the conditions you set must match for the rule to apply, or any one of them. Conditions left at “All” aren’t counted. See All or any.
- Apply discount if ALL of the following criteria are met
- Apply discount if ANY of the following criteria are met
- Eligible Customers
- Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See customer conditions.
- Eligible Carts in Checkout
- Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See cart conditions and destination conditions.
- Eligible Line Items in Cart
- Which items in the cart get the discount: “All” items, one product condition, or a Multi-Select. See product conditions.
- Discount to apply
- The discount to give, with the message customers see next to it at checkout. Every discount rule needs one: with “None” the rule does nothing.
- Percentage Discount: Takes a percentage off the price of each selected item. 100 makes it free.
- Fixed Total Discount: Takes up to a total amount, in dollars, off the selected items. Discount items to $0 until maximum reached discounts one item after another until the amount is used up; Split discount between items spreads it over the items in proportion to their prices.
- Fixed Per Item Discount: Takes a fixed amount, in dollars, off each selected unit. A price never goes below $0.
- Tax Discount: Removes the tax included in the price, for customers who shouldn’t pay it when your prices include tax. Enter the tax rate your prices include, as a percentage.
- Maximum items to discount
- The most units the rule discounts in one order, cheapest first. Enter 0 for no limit.
Example: 10% off for VIP customers
- Eligible Customers: Customer Tags, Does, Match one of,
VIP. - Eligible Line Items in Cart: All.
- Discount to apply: Percentage Discount, 10, message “VIP 10% off”.
- Maximum items to discount: 0.
At checkout: A signed-in customer tagged VIP sees every item 10% off at checkout, labelled “VIP 10% off”. Other customers pay full price.
On Shopify Functions
Playwright publishes this template as part of the Shopify discount “Playwright: discount rules”, and as “Playwright: discount codes” when its rules check for codes.
It runs as it did with Shopify Scripts.
These conditions aren’t available in discount rules, so a rule that uses one isn’t published:
- Customer Accepts Marketing: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead.
- Has Properties: Line item properties aren’t available to Shopify Functions.
- Cart Total Weight: Cart weight isn’t available to Shopify Functions.
- PO Box Qualifier: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules.
- Full Address Qualifier: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules.
- Compare to billing address: Shopify Functions can’t compare billing and shipping addresses here.
- Discounted Cart Subtotal (applied by discount code): Shopify Functions only see the discount code itself, not its type or value.
Tag conditions match whole tags only. See Conditions and Publishing.