Hi everyone,
I’m trying to run a promo where customers who spend XX € or more can enter a discount code (e.g. FREEGIFTXX) and automatically receive a specific product for €0—without needing to add the gift to the cart themselves.
The built‑in Buy X Get Y discount works, but only after the customer manually adds the gift to the cart—too much friction.
My setup: Basic Shopify plan (no Shopify Plus → no Script Editor / Functions).
What I’ve tried
-
Searched the App Store for “free gift” and “buy X get Y” apps.
-
Found a few options, but none of them offers what I need.
What I’m looking for
If you have this working—or know an app that ticks all the boxes—I’d love to hear your recommendations.
Thanks a lot for your help!
Andraz R.
5 Likes
Hi Andraz,
So, here’s the thing:
- Discounts in Shopify can ONLY reduce prices of products/the order subtotal/delivery methods. They can’t do additional things, such as adding items to the cart.
- In addition, in the checkout, where discount codes are entered, you can’t add custom code unless you’re on Shopify Plus. Creating custom apps based on Shopify Functions, or using the Checkout UI Extension API is only for Plus.
So, there’s no way for you to achieve this without Plus.
Best,
Tobe
Andraz,
Lesle this side from Dollarlabs Ultimate Discounts - what you’re looking for is achievable on Plus through a combination of Checkout UI extension + Discount functions to ensure that this experience works for the user at the checkout screen.
If that’s not a huge concern however, you can have a simple JS script add the free product to cart when the cart has a discount code applied on it. Note that this will fail to execute on checkout.
Here’s a sample snippet that gets you started on the right track without using any app.
document.addEventListener('DOMContentLoaded', function () {
const TARGET_DISCOUNT_CODE = 'TESTODD'; // The discount code to look for
const BONUS_VARIANT_ID = 44576722157771; // Replace with your bonus product's variant ID
const BONUS_PRODUCT_QUANTITY = 1;
// Helper to check if bonus product is already in cart
function isBonusInCart(cartItems) {
return cartItems.some(item => item.variant_id === BONUS_VARIANT_ID);
}
// Add bonus product to cart
function addBonusProduct() {
fetch('/cart/add.js', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ id: BONUS_VARIANT_ID, quantity: BONUS_PRODUCT_QUANTITY })
})
.then(res => res.json())
.then(data => {
console.log('Bonus product added to cart:', data);
sessionStorage.setItem('bonus_added', 'true');
location.reload(); // Refresh cart to reflect update (optional)
})
.catch(err => console.error('Error adding bonus product:', err));
}
// Main logic
fetch('/cart.js')
.then(res => res.json())
.then(cart => {
const appliedDiscounts = cart.cart_level_discount_applications.map(d => d.title.toUpperCase());
const bonusAlreadyAdded = isBonusInCart(cart.items);
if (appliedDiscounts.includes(TARGET_DISCOUNT_CODE) && !bonusAlreadyAdded && !sessionStorage.getItem('bonus_added')) {
addBonusProduct();
}
})
.catch(err => console.error('Error fetching cart:', err));
});
Note that this doesn’t apply a discount to the product itself, it only checks for a cart level discount and adds a product to the cart. You can also setup a product discount on our app to ensure that it only gives 1 unit of free product when the conditions are matched.
Hope this is a good enough workaround, but with limitations due to what Shopify offers on their non plus plans. If you found my answer helpful - please mark it as a solution so that others can also find value.
Hi @ZAAZ89
I’m afraid to say that automatically adding a free gift after entering a discount code at checkout isn’t possible on a Basic Shopify plan (no way to dot this if not Shopify Plus).
If you are on Shopify Plus, BOGOS can make this work smoothly with its Checkout Upsell feature
If you’re not on Plus, I still recommend using a powerful gift app like BOGOS to automatically add free gift to cart—it’s currently the best way to enhance the customer experience!
**
Why not try it yourself**when you get a 7-free day trials of BOGOS (4,9 ratings, 2k7+ reviews)?
@ZAAZ89
Since quite some time has passed since you raised this thread, I’m assuming you’ve already reached at a solution 
If so - can you please share the same and close this thread out so that others who stumble here might also find value.
Best,
Hi @ZAAZ89 
You’re right that Shopify’s native Buy X Get Y has a limitation, the customer must manually add the free gift to the cart, which creates friction.
I’d suggest you try Monk from the Shopify App Store. I’m part of the Monk team, and I can confirm it covers all three of your requirements:
- Lets you create a threshold based on the cart value, item count, a product from a specific collection etc.
- Lets the buyer use a discount code
- Adds the gift item(s) automatically to the cart and can show the gift as 100% off
Monk automatically adds the free gift to the customer’s cart when the conditions are met, in your case, when the cart value crosses your threshold and the discount code (like FREEGIFTXX) is applied.
Everything is fully customizable to match your brand’s style, and Monk integrates directly with your existing cart, so there’s no need to modify your theme or write any code. Our support team is available 24/5 and can help with any custom fixes if needed.