docs: fix details about maximum quantity for promotions (#13642)
This commit is contained in:
1 parent
05af008911
commit
30215e7292
5 files changed
+86
-4
No files matched your search
@@ -107,4 +107,44 @@ The application method has a collection of `PromotionRule` items to define the
|
||||
|
||||

|
||||
|
||||
In this example, the cart must have two product variants with the SKU `SHIRT` for the promotion to be applied.
|
||||
In this example, the cart must have two product variants with the SKU `SHIRT` for the promotion to be applied.
|
||||
|
||||
---
|
||||
|
||||
## Maxiumum Quantity Restriction
|
||||
|
||||
When the `allocation` property in the `ApplicationMethod` is set to `each`, you can restrict the maximum quantity of each applicable item that the promotion is applied to in the cart.
|
||||
|
||||
For example, if the maximum quantity is set to `1` and the customer has a line item with quantity two in the cart, the promotion is only applied to one of them.
|
||||
|
||||
```json title="Example Cart"
|
||||
{
|
||||
"cart": {
|
||||
"items": [
|
||||
{
|
||||
"id": "item_1",
|
||||
"quantity": 2 // The promotion is applied to 1 of this item
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This condition is applied on the quantity of every applicable item in the cart. For example, if set to `1` and the customer has two applicable items in the cart, the promotion is applied to one of each of them.
|
||||
|
||||
```json title="Example Cart"
|
||||
{
|
||||
"cart": {
|
||||
"items": [
|
||||
{
|
||||
"id": "item_1",
|
||||
"quantity": 2 // The promotion is applied to 1 of this item
|
||||
},
|
||||
{
|
||||
"id": "item_2",
|
||||
"quantity": 3 // The promotion is applied to 1 of this item
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -68,7 +68,7 @@ export const generatedEditDates = {
|
||||
"app/commerce-modules/promotion/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00",
|
||||
"app/commerce-modules/promotion/_events/page.mdx": "2024-07-03T19:27:13+03:00",
|
||||
"app/commerce-modules/promotion/actions/page.mdx": "2025-06-27T15:42:19.142Z",
|
||||
"app/commerce-modules/promotion/application-method/page.mdx": "2025-09-01T15:22:53.403Z",
|
||||
"app/commerce-modules/promotion/application-method/page.mdx": "2025-10-01T09:54:44.931Z",
|
||||
"app/commerce-modules/promotion/campaign/page.mdx": "2025-02-26T11:32:24.484Z",
|
||||
"app/commerce-modules/promotion/concepts/page.mdx": "2025-02-26T11:31:54.391Z",
|
||||
"app/commerce-modules/promotion/page.mdx": "2025-04-17T08:48:14.643Z",
|
||||
|
||||
Reference in new issue
Block a user