Skip to content
Docs menu

Free Gift with Purchase (based on shipping address)

Make a gift item free for orders shipping to certain countries, provinces or postal codes. A Playwright Checkout Rules template for cart, pricing and discount codes.

What it does

When the shipping address matches and the gift is in the cart, Playwright discounts one unit of the gift. The discount starts at 100% with the message “Free gift with purchase!”.

Shopify Functions can’t add items, so customers add the gift themselves. Discount rules can’t see street addresses, so PO box and full address conditions aren’t available here.

For example:

  • Canadian customers receive a free pair of mittens

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.

Eligible Cart Shipping Addresses
Which shipping addresses qualify: by country and province, country code or postal code. See destination conditions.
Free Gift Item
The gift: a product or variant condition that matches it. 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: Free mittens for Canada

  1. Eligible Cart Shipping Addresses: Country Code Qualifier, Is one of, CA.
  2. Free Gift Item: Product ID, Is one of, the mittens’ product ID.

At checkout: Once a Canadian shipping address is entered at checkout, mittens in the cart are free.

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.
  • 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.

Tag conditions match whole tags only. See Conditions and Publishing.