Skip to content

Commit c42b530

Browse files
Fix typos / missing fields or broken mermaid diagrams for vouchers / promotions docs (#1547)
1 parent 6358b08 commit c42b530

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

docs/developer/discounts/promotions.mdx

+11-7
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The catalogue discounts from promotions are recalculated by a background task, s
3939

4040
### Examples of the use cases
4141

42-
- Define the product fixed or parentage discounts based on certain conditions.
42+
- Define the product fixed or percentage discounts based on certain conditions.
4343
- Define the discount available only for a specific period.
4444

4545
### Order promotions
@@ -1200,6 +1200,7 @@ that applies on objects with subtotal above **$20**.
12001200
{
12011201
"id": "Q2hlY2tvdXRMaW5lOmU5ZmI3YjY3LTA4ZjctNDQzZi1iMWNjLWE1ZmJlNGU0NjcxMg==",
12021202
"quantity": 2,
1203+
"isGift": false,
12031204
"undiscountedTotalPrice": {
12041205
"amount": 40.0
12051206
},
@@ -1226,6 +1227,7 @@ that applies on objects with subtotal above **$20**.
12261227
{
12271228
"id": "Q2hlY2tvdXRMaW5lOmMwNzhjNGQyLWI1MzUtNDhkMy04MDlmLTA1ZDUyYjY3MWFiNQ==",
12281229
"quantity": 1,
1230+
"isGift": true,
12291231
"undiscountedTotalPrice": {
12301232
"amount": 50.0
12311233
},
@@ -1292,6 +1294,7 @@ After completing the checkout we get an order with the gift line:
12921294
"lines": [
12931295
{
12941296
"quantity": 2,
1297+
"isGift": false,
12951298
"totalPrice": {
12961299
"gross": {
12971300
"amount": 40.0
@@ -1313,6 +1316,7 @@ After completing the checkout we get an order with the gift line:
13131316
},
13141317
{
13151318
"quantity": 1,
1319+
"isGift": true,
13161320
"totalPrice": {
13171321
"gross": {
13181322
"amount": 0.0
@@ -1325,11 +1329,11 @@ After completing the checkout we get an order with the gift line:
13251329
},
13261330
"undiscountedUnitPrice": {
13271331
"gross": {
1328-
"amount": 500.0
1332+
"amount": 50.0
13291333
}
13301334
},
13311335
"unitDiscount": {
1332-
"amount": 500.0
1336+
"amount": 50.0
13331337
}
13341338
}
13351339
]
@@ -1359,18 +1363,18 @@ When a voucher code is added, the discount from the order promotion is not appli
13591363
graph TD
13601364
A(Base undiscounted price) --> B[Apply catalogue discounts]
13611365
B --> Z{Voucher code added?}
1362-
Z --> |No| K[Apply `order` discount]
1366+
Z --> |No| K[Apply order discount]
13631367
K --> E
1364-
Z --> |Yes| C[Apply lines vouchers - `ONCE_PER_ORDER`, `SPECIFIC_PRODUCT`]
1365-
C --> D[Apply `ENTIRE_ORDER` voucher]
1368+
Z --> |Yes| C[Apply lines vouchers - ONCE_PER_ORDER, SPECIFIC_PRODUCT]
1369+
C --> D[Apply ENTIRE_ORDER voucher]
13661370
D --> E[Apply taxes]
13671371
```
13681372

13691373
#### Below the chart shows the process of applying the `ORDER` promotion discount
13701374

13711375
```mermaid
13721376
graph TD
1373-
A(Base discounted price) --> B[Collect all `ORDER` promotion rules that apply]
1377+
A(Base discounted price) --> B[Collect all order promotion rules that apply]
13741378
B --> C[For gift promotion rules choose the available product variant from the assigned gifts, with the highest discounted price]
13751379
C --> E[Compare the potential gift prices with other possible discounts]
13761380
E --> F[Choose the promotion rule that gives the best saving for the user]

docs/developer/discounts/vouchers.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Vouchers
33
sidebar_label: Vouchers
44
---
55

6-
Vouchers are a way to apply discounts to orders. They can be used to reduce the cost of a checkout. Vouchers can be applied to the entire order
6+
Vouchers are a way to apply discounts to orders or they can be used to reduce the cost of a checkout. Vouchers can be applied to the entire order
77
or to specific products. They can also be limited to a minimum quantity of products in the checkout. Vouchers and [promotions](developer/discounts/promotions.mdx) can be used together.
88

99
:::info

0 commit comments

Comments
 (0)