I am new to Magento 2 and working with cart price rules but unable to get the required results.

1- I would like to apply 5% discount if more than 30 and less than 60 units added from specified category and 10% discount if more than 60 and less than 500 units of products added from specified category.

i.e. there are five products P1, P2, P3, P4, P5 in Catagory id 3 if customer adds 9 units of P1 6 units of P2 5 units of P3 5 units of P4 5 units of P5 He will get 5% discount only on above or if he added above units quantity more 60 > 500 he will get 10% discount.

But when i added 10 units of other products with 20 units of specified category. it enable discount because of total units in count in cart is 30.

Discount should not be applied to any other products added in cart and its number of units should not be counted to apply discount.

System should count if 30 units of P1-P5 from category id 3 are added discount will be applied to the total amount of above 30 units. instead of total cart amount and total number of units

Advise how can it be possible.

1 Answer 1


Found the exact scope looking for

Go to "cart price rule"

Step 1

1- Create new rule (Add required values and status as active)

2- Go to "Conditions" choose "Products Subselection" > mention quantity as "equal to greater than (XX)" (in my Case value is "30")

3- Add "Category is (X)" (in my case id is "3") set onditions in cart price rules Step 2

Go to "Actions"

1- Select "Percent of product price"

2- Add "Discount Amount : (X)" (in my case 5%)

3- Go to "Apply the rule only to cart items matching the following conditions (leave blank for all items)."

4- In Drop down choose "SKU"

Select Required SKU's of Same category

set conditions in of actions in cart price rules

Click Save

First Rule is applied.

Duplicate Above Rule Go to "Conditions" change the quantity as "equal to greater than (XX)" (in my Case value is "60") Change ""Discount Amount : (X)" (in my case 10%) Enable Discard Subsequent Rule and Save. both Rules are applied

Unfortunately in my Case 2nd rule is not discarding the rule 1. so i have done some mathematics and use "5.263%" instead of 10% in Actions > Discount Amount.

Its working perfect. If any one can help me in Unfortunate please advise.


1- I have added multiple products from all categories in store (i.e. 60 Products from other 10 Categories in store) and 29 Units of different SKU's from Category Id 3. Discount Was not applied. When increased any of SKU from category id 3 to +1 (29+1) and updated cart. 5% discount was applied till adding 59 No. of units of Different SKU's from Specified Category.

Discount value was only applied to the total value of 30 Units (Explanation: Discount was not applied to the whole cart)

2- When No of units reached 60+ Discount changed to 10%.

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.