How to remove particular coupon code if other cart rule without specific coupon is applied on product in magento2?

condition 1: I have 2 cart rule which are directly applied on product if specific conditions are true as given in cart rule.

condition 2: there is an another cart rule in which i have added one coupon code "10OFF" for all products.

Question is that if for particular product one cart rule is already applied then i want to remove coupon code because same time two discount is applied based on condition 1 and condition 2 ,

so how can i remove coupon code if there is already discount is applied by other cart rule , please any one have an idea about this let me know. Thanks in advance.

Solutions

Check the priority value of the rules - the lower the value the higher the priority. Make sure all rules which will be overridden are set to a higher value than your top priority rule.

Then, on the top priority rule, under 'Actions' set 'Discard subsequent rules' to 'Yes', which will stop the lower priority rules from being applied after it.

Similar questions

How to remove applied coupon code in a custom controller on Magento 2
I have a custom controller where i apply coupon code discount like this: Now, like magento 2 default does, I want to be able to remove that coupon code discount. So i created a custom controller and i want to remove here the discount: the only thing i found to remove the coupon discount is this: But this dosen't work for me. Does anyone know what i...
Which event should I use to add product to cart after coupon code is applied?
I'm developing a custom module on Magento 1.9.2.2 CE which will add a product to cart once a promo code is submitted by the customer. I've got my add product code working and triggering for other events: I just need to know which event is appropriate for this situation. It appears to be catalogrule_after_apply but I'm getting mixed results. Thanks ...
Magento Catalog Price Rule Suddenly Stops Working & Price Rule Not Applied on Custom Options
I have been trying to solve the two problems the whole day but found no way to solve. Here are the 2 problems: Earlier today when the price rule was still working, I was trying to fix the second problem. I changed some code and all of a sudden the discounted price was gone (price rule suddenly stopped working). I instantly reverted my code changes ...
Shopping Cart Rule and Catalog Price Rule -- Stop further Rule Processing not working
I have a number of Shopping Cart Rules with several different Actions but also I have one Catalog Price Rule giving 40% off everything. Now while this 40% Sale is on I don´t want any other Rules to be processed. But somehow this won´t work. Is this because some are Shopping Cart Rules and one is the Catalog Price Rule? I set "Stop Further Rules pro...
Coupon code for whole cart not applied to multiple items
What it should do: A coupon code which provides a discount of 5 € on the whole cart, if the subtotal equals or is greater than 40 €. What it does: It works fine with one article (even multiple units of that article), but when I put different articles in the cart, the discount is indetermined lower. Actions: Conditions:
Why Coupon code is not applied to cart programmatically?
I tried to generate coupon and apply to cart programmatically. With the following script coupon generate successfully but its not applied to cart, Even if tried to apply manually. If I just save this coupon code without any changes in admin panel and then applied to cart its works. I think I am missing something here. (I got this code from here) Pl...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.