How to automatically add free gift to cart when spending threshold is met (without third party apps)

Hello,

Does anyone know how I can automatically add free gift to cart when a customer meets spending threshold without having to use a third party app?

I’m aware of the “buy X get Y” discount but don’t like how the customer has to add the free gift/product to their cart themselves.

Without a 3rd party app, your best bet is to write the code yourself, using the AJAX Cart API:

https://shopify.dev/docs/api/ajax/reference/cart

Hi Bhristopher,

There is an app that can fulfill your need, if you wanna try the 3rd-party one, give a try on this BOGO+ Buy X Get Y & Free Gift.

With BOGO+, you can offer gift based on cart value. For example, if the cart value reached $100, the gift would be automatically added to the cart. Or you can show the gift via pop-up notification.

For better visualization, you can check in the demo store.

Currently, the built-in Shopify “Buy X Get Y” discount doesn’t automatically add a free gift to the cart. Instead, customers still have to manually add the free gift themselves to apply the discount.

If you’re looking to fully automate this (auto-add/remove based on cart value), it’d require a third-party app. Once customer meet the threshold, they will have the gift right away in their cart.

To visualize what I’m saying, I will use BOGOS: Free Gift, Discounts & Bundles app to show you as an example:

Untitled design.gif

Otherwise, you can search “Free Gift” keyword on the Shopify App Store to explore other app options.

Hope it helps your business,

Ellie

You can do this by writing a Shopify Script (for Plus) or a JavaScript/Liquid function in your theme. Use cart logic to check when the cart total passes your threshold, then use Shopify’s AJAX API to add the gift product variant ID automatically. Now we’re cutting out third-party apps completely.

Hello @bhristopher

Based on your requirements, if you’re open to using a third-party app, we recommend trying the Discount Ray – Wholesale Pricing app.

This app includes a Personalized Discount feature that allows you to automatically add a free gift product to the cart when a customer reaches a specific spending threshold. The gift product will be preselected automatically, so customers don’t need to choose it themselves.

You can check out the demo product we’ve uploaded for reference.
The app also offers a 14-day free trial, allowing you to explore its features before making a decision.

If you’d like, we can also share a sample product setup to help you get started.

Thank you.