1

I have to give $100 discount when cart subtotal is greater than $1000 and quantity is greater than 1 and also exclude some categories.

For example, if the cart have the following items from category ids 15, 76, 77, 78, 79, 80, 81, 200 then not give discount. It is working properly when items in cart only from category ids 15, 76, 77 at a time. But when I am adding some product from another category the coupon code is also applied.enter image description here

In short, if cart contains items from 15, 76, 77, 78, 79, 80, 81, 200 with any other allowed category for discount then coupon code should not applied.

If cart contains items from 15, 76, 77, 78, 79, 80, 81, 200 then coupon code should be invalid.

1 Answer 1

1

I think this is one approach that is working in your scenario:

enter image description here

If ALL  of these conditions are TRUE {
    Subtotal  equals or greater than  1000 
    If ALL  of these conditions are FALSE {
        If total quantity  equals or greater than  1  for a subselection of items in cart matching ALL  of these conditions {
            Category  is one of  15, 76, 77, 78, 79, 80, 81, 200
        }
    } 
}

Your rule tells Magento that the coupon is valid if there is at least one category that is not from IDs 15, 76, 77, 78, 79, 80, 81, 200.

The rule however must say that the coupon is not valid if there is at least one category that is from IDs 15, 76, 77, 78, 79, 80, 81, 200.

5
  • Coupon should be invalid if any product form categories 15, 76, 77, 78, 79, 80, 81, 200 in cart.
    – Magecode
    Commented Feb 10, 2018 at 4:45
  • @Magecode well, yes, that's exactly what this rule is doing. If there is one product in cart that has one of these categories assigned, the coupon can not be used on that cart. What kind of issue are you facing with that rule? Is it, that you want to apply the coupon on all products in cart that are not from these categories - no matter what other products are in cart? Please be more specific. Commented Feb 10, 2018 at 10:45
  • Suppose i have categories tshirt, shirt, shorts with id like 1, 2 and 3 respectively. i have to give some discount suppose 100 off on cart for the category 1 and 2 but not on category 3. if someone have product only from category 1 and 2 then coupon should be apply. If someone have products in cart from category 1 and 2 and also from category 3 then in this case coupon should not be apply.
    – Magecode
    Commented Feb 10, 2018 at 11:00
  • Maybe let's have a quick talk in chat? Commented Feb 10, 2018 at 11:06
  • Ok let's do chat
    – Magecode
    Commented Feb 10, 2018 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.