-
Notifications
You must be signed in to change notification settings - Fork 174
Closed
Labels
Description
What are you trying to do?
I have, for instance, two categories: "Brands" and "Gender".
I would apply a sale on "Nike / Men" (e.g. 10% discount) and a different sale on "Nike / Women" (e.g. 20% discount).
Now is not possible because it uses an OR condition between categories.
What's your proposed solution?
What about add a field in "Sale -> Matching Items" section that allow to choose the and/or condition?
"OR" condition: limit the discount to one or more categories (as default, like now)
"AND" condition: limit the discount to the combination of all specified categories
Could be enough change the relatedTo call here?
commerce/src/services/Sales.php
Line 500 in 692211a
| $relatedCategories = Category::find()->id($saleCategories)->relatedTo($relatedTo)->ids(); |
Reactions are currently unavailable