added docusaurus admonitions to docs
This commit is contained in:
@@ -2,7 +2,12 @@
|
||||
|
||||
## Introduction
|
||||
The purpose of this guide is to describe a checkout flow in Medusa. It is assumed that you've completed our [Quickstart](https://docs.medusajs.com/quickstart/quick-start) or [Tutorial](https://docs.medusajs.com/tutorial/set-up-your-development-environment) and are familiar with the technologies we use in our stack. Additionally, having an understanding of the [core API](https://docs.medusajs.com/api/store/auth) would serve as a great foundation for this walkthrough.
|
||||
> All code snippets in the following guide, use the JS SDK distributed through **npm**. To install it, run:
|
||||
|
||||
:::note
|
||||
|
||||
All code snippets in the following guide, use the JS SDK distributed through **npm**. To install it, run:
|
||||
|
||||
:::
|
||||
|
||||
```bash npm2yarn
|
||||
npm install @medusajs/medusa-js
|
||||
@@ -17,7 +22,12 @@ npm install @medusajs/medusa-js
|
||||
|
||||
## Checkout flow
|
||||
To create an order from a cart, we go through the following flow.
|
||||
> At this point, it assumed that the customer has created a cart, added items and is now at the initial step of the checkout flow.
|
||||
|
||||
:::note
|
||||
|
||||
At this point, it assumed that the customer has created a cart, added items and is now at the initial step of the checkout flow.
|
||||
|
||||
:::
|
||||
|
||||
### Initializing the checkout
|
||||
The first step in the flow is to _initialize_ the configured Payment Sessions for the Cart. If you are using the `medusa-starter-default` starter, this call will result in the `cart.payment_sessions` array being filled with one Payment Session for the manual payment provider.
|
||||
|
||||
@@ -69,7 +69,11 @@ export default OrderNotifierSubscriber;
|
||||
|
||||
This subscriber will register the method `handleOrder` as one of the handlers of the `order.placed` event. The method `handleOrder` will be executed every time an order is placed, and it will receive the order ID in the `data` parameter. You can then use the order’s details to perform any kind of task you need.
|
||||
|
||||
> The `data` object will not contain other order data. Only the ID of the order. You can retrieve the order information using the `orderService`.
|
||||
:::note
|
||||
|
||||
The `data` object will not contain other order data. Only the ID of the order. You can retrieve the order information using the `orderService`.
|
||||
|
||||
:::
|
||||
|
||||
## Using Services in Subscribers
|
||||
|
||||
|
||||
Reference in New Issue
Block a user