FROM CACHE - en_header

Detect automatic discounts

Shopify Partner
1 0 0


I have an automatic discount that is applied on a group of products. But I only want to apply it when these products are configured in a certain way. So I thought I could remove it via a script at checkout. Like removing a discount code that was applied. But it looks like script editor has no ways to check for applied automatic discounts.


Has anyone had any experience with this and know if it's possible?




Replies 4 (4)
Shopify Partner
13290 2023 2587

Hello ,

You are using shopify or shopify plus?

In shopify we have no control of checkout page.

Refer this for discount code:

Please Like and Accept Solution. Free website audit to grow your business Chat on WhatsApp | Email: | Skype : oscprofessionals-87 | Hire us | Expert Site Speed Optimization | Performance Site Audit | Shopify Private App | Custom Theme Development & Modifications any Shopify Theme | Shopify SEO | Digital Marketing
16 0 8

@Wattie did you find a solution to this? I'm in a similar situation.

I want to make sure Script Discounts don't apply when an Automatic discount is already applied on the cart.

4 0 0

Does anyone have a solution? I'm pretty interested in it. 

Shopify Partner
136 17 32

It looks like it is not possible to detect automatic discounts in scripts, only discount codes 😞

Scripts can access whether a discount code is applied, the amount of the discount, and the type of discount (fixed amount, percentage, or shipping), however they can't access how it applies (cart or line item specific). As such, Scripts can't access post-discount totals, and they also can't access automatic discounts.