Heads up: this setup requires a Shopify Plus store with both Checkout Plus and Discount Plus installed.
Want to give a free gift with purchase on Shopify when a customer enters a discount code? Here's how. Discount Plus makes the gift free with a code like FREEGIFT, and Checkout Plus adds the gift to the cart automatically when that code is applied.
It's a simple gift with purchase (GWP) promo: the customer types the code, and the gift shows up in their order marked FREE. No hunting for the product, no extra steps.
Prefer video? Watch How to automatically add products to your customer's carts when they apply a discount code.
Before you start
A Shopify Plus store
Checkout Plus installed
Discount Plus installed
Working on a development or staging store? Checkout Plus and Discount Plus are free on development and staging stores. See How to Get the Free Staging & Dev Plan for Checkout Plus and Discount Plus.
Your gift product set up in Shopify, with enough inventory for your promotion
One discount code you'll use in both apps, like
FREEGIFT. It has to match exactly in both.
Step 1: Create the free gift discount code in Discount Plus
In Shopify admin, open Apps → Discount Plus.
Under Discount Types, select Create on Product Discounts.
In the Create Product Discounts dialog, select Create next to Free Gift.
On Create Free Gift Discount, under Step 1: Basic Information, pick the Discount code tab.
Enter a Discount Title and your Discount Code, like
FREEGIFT. Customers must enter this code at checkout.Optional: set Usage Limits and Discount Combinations to fit your promo.
Scroll to Free Gift Selection and select Select Free Gift Product. Pick your gift. It shows under Selected Free Gift.
Set Maximum number of products this discount applies to to
1so only one gift is free per order.Select Save at the top.
Step 2: Auto add the free gift with purchase in Checkout Plus
In Checkout Plus, under App blocks, select Customize your Checkout. You can also start from the Gift With Purchase card under Popular Customizations.
Open Auto Add Product (Gift with Purchase) and select Manage, then create a customization to open the Auto Add Gift/Product To Cart Editor.
Enter a Customization Name, like
Free Gift Example.Under Select Condition, pick Discount Code Present.
In Discount Code (exact), enter the same code you made in Discount Plus, like
FREEGIFT.Under Remove gift when the trigger is no longer met, keep Remove gift from cart when condition is not met (recommended) and Only remove if added by this app checked.
Make sure Status in the Summary is Active.
Under Step #3: Select Products to add to the cart at Checkout, select Select Product and pick the same gift product you chose in Discount Plus.
Optional: use Variants in this offer, Quantity, and Enforce Quantity Limit to fine tune the gift.
Under Optional Settings, check Product becomes free when added to cart (with automatic discount codes). This is the key setting. The gift is only added automatically if it becomes free from a discount code. If it's not free, it's offered as an optional add-on instead.
Select Save.
Step 3: Add the gift block in the Checkout Editor
Open the Shopify Checkout Editor. Under Order summary, select Add block.
Search
giftand, under Checkout Plus, pick Auto Add Product (Gift with Purchase).
Optional: under Checkout behavior, turn on Include block in Shop Pay.
Select Save.
Step 4: Test your free gift
In the checkout preview, enter your code (like
FREEGIFT) in Discount code or gift card and select Apply.
Your gift is added to the order marked FREE, with the code tag showing.
Remove the code and check that the gift is removed too.
Check both mobile and desktop checkouts.
Do the codes need to match?
Yes. The Discount Code in Discount Plus and the Discount Code (exact) in Checkout Plus must match exactly. If they don't, the gift won't be added.
What if the gift isn't free?
Checkout Plus only adds the gift automatically when it becomes free from the discount code. If it isn't free, it's offered to the customer as an optional add-on instead.
What happens if the customer removes the code?
With Remove gift from cart when condition is not met (recommended) checked, the gift is removed when the code is removed. Only remove if added by this app keeps the product in the cart if the customer added it themselves.
Troubleshooting
No gift at all: check that you're on a Shopify Plus store, both apps are installed, and the Auto Add Product (Gift with Purchase) block is added in the Checkout Editor and saved.
The gift isn't added when the code is entered: check that the codes match exactly in both apps and the customization's Status is Active.
The gift is offered instead of added: the gift isn't free yet. Check that the same product is picked in both apps and Product becomes free when added to cart (with automatic discount codes) is checked.
The gift stays after the code is removed: check Remove gift from cart when condition is not met (recommended).
Need help? Message us from either app (click Contact Us in Checkout Plus or Contact us in Discount Plus) and tell us what gift offer you're setting up.
Ready to try it? Install Checkout Plus and Discount Plus from the Shopify App Store.















