docs: general updates and fixes (#13620)
This commit is contained in:
@@ -4,7 +4,7 @@ export const metadata = {
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
In this document, you'll learn about order edits.
|
||||
In this guide, you'll learn about order edits.
|
||||
|
||||
<Note title="Looking for no-code docs?">
|
||||
|
||||
@@ -14,23 +14,23 @@ Refer to this [Medusa Admin User Guide](!user-guide!/orders/edit) to learn how t
|
||||
|
||||
## What is an Order Edit?
|
||||
|
||||
A merchant can edit an order to add new items or change the quantity of existing items in the order.
|
||||
A merchant can edit an order to add new items or change the quantity of existing items.
|
||||
|
||||
An order edit is represented by the [OrderChange data model](/references/order/models/OrderChange).
|
||||
|
||||
The `OrderChange` data model is associated with any type of change, including a return or exchange. However, its `change_type` property distinguishes the type of change it's making.
|
||||
The `OrderChange` data model is associated with any type of change, including returns or exchanges. However, its `change_type` property distinguishes the type of change being made.
|
||||
|
||||
In the case of an order edit, the `OrderChange`'s type is `edit`.
|
||||
For order edits, the `OrderChange`'s `change_type` is `edit`.
|
||||
|
||||
---
|
||||
|
||||
## Add Items in an Order Edit
|
||||
|
||||
When the merchant adds new items to the order in the order edit, the item is added as an [OrderItem](/references/order/models/OrderItem).
|
||||
When a merchant adds new items to an order during editing, the item is added as an [OrderItem](/references/order/models/OrderItem).
|
||||
|
||||
Also, an `OrderChangeAction` is created. The [OrderChangeAction data model](/references/order/models/OrderChangeAction) represents a change made by an `OrderChange`, such as an item added.
|
||||
Additionally, an `OrderChangeAction` is created. The [OrderChangeAction data model](/references/order/models/OrderChangeAction) represents a change made by an `OrderChange`, such as adding an item.
|
||||
|
||||
So, when an item is added, an `OrderChangeAction` is created with the type `ITEM_ADD`. In its `details` property, the item's ID, price, and quantity are stored.
|
||||
When an item is added, an `OrderChangeAction` is created with the type `ITEM_ADD`. Its `details` property stores the item's ID, price, and quantity.
|
||||
|
||||
---
|
||||
|
||||
@@ -38,7 +38,7 @@ So, when an item is added, an `OrderChangeAction` is created with the type `ITEM
|
||||
|
||||
A merchant can update an existing item's quantity or price.
|
||||
|
||||
This change is added as an `OrderChangeAction` with the type `ITEM_UPDATE`. In its `details` property, the item's ID, new price, and new quantity are stored.
|
||||
This change is recorded as an `OrderChangeAction` with the type `ITEM_UPDATE`. Its `details` property stores the item's ID, updated price, and updated quantity.
|
||||
|
||||
---
|
||||
|
||||
@@ -46,18 +46,18 @@ This change is added as an `OrderChangeAction` with the type `ITEM_UPDATE`. In i
|
||||
|
||||
Adding new items to the order requires adding shipping methods for those items.
|
||||
|
||||
These shipping methods are represented by the [OrderShippingMethod data model](/references/order/models/OrderItem). Also, an `OrderChangeAction` is created with the type `SHIPPING_ADD`
|
||||
These shipping methods are represented by the [OrderShippingMethod data model](/references/order/models/OrderShippingMethod). Also, an `OrderChangeAction` is created with the type `SHIPPING_ADD`.
|
||||
|
||||
---
|
||||
|
||||
## How Order Edits Impact an Order’s Version
|
||||
|
||||
When an order edit is confirmed, the order’s version is incremented.
|
||||
When an order edit is confirmed, the order’s [version](../order-versioning/page.mdx) is incremented.
|
||||
|
||||
---
|
||||
|
||||
## Payments and Refunds for Order Edit Changes
|
||||
|
||||
Once the Order Edit is confirmed, any additional payment or refund required can be made on the original order.
|
||||
Once the order edit is confirmed, any additional payment or refund required can be made on the original order.
|
||||
|
||||
This is determined by the comparison between the `OrderSummary` and the order's transactions, as mentioned in [this guide](../transactions/page.mdx#checking-outstanding-amount).
|
||||
This is determined by the comparison between the `OrderSummary` and the order's transactions, as mentioned in the [Transactions guide](../transactions/page.mdx#checking-outstanding-amount).
|
||||
|
||||
@@ -6,7 +6,7 @@ export const metadata = {
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
In this document, you’ll learn about order exchanges.
|
||||
In this guide, you’ll learn about order exchanges.
|
||||
|
||||
<Note title="Looking for no-code docs?">
|
||||
|
||||
@@ -16,9 +16,9 @@ Refer to this [Medusa Admin User Guide](!user-guide!/orders/exchanges) to learn
|
||||
|
||||
## What is an Exchange?
|
||||
|
||||
An exchange is the replacement of an item that the customer ordered with another.
|
||||
An exchange is the replacement of an item that the customer ordered with another item.
|
||||
|
||||
A merchant creates the exchange, specifying the items to be replaced and the new items to be sent.
|
||||
A merchant creates the exchange, specifying which items to return and which new items to send.
|
||||
|
||||
The [OrderExchange data model](/references/order/models/OrderExchange) represents an exchange.
|
||||
|
||||
@@ -26,15 +26,15 @@ The [OrderExchange data model](/references/order/models/OrderExchange) represent
|
||||
|
||||
## Returned and New Items
|
||||
|
||||
When the exchange is created, a return, represented by the [Return data model](/references/order/models/Return), is created to handle receiving the items back from the customer.
|
||||
When an exchange is created, a return, represented by the [Return data model](/references/order/models/Return), is also created to handle receiving the items back from the customer.
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about returns in [this guide](../return/page.mdx).
|
||||
Refer to the [Returns guide](../return/page.mdx) to learn more about returns and how they work.
|
||||
|
||||
</Note>
|
||||
|
||||
The [OrderExchangeItem data model](/references/order/models/OrderExchangeItem) represents the new items to be sent to the customer.
|
||||
The [OrderExchangeItem data model](/references/order/models/OrderExchangeItem) represents the new items to be sent to the customer. It's associated with the `OrderExchange` data model.
|
||||
|
||||
---
|
||||
|
||||
@@ -42,19 +42,23 @@ The [OrderExchangeItem data model](/references/order/models/OrderExchangeItem) r
|
||||
|
||||
An exchange has shipping methods used to send the new items to the customer. They’re represented by the [OrderShippingMethod data model](/references/order/models/OrderShippingMethod).
|
||||
|
||||
The shipping methods for the returned items are associated with the exchange's return, as explained in [this guide](../return/page.mdx#return-shipping-methods).
|
||||
The shipping methods for the returned items are associated with the exchange's return, as explained in the [Returns guide](../return/page.mdx#return-shipping-methods).
|
||||
|
||||
---
|
||||
|
||||
## Exchange Payment
|
||||
|
||||
The `Exchange` data model has a `difference_due` property that stores the outstanding amount.
|
||||
The `OrderExchange` data model has a `difference_due` property that stores the outstanding amount.
|
||||
|
||||
<Table>
|
||||
<Table.Header>
|
||||
<Table.Row>
|
||||
<Table.HeaderCell>Condition</Table.HeaderCell>
|
||||
<Table.HeaderCell>Result</Table.HeaderCell>
|
||||
<Table.HeaderCell>
|
||||
Condition
|
||||
</Table.HeaderCell>
|
||||
<Table.HeaderCell>
|
||||
Result
|
||||
</Table.HeaderCell>
|
||||
</Table.Row>
|
||||
</Table.Header>
|
||||
<Table.Body>
|
||||
@@ -66,7 +70,7 @@ The `Exchange` data model has a `difference_due` property that stores the outsta
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
|
||||
Merchant owes the customer a refund of the `difference_due` amount.
|
||||
The merchant owes the customer a refund of the `difference_due` amount.
|
||||
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
@@ -78,7 +82,7 @@ The `Exchange` data model has a `difference_due` property that stores the outsta
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
|
||||
Merchant requires additional payment from the customer of the `difference_due` amount.
|
||||
The merchant requires additional payment from the customer of the `difference_due` amount.
|
||||
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
@@ -97,10 +101,10 @@ The `Exchange` data model has a `difference_due` property that stores the outsta
|
||||
</Table.Body>
|
||||
</Table>
|
||||
|
||||
Any payment or refund made is stored in the [Transaction data model](/references/order/models/OrderTransaction).
|
||||
Any payments or refunds made are stored in the [OrderTransaction data model](/references/order/models/OrderTransaction).
|
||||
|
||||
---
|
||||
|
||||
## How Exchanges Impact an Order’s Version
|
||||
|
||||
When an exchange is confirmed, the order’s version is incremented.
|
||||
When an exchange is confirmed, the order’s [version](../order-versioning/page.mdx) is incremented.
|
||||
|
||||
@@ -4,7 +4,7 @@ export const metadata = {
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
In this document, you'll learn about campaigns.
|
||||
In this guide, you'll learn what a campaign is and its related concepts.
|
||||
|
||||
<Note title="Looking for no-code docs?">
|
||||
|
||||
@@ -14,7 +14,9 @@ Refer to this [Medusa Admin User Guide](!user-guide!/promotions/campaigns) to le
|
||||
|
||||
## What is a Campaign?
|
||||
|
||||
A [Campaign](/references/promotion/models/Campaign) combines promotions under the same conditions, such as start and end dates.
|
||||
A [Campaign](/references/promotion/models/Campaign) combines [promotions](../concepts/page.mdx#what-is-a-promotion) under the same conditions, such as start and end dates.
|
||||
|
||||
Campaigns are useful for grouping promotions that share the same time frame or target audience. They're also useful for limiting the usage of promotions.
|
||||
|
||||

|
||||
|
||||
@@ -22,11 +24,21 @@ A [Campaign](/references/promotion/models/Campaign) combines promotions under th
|
||||
|
||||
## Campaign Limits
|
||||
|
||||
Each campaign has a budget represented by the [CampaignBudget data model](/references/promotion/models/CampaignBudget). The budget limits how many times the promotion can be used.
|
||||
Each campaign can have a budget represented by the [CampaignBudget data model](/references/promotion/models/CampaignBudget). The budget limits how many times the promotion can be used.
|
||||
|
||||
There are two types of budgets:
|
||||
|
||||
- `spend`: An amount that, when crossed, the promotion becomes unusable. For example, if the amount limit is set to `$100`, and the total amount of usage of this promotion crosses that threshold, the promotion can no longer be applied.
|
||||
- `usage`: The number of times that a promotion can be used. For example, if the usage limit is set to `10`, the promotion can be used only 10 times by customers. After that, it can no longer be applied.
|
||||
- `spend`: An amount that, when crossed, the promotion becomes unusable.
|
||||
- For example, if the amount limit is set to `$100`, and the total amount of usage of this promotion crosses that threshold, the promotion can no longer be applied.
|
||||
- `usage`: The number of times that a promotion can be used.
|
||||
- For example, if the usage limit is set to `10`, the promotion can be used only 10 times by customers. After that, it can no longer be applied.
|
||||
|
||||

|
||||
|
||||
### How Budgets Limit Promotion Usage
|
||||
|
||||
When a customer tries to use a promotion, Medusa checks whether the campaign has a budget and if the budget limit has been reached. If so, the promotion cannot be applied.
|
||||
|
||||
For example, if a campaign has a budget of type `usage` with a limit of `10`, and the promotion has already been used 10 times, it cannot be applied anymore and is considered expired.
|
||||
|
||||
However, once a promotion is applied to a cart, it remains valid until the order is completed, even if the budget limit is reached in the meantime. This ensures that customers who have already applied the promotion can still benefit from it during checkout.
|
||||
@@ -4,7 +4,7 @@ export const metadata = {
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
In this document, you’ll learn about tax rates and rules.
|
||||
In this guide, you’ll learn about tax rates and rules.
|
||||
|
||||
<Note title="Looking for no-code docs?">
|
||||
|
||||
@@ -30,13 +30,13 @@ Then, when tax rates are retrieved for a taxable item in the child region, both
|
||||
|
||||
You can create tax rates that override the default for specific conditions or rules.
|
||||
|
||||
For example, you can have a default tax rate is 10%, but for products of type “Shirt” is %15.
|
||||
For example, you can have a default 10% tax rate, but for products of type “Shirt” it is 15%.
|
||||
|
||||
A tax region can have multiple tax rates, and each tax rate can have multiple tax rules. The [TaxRateRule data model](/references/tax/models/TaxRateRule) represents a tax rate’s rule.
|
||||
|
||||

|
||||
|
||||
These two properties of the data model identify the rule’s target:
|
||||
The following two properties of the data model identify the rule’s target:
|
||||
|
||||
- `reference`: the name of the table in the database that this rule points to. For example, `product_type`.
|
||||
- `reference_id`: the ID of the data model’s record that this points to. For example, a product type’s ID.
|
||||
|
||||
Reference in New Issue
Block a user