Free Gift with Purchase (based on cart subtotal)
Make a gift item free when the cart’s subtotal is over (or under) an amount, like “spend $50, get a free scarf”. A Playwright Checkout Rules template for cart, pricing and discount codes.
What it does
When the subtotal condition matches and the gift is in the cart, Playwright discounts one unit of the gift. The gift’s own price counts toward the subtotal, so set the amount with that in mind.
The discount starts at 100% with the message “Free gift with purchase!”, and you can change both. Shopify Functions can’t add items, so tell customers to add the gift themselves, for example on the product page or in your cart.
For example:
- Spend $50 and get a free scarf
Settings
Find it under Line Item Rules in Playwright, in Free Gift with Purchase. Give the rule a name, fill in these settings and select Save Rule.
- Cart Subtotal
- The amount the cart’s current subtotal must be greater than, less than or equal to, in dollars. The gift’s price is included.
- Free Gift Item
- The gift: a product or variant condition that matches it, such as its Product ID or Variant ID. See product conditions.
- Discount and Message
- How much off the gift (100% makes it free) and the message customers see.
- Percentage Discount: Takes a percentage off the price of each selected item. 100 makes it free.
Example: Spend $50, get a free scarf
- Cart Subtotal: Greater than or equal to, 60 (the scarf is $10).
- Free Gift Item: Variant ID, Is one of, the scarf’s variant ID.
- Discount and Message: 100, “Free scarf over $50”.
At checkout: A customer with $50 of other items adds the scarf, the subtotal reaches $60, and the scarf is free. Without the scarf in the cart, nothing changes.
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.
- Functions can’t add the gift: it is only discounted when the buyer has added it.
These conditions aren’t available in discount rules, so a rule that uses one isn’t published:
- Has Properties: Line item properties aren’t available to Shopify Functions.
Tag conditions match whole tags only. See Conditions and Publishing.