Articles on: Regios Discounts

Auto Add to Cart/Free Gift With Purchase

Screenshot of an "auto add to cart" logic flow


Our app now supports creating "auto add to cart" offers, where 1 or more product variants are automatically added at checkout when specific conditions are met.


Use Cases

  • Offering a free gift with purchase (ex. Spend $300 or more, get this item for free)
  • Automatically adding "shipping protection," "purchase protection," or similar warranties to the cart


How it works

Screenshot of a product being automatically added to the cart


Similarly to discounts, you will use the advanced logic builder to create these types of offers.


Instead of adding "Apply discount" steps at the end, though, you will add "Add to cart" steps.


The "Auto add to cart" feature works via two parts:


  1. JavaScript that continually checks the customer's cart to see if they're eligible for an automatically added product, and if so, adds it.
  2. A Shopify Functions discount that applies a discount to those products, only if the conditions from their logic are met. This makes it more secure and prevents the wrong people from receiving discounts.


Setup

Screenshot of the "Create discount > Auto add to cart" option


Click "Create discount," then click "Auto add to cart."


Screenshot of auto add to cart logic


Enter a title for your offer, and create logic for when products should be added to the cart, using our advanced logic builder.


Screenshot of the "Add to Cart Embed" in the Theme Editor


Lastly, enable the "Add to Cart Embed" and the "Discounts Embed" in the Theme Editor. This will handle actually adding products to the cart.


Limitations of auto add to cart offers

Because these require JS to actually add the product to the cart, they currently have some limitations:


  • It does not work in the POS
  • It does not work in draft orders/manual orders
  • The customer must visit at least one page in the Online Store before reaching the checkout
  • Auto add to cart is always an automatic discount, and cannot be a manually entered discount code.


Other limitations due to Shopify Functions API limitations


  • You can't base the subtotal calculation on the "price after all other discounts have been applied."
  • Discounts in Shopify are calculated all at once, not one after the other, so there's no way to enforce a priority order.
  • Subtotal calculations are based on the "price," not the compare at price.


As we continue development of this feature, we will try to work around these API limitations.



More information


Your Feedback Matters

Your review helps keep this small business running. Please leave one on the Shopify App Store.


Updated on: 06/06/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!