You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: www/apps/resources/app/commerce-modules/cart/concepts/page.mdx
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,28 +4,42 @@ export const metadata = {
4
4
5
5
# {metadata.title}
6
6
7
-
In this document, you’ll get an overview of the main concepts of a cart.
7
+
In this document, you’ll learn about the main concepts related to carts in Medusa.
8
8
9
-
## Shipping and Billing Addresses
9
+
## Cart
10
10
11
-
A cart has a shipping and billing address. Both of these addresses are represented by the [Address data model](/references/cart/models/Address).
11
+
A cart is the selection of product variants that a customer intends to purchase. It is represented by the [Cart data model](/references/cart/models/Cart).
12
12
13
-

13
+
A cart holds informations about:
14
+
15
+
- The items the customer wants to buy.
16
+
- The customer's shipping and billing addresses.
17
+
- The shipping methods used to fulfill the items after purchase.
18
+
- The payment method and information necessary to complete the purchase.
19
+
- These are stored and handled by the [Payment Module](../../payment/page.mdx).
14
20
15
21
---
16
22
17
23
## Line Items
18
24
19
25
A line item, represented by the [LineItem](/references/cart/models/LineItem) data model, is a quantity of a product variant added to the cart. A cart has multiple line items.
20
26
21
-
A line item stores some of the product variant’s properties, such as the `product_title` and `product_description`. It also stores data related to the item’s quantity and price.
22
-
23
27
<Note>
24
28
25
29
In the Medusa application, a product variant is implemented in the [Product Module](../../product/page.mdx).
26
30
27
31
</Note>
28
32
33
+
A line item stores some of the product variant’s properties, such as the `product_title` and `product_description`. It also stores data related to the item’s quantity and price.
34
+
35
+
---
36
+
37
+
## Shipping and Billing Addresses
38
+
39
+
A cart has a shipping and billing address. Both of these addresses are represented by the [Address data model](/references/cart/models/Address).
40
+
41
+

In this document, you’ll learn about the concepts of item fulfillment.
7
+
In this document, you’ll learn about the concepts related to item fulfillment.
8
8
9
9
## Fulfillment Data Model
10
10
11
11
A fulfillment is the shipping and delivery of one or more items to the customer. It’s represented by the [Fulfillment data model](/references/fulfillment/models/Fulfillment).
12
12
13
+
A fulfillment can be created to fulfill orders, [returns](../../order/return/), [exchanges](../../order/exchange/page.mdx), and [claims](../../order/claim/page.mdx).
14
+
13
15
---
14
16
15
17
## Fulfillment Processing by a Fulfillment Provider
16
18
17
-
A fulfillment is associated with a fulfillment provider that handles all its processing, such as creating a shipment for the fulfillment’s items.
19
+
A fulfillment is associated with a [fulfillment provider](../fulfillment-provider/page.mdx) that handles all its processing, such as creating a shipment for the fulfillment’s items.
18
20
19
-
The fulfillment is also associated with a shipping option of that provider, which determines how the item is shipped.
21
+
The fulfillment is also associated with a [shipping option](../shipping-option/page.mdx) of that provider, which determines how the item is shipped.
20
22
21
23

22
24
23
25
---
24
26
25
-
## data Property
27
+
## data Property of Fulfillment Data Model
26
28
27
29
The `Fulfillment` data model has a `data` property that holds any necessary data for the third-party fulfillment provider to process the fulfillment.
28
30
@@ -32,7 +34,7 @@ For example, the `data` property can hold the ID of the fulfillment in the third
32
34
33
35
## Fulfillment Items
34
36
35
-
A fulfillment is used to fulfill one or more items. Each item is represented by the `FulfillmentItem` data model.
37
+
A fulfillment is used to fulfill one or more items. Each item is represented by the [FulfillmentItem data model](/references/fulfillment/models/FulfillmentItem).
36
38
37
39
The fulfillment item holds details relevant to fulfilling the item, such as barcode, SKU, and quantity to fulfill.
38
40
@@ -42,14 +44,14 @@ The fulfillment item holds details relevant to fulfilling the item, such as barc
42
44
43
45
## Fulfillment Label
44
46
45
-
Once a shipment is created for the fulfillment, you can store its tracking number, URL, or other related details as a label, represented by the `FulfillmentLabel` data model.
47
+
Once a shipment is created for the fulfillment, you can store its tracking number, URL, or other related details as a label, represented by the [FulfillmentLabel data model](/references/fulfillment/models/FulfillmentLabel).
46
48
47
49
---
48
50
49
51
## Fulfillment Status
50
52
51
-
The `Fulfillment` data model has three properties to keep track of the current status of the fulfillment:
53
+
The [Fulfillment data model](/references/fulfillment/models/Fulfillment) has three properties to determine the current status of the fulfillment:
52
54
53
-
-`packed_at`: The date the fulfillment was packed. If set, then the fulfillment has been packed.
54
-
-`shipped_at`: The date the fulfillment was shipped. If set, then the fulfillment has been shipped.
55
-
-`delivered_at`: The date the fulfillment was delivered. If set, then the fulfillment has been delivered.
55
+
-`packed_at`: The date the fulfillment was packed. If set, the fulfillment has been packed.
56
+
-`shipped_at`: The date the fulfillment was shipped. If set, the fulfillment has been shipped.
57
+
-`delivered_at`: The date the fulfillment was delivered. If set, the fulfillment has been delivered.
Copy file name to clipboardExpand all lines: www/apps/resources/app/commerce-modules/order/concepts/page.mdx
+19-4Lines changed: 19 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,22 @@ export const metadata = {
6
6
7
7
In this document, you’ll learn about orders and related concepts
8
8
9
+
## Order
10
+
11
+
An order is a purchase made by a customer, either through the storefront or through the API. It is represented by the [Order data model](/references/order/models/Order).
12
+
13
+
An order holds information about:
14
+
15
+
- The purchased items.
16
+
- The customer who made the order.
17
+
- This is stored and handled by the [Customer Module](../../customer/page.mdx).
18
+
- Payment and shipping information
19
+
20
+
---
21
+
9
22
## Order Items
10
23
11
-
The items purchased in the order are represented by the [OrderItem data model](/references/order/models/OrderItem). An order can have multiple items.
24
+
The items purchased in an order are represented by the [OrderItem data model](/references/order/models/OrderItem). An order can have multiple items.
12
25
13
26

14
27
@@ -28,7 +41,7 @@ Each shipping method is represented by the [OrderShippingMethod data model](/ref
28
41
29
42
### data Property
30
43
31
-
When fulfilling the order, you can use a third-party fulfillment provider that requires additional custom data to be passed along from the order creation process.
44
+
When fulfilling an order, you can use a third-party fulfillment provider that requires additional custom data to be passed along from the order creation process.
32
45
33
46
The `OrderShippingMethod` data model has a `data` property. It’s an object used to store custom data relevant later for fulfillment.
34
47
@@ -38,7 +51,9 @@ The Medusa application passes the `data` property to the Fulfillment Module when
38
51
39
52
## Order Totals
40
53
41
-
The order’s total amounts (including tax total, total after an item is returned, etc…) are represented by the [OrderSummary data model](/references/order/models/OrderSummary).
54
+
An order’s total amounts (including tax total, total after an item is returned, etc…) are represented by the [OrderSummary data model](/references/order/models/OrderSummary).
55
+
56
+
Refer to the [Retrieve Order Totals](../order-totals/page.mdx) guide to learn how to retrieve an order’s totals.
42
57
43
58
---
44
59
@@ -48,4 +63,4 @@ Payments made on an order, whether they’re capture or refund payments, are rec
48
63
49
64
An order can have multiple transactions. The sum of these transactions must be equal to the order summary’s total. Otherwise, there’s an outstanding amount.
50
65
51
-
Learn more about transactions in [this guide](../transactions/page.mdx).
66
+
Refer to the [Transactions](../transactions/page.mdx) guide to learn more.
0 commit comments