docs: capitalize use of Framework across docs (#12207)

* docs: capitalize use of Framework across docs

* generate llm
This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-04-17 10:40:26 +03:00
1 parent f6b20a943e
commit 42262d41a1
36 files changed
+14297 -14283

No files matched your search

@@ -10,7 +10,7 @@ In this section of the documentation, you'll find guides and references related
A commerce module provides features for a commerce domain within its service. The Medusa application exposes these features in its API routes to clients.
A commerce module also defines data models, representing tables in the database. Medusa's framework and tools allow you to extend these data models to add custom fields.
A commerce module also defines data models, representing tables in the database. The Medusa Framework and tools allow you to extend these data models to add custom fields.
## Commerce Modules List
@@ -40,7 +40,7 @@ export const metadata = {
In this guide, you'll learn how to add line items with custom prices to a cart in Medusa.
When you install a Medusa application, you get a fully-fledged commerce platform with a framework for customization. The Medusa application's commerce features are built around [commerce modules](../../../commerce-modules/page.mdx) which are available out-of-the-box. These features include managing carts and adding line items to them.
When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. The Medusa application's commerce features are built around [commerce modules](../../../commerce-modules/page.mdx) which are available out-of-the-box. These features include managing carts and adding line items to them.
By default, you can add product variants to the cart, where the price of its associated line item is based on the product variant's price. However, you can build customizations to add line items with custom prices to the cart. This is useful when integrating an Enterprise Resource Planning (ERP), Product Information Management (PIM), or other third-party services that provide real-time prices for your products.
@@ -179,7 +179,7 @@ The service's constructor receives the module's options as a second parameter. Y
<Note title="What is the first parameter in the constructor?">
A module has a container of Medusa framework tools and local resources in the module that you can access in the service constructor's first parameter. Learn more in [this documentation](!docs!/learn/fundamentals/modules/container).
A module has a container of Medusa Framework tools and local resources in the module that you can access in the service constructor's first parameter. Learn more in [this documentation](!docs!/learn/fundamentals/modules/container).
</Note>
@@ -445,7 +445,7 @@ You create a step with `createStep` from the Workflows SDK. It accepts two param
1. The step's unique name, which is `get-variant-metal-prices`.
2. An async function that receives two parameters:
- An input object with the variant, currency code, and quantity. The variant has a `calculated_price` property that holds the variant's fixed price in the Medusa application. This is useful when you want to add a fixed price to the real-time custom price, such as handling fees.
- The [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of framework and commerce tools that you can access in the step.
- The [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of Framework and commerce tools that you can access in the step.
In the step function, so far you only resolve the Metal Prices Module's service from the Medusa container.
@@ -40,7 +40,7 @@ export const metadata = {
In this guide, you'll learn how to implement quote management in Medusa.
When you install a Medusa application, you get a fully-fledged commerce platform with a framework for customization. The Medusa application's commerce features are built around [commerce modules](../../../commerce-modules/page.mdx) which are available out-of-the-box.
When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. The Medusa application's commerce features are built around [commerce modules](../../../commerce-modules/page.mdx) which are available out-of-the-box.
By default, the Medusa application provides standard commerce features for orders and carts. However, Medusa's customization capabilities facilitate extending existing features to implement quote-management features.
@@ -583,7 +583,7 @@ You create a step with `createStep` from the Workflows SDK. It accepts two param
1. The step's unique name, which is `create-quotes`.
2. An async function that receives two parameters:
- The step's input, which is in this case an array of quotes to create.
- An object that has properties including the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of framework and commerce tools that you can access in the step.
- An object that has properties including the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of Framework and commerce tools that you can access in the step.
In the step function, you resolve the Quote Module's service from the Medusa container using the `resolve` method of the container, passing it the module's name as a parameter.
@@ -41,7 +41,7 @@ export const metadata = {
In this tutorial, you will learn how to send notifications to customers who have abandoned their carts.
When you install a Medusa application, you get a fully-fledged commerce platform with a framework for customization. The Medusa application's commerce features are built around [commerce modules](../../../commerce-modules/page.mdx), which are available out-of-the-box. These features include cart-management capabilities.
When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. The Medusa application's commerce features are built around [commerce modules](../../../commerce-modules/page.mdx), which are available out-of-the-box. These features include cart-management capabilities.
Medusa's [Notification Module](../../../architectural-modules/notification/page.mdx) allows you to send notifications to users or customers, such as password reset emails, order confirmation SMS, or other types of notifications.
@@ -272,7 +272,7 @@ You create a step with `createStep` from the Workflows SDK. It accepts two param
1. The step's unique name, which is `create-review`.
2. An async function that receives two parameters:
- The step's input, which is in this case an object with the review's properties.
- An object that has properties including the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of framework and commerce tools that you can access in the step.
- An object that has properties including the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of Framework and commerce tools that you can access in the step.
In the step function, you first resolve the Notification Module's service, which has methods to manage notifications. Then, you prepare the data of each notification, and create the notifications with the `createNotifications` method.
@@ -30,7 +30,7 @@ Medusa Cloud provides a beta Store Credits feature that facilitates building a l
</Note>
When you install a Medusa application, you get a fully-fledged commerce platform with a framework for customization. The Medusa application's commerce features are built around [commerce modules](../../../commerce-modules/page.mdx), which are available out-of-the-box. These features include management capabilities related to carts, orders, promotions, and more.
When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. The Medusa application's commerce features are built around [commerce modules](../../../commerce-modules/page.mdx), which are available out-of-the-box. These features include management capabilities related to carts, orders, promotions, and more.
A loyalty point system allows customers to earn points for purchases, which can be redeemed for discounts or rewards. In this tutorial, you'll learn how to customize the Medusa application to implement a loyalty points system.
@@ -527,7 +527,7 @@ You create a step with `createStep` from the Workflows SDK. It accepts two param
1. The step's unique name, which is `validate-customer-exists`.
2. An async function that receives two parameters:
- The step's input, which is in this case an object with the customer's details.
- An object that has properties including the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of framework and commerce tools that you can access in the step.
- An object that has properties including the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of Framework and commerce tools that you can access in the step.
In the step function, you validate that the customer is defined and that it's registered based on its `has_account` property. Otherwise, you throw an error.
@@ -40,9 +40,9 @@ export const metadata = {
In this tutorial, you'll learn how to implement product reviews in Medusa.
When you install a Medusa application, you get a fully-fledged commerce platform with a framework for customization. The Medusa application's commerce features are built around [commerce modules](../../../commerce-modules/page.mdx) which are available out-of-the-box. The features include product-management features.
When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. The Medusa application's commerce features are built around [commerce modules](../../../commerce-modules/page.mdx) which are available out-of-the-box. The features include product-management features.
Medusa doesn't provide product reviews out-of-the-box, but Medusa's framework facilitate implementing customizations like product reviews. In this tutorial, you'll learn how to customize the Medusa server, admin dashboard, and Next.js Starter Storefront to implement product reviews.
Medusa doesn't provide product reviews out-of-the-box, but the Medusa Framework facilitates implementing customizations like product reviews. In this tutorial, you'll learn how to customize the Medusa server, Admin dashboard, and Next.js Starter Storefront to implement product reviews.
You can follow this guide whether you're new to Medusa or an advanced Medusa developer.
@@ -451,7 +451,7 @@ You create a step with `createStep` from the Workflows SDK. It accepts two param
1. The step's unique name, which is `create-review`.
2. An async function that receives two parameters:
- The step's input, which is in this case an object with the review's properties.
- An object that has properties including the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of framework and commerce tools that you can access in the step.
- An object that has properties including the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of Framework and commerce tools that you can access in the step.
In the step function, you resolve the Review Module's service from the Medusa container using its `resolve` method, passing it the module's name as a parameter.
@@ -31,7 +31,7 @@ export const metadata = {
In this tutorial, you'll learn how to integrate Medusa with Algolia.
When you install a Medusa application, you get a fully-fledged commerce platform with a framework for customization. Medusa's architecture supports integrating third-party services, such as a search engine, allowing you to build your unique requirements around core commerce flows.
When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. Medusa's architecture supports integrating third-party services, such as a search engine, allowing you to build your unique requirements around core commerce flows.
[Algolia](https://www.algolia.com/doc/) is a search engine that enables you to build and manage an intuitive search experience for your customers. By integrating Algolia with Medusa, you can index e-commerce data, such as products, and allow clients to search through them.
@@ -453,7 +453,7 @@ You create a step with `createStep` from the Workflows SDK. It accepts two param
1. The step's unique name, which is `sync-products`.
2. An async function that receives two parameters:
- The step's input, which is in this case an object holding an array of products to sync into Algolia.
- An object that has properties including the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of framework and commerce tools that you can access in the step.
- An object that has properties including the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of Framework and commerce tools that you can access in the step.
In the step function, you resolve the Algolia Module's service from the Medusa container using the name you exported in the module definition's file.
@@ -763,7 +763,7 @@ You create a step using `createStep` from the Workflows SDK. It accepts two para
1. The step's name, which is `get-magento-products`.
1. An async function that executes the step's logic. The function receives two parameters:
- The input data for the step, which in this case is the pagination parameters.
- An object holding the workflow's context, including the [Medusa Container](!docs!learn/fundamentals/medusa-container) that allows you to resolve framework and commerce tools.
- An object holding the workflow's context, including the [Medusa Container](!docs!learn/fundamentals/medusa-container) that allows you to resolve Framework and commerce tools.
In the step function, you resolve the Magento Module's service from the container, then use its `getProducts` method to retrieve the products from Magento.
@@ -31,7 +31,7 @@ export const metadata = {
In this guide, you'll learn how to integrate Medusa with Resend.
When you install a Medusa application, you get a fully-fledged commerce platform with a framework for customization. Medusa's architecture supports integrating third-party services, such as an email service, that allow you to build your unique requirements around core commerce flows.
When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. Medusa's architecture supports integrating third-party services, such as an email service, that allow you to build your unique requirements around core commerce flows.
[Resend](https://resend.com/docs/introduction) is an email service with an intuitive developer experience to send emails from any application type, including Node.js servers. By integrating Resend with Medusa, you can build flows to send an email when a commerce operation is performed, such as when an order is placed.
@@ -248,7 +248,7 @@ class ResendNotificationProviderService extends AbstractNotificationProviderServ
A module's service accepts two parameters:
1. Dependencies resolved from the [Module's container](!docs!/learn/fundamentals/modules/container), which is the module's local registry that the Medusa application adds framework tools to. In this service, you resolve the [Logger utility](!docs!/learn/debugging-and-testing/logging) from the module's container.
1. Dependencies resolved from the [Module's container](!docs!/learn/fundamentals/modules/container), which is the module's local registry that the Medusa application adds Framework tools to. In this service, you resolve the [Logger utility](!docs!/learn/debugging-and-testing/logging) from the module's container.
2. The module's options that are passed to the module in Medusa's configuration as you'll see in a later section.
Using the API key passed in the module's options, you initialize the Resend client. You also set the `options` and `logger` properties.
@@ -669,11 +669,11 @@ You define the `sendNotificationStep` using the `createStep` function that accep
- A string indicating the step's unique name.
- The step's function definition as a second parameter. It accepts the step's input as a first parameter, and an object of options as a second.
The `container` property in the second parameter is an instance of the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of framework and commerce tools, such a module's service, that you can resolve to utilize their functionalities.
The `container` property in the second parameter is an instance of the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of Framework and commerce tools, such as a module's service, that you can resolve to utilize their functionalities.
<Note title="Tip">
The Medusa container is accessible by all customizations, such as workflows and subscribers, except for modules. Each module has its own container with framework tools like the Logger utility.
The Medusa container is accessible by all customizations, such as workflows and subscribers, except for modules. Each module has its own container with Framework tools like the Logger utility.
</Note>
@@ -31,7 +31,7 @@ export const metadata = {
In this guide, you'll learn how to integrate Medusa with Sanity.
When you install a Medusa application, you get a fully-fledged commerce platform with support for customizations. While Medusa allows you to manage basic content, such as product description and images, you might need rich content-management features, such as localized content. Medusa's framework supports you in integrating a CMS with these features.
When you install a Medusa application, you get a fully-fledged commerce platform with support for customizations. While Medusa allows you to manage basic content, such as product description and images, you might need rich content-management features, such as localized content. The Medusa Framework supports you in integrating a CMS with these features.
Sanity is a CMS that simplifies managing content from third-party sources into a single interface. By integrating it with Medusa, you can manage your storefront and commerce-related content, such as product details, from a single interface. You also benefit from advanced content-management features, such as live-preview editing.
@@ -39,7 +39,7 @@ export const metadata = {
In this guide, you'll learn how to build a wishlist [plugin](!docs!/learn/fundamentals/plugins) in Medusa.
When you install a Medusa application, you get a fully-fledged commerce platform with a framework for customization. The Medusa application's commerce features are built around [commerce modules](../../../commerce-modules/page.mdx) which are available out-of-the-box.
When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. The Medusa application's commerce features are built around [commerce modules](../../../commerce-modules/page.mdx) which are available out-of-the-box.
Customers browsing your store may be interested in a product but not ready to buy it yet. They may want to save the product for later or share it with friends and family. A wishlist feature allows customers to save products they like and access them later.
@@ -591,7 +591,7 @@ You create a step using `createStep` from the Workflows SDK. It accepts two para
1. The step's name, which is `validate-customer-create-wishlist`.
1. An async function that executes the step's logic. The function receives two parameters:
- The input data for the step, which in this case is an object having a `customer_id` property.
- An object holding the workflow's context, including the [Medusa Container](!docs!learn/fundamentals/medusa-container) that allows you to resolve framework and commerce tools.
- An object holding the workflow's context, including the [Medusa Container](!docs!learn/fundamentals/medusa-container) that allows you to resolve Framework and commerce tools.
In the step function, you use [Query](!docs!/learn/fundamentals/module-links/query) to retrieve the wishlist based on the specified customer ID. If a wishlist exists, you throw an error, stopping the workflow's execution.
@@ -31,7 +31,7 @@ export const metadata = {
In this guide, you'll learn how to notify customers when a variant is restocked in Medusa.
When you install a Medusa application, you get a fully-fledged commerce platform with a framework for customization. The Medusa application's commerce features are built around [commerce modules](../../../commerce-modules/page.mdx) which are available out-of-the-box. These features include managing the inventory of product variants in different stock locations and sales channels.
When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. The Medusa application's commerce features are built around [commerce modules](../../../commerce-modules/page.mdx) which are available out-of-the-box. These features include managing the inventory of product variants in different stock locations and sales channels.
Customers browsing your store may be interested in a product that is currently out of stock. To keep the customer interested in your store and encourage them to purchase the product in the future, you can build customizations around Medusa's commerce features to subscribe customers to receive a notification when the product is restocked.
@@ -9,7 +9,7 @@ export const metadata = {
In this guide, you'll learn how to support digital products in Medusa.
When you install a Medusa application, you get a fully-fledged commerce platform with support for customizations. Medusa provides all features related to products and managing them, and its framework allows you to extend those features and implement your custom use case.
When you install a Medusa application, you get a fully-fledged commerce platform with support for customizations. Medusa provides all features related to products and managing them, and the Medusa Framework allows you to extend those features and implement your custom use case.
You can extend Medusa's product features to support selling, storing, and fulfilling digital products. In this guide, you'll customize Medusa to add the following features:
@@ -21,7 +21,7 @@ You can extend Medusa's product features to support selling, storing, and fulfil
<Note>
This guide provides an example of an approach to implement digital products. You're free to choose a different approach using Medusa's framework.
This guide provides an example of an approach to implement digital products. You're free to choose a different approach using the Medusa Framework.
</Note>
@@ -8,7 +8,7 @@ export const metadata = {
In this guide, you will learn how to implement the integration layer between Odoo and Medusa.
When you install a Medusa application, you get a fully-fledged commerce platform that supports customizations. However, your business might already be using other systems such as an ERP to centralize data and processes. Medusa's framework facilitates integrating the ERP system and using its data to enrich your commerce platform.
When you install a Medusa application, you get a fully-fledged commerce platform that supports customizations. However, your business might already be using other systems such as an ERP to centralize data and processes. The Medusa Framework facilitates integrating the ERP system and using its data to enrich your commerce platform.
Odoo is a suite of open-source business apps that covers all your business needs, including an ERP system. You can use Odoo to store products and their prices, manage orders, and more.
@@ -572,7 +572,7 @@ You create a step using `createStep` from the Workflows SDK. It accepts two para
1. The step's name, which is `get-products-from-erp`.
2. An async function that executes the step's logic. The function receives two parameters:
- The input data for the step, which are the pagination fields `offset` and `limit`.
- An object holding the workflow's context, including the [Medusa Container](!docs!learn/fundamentals/medusa-container) that allows you to resolve framework and commerce tools.
- An object holding the workflow's context, including the [Medusa Container](!docs!learn/fundamentals/medusa-container) that allows you to resolve Framework and commerce tools.
In this step, you resolve the Odoo Module's service from the container and use its `listProducts` method to fetch products from Odoo. You pass the pagination options from the input data to the method.
+2 -2
View File
@@ -34,7 +34,7 @@ Businesses often rely on an ERP system to centralize their data and custom busin
When integrating the ERP system with other ecommerce platforms, you'll face complications maintaining data consistency across systems and customizing the platform's existing flows to accommodate the ERP system's data and operations. For example, the ecommerce platform may not support purchasing products with custom pricing or restricting certain products from purchase under certain conditions.
Medusa's framework for customization solves these challenges by giving you a durable execution engine to orchestrate operations through custom flows, and the flexibility to customize the platform's existing flows. You can wrap existing flows with custom logic, inject custom features into existing flows, and create new flows that interact with the ERP system and sync data between the two systems.
The Medusa Framework solves these challenges by giving you a durable execution engine to orchestrate operations through custom flows, and the flexibility to customize the platform's existing flows. You can wrap existing flows with custom logic, inject custom features into existing flows, and create new flows that interact with the ERP system and sync data between the two systems.
![ERP Integration Illustration](https://res.cloudinary.com/dza7lstvk/image/upload/v1740470820/Medusa%20Resources/erp-medusa-integration_pxjpcx.jpg)
@@ -203,7 +203,7 @@ export const syncFromErpWorkflow = createWorkflow(
)
```
In the above file, you first create a `getProductsFromErpStep` that resolves the ERP Module's service from the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of framework and commerce tools, including your modules, that you can access in your customizations. You can then call the `getProducts` method in the ERP Module's service to fetch the products from the ERP and return them.
In the above file, you first create a `getProductsFromErpStep` that resolves the ERP Module's service from the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of Framework and commerce tools, including your modules, that you can access in your customizations. You can then call the `getProducts` method in the ERP Module's service to fetch the products from the ERP and return them.
Then, you create a `syncFromErpWorkflow` that executes the `getProductsFromErpStep` to get the products from the ERP, then prepare the products to be created in Medusa. For example, you can set the product's title, and specify its ID in the ERP using the `external_id` field. Also, assuming the ERP products have variants, you can map the variants to Medusa's format, setting the variant's title and its ERP ID in the metadata.
@@ -9,7 +9,7 @@ export const metadata = {
In this guide, you'll learn how to build a restaurant-delivery marketplace platform, similar to Uber Eats, with Medusa.
When you install a Medusa application, you get a fully-fledged commerce platform with support for customizations. While Medusa doesn't provide marketeplace functionalities natively, it provides features that you can extend and a framework to support all your customization needs to build a marketplace.
When you install a Medusa application, you get a fully-fledged commerce platform with support for customizations. While Medusa doesn't provide marketeplace functionalities natively, it provides features that you can extend and a Framework to support all your customization needs to build a marketplace.
In this guide, you'll customize Medusa to build a restaurant-delivery platform with the following features:
@@ -9,7 +9,7 @@ export const metadata = {
In this guide, you'll learn how to build a marketplace with Medusa.
When you install a Medusa application, you get a fully-fledged commerce platform with support for customizations. While Medusa doesn't provide marketplace functionalities natively, it provides features that you can extend and a framework to support all your customization needs to build a marketplace.
When you install a Medusa application, you get a fully-fledged commerce platform with support for customizations. While Medusa doesn't provide marketplace functionalities natively, it provides features that you can extend and a Framework to support all your customization needs to build a marketplace.
## Summary
@@ -23,7 +23,7 @@ You can follow this guide whether you're new to Medusa or an advanced Medusa dev
<Note>
This guide provides an example of an approach to implement marketplaces. You're free to choose a different approach using Medusa's framework.
This guide provides an example of an approach to implement marketplaces. You're free to choose a different approach using the Medusa Framework.
</Note>
@@ -498,7 +498,7 @@ You create a step with `createStep` from the Workflows SDK. It accepts three par
1. The step's unique name, which is `create-vendor`.
2. An async function that receives two parameters:
- An input object with the details of the vendor to create.
- The [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of framework and commerce tools that you can access in the step.
- The [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of Framework and commerce tools that you can access in the step.
3. An async compensation function. This function is only executed when an error occurs in the workflow. It undoes the changes made by the step.
In the step function, you resolve the Marketplace Module's service from the container. Then, you use the service's generated `createVendors` method to create the vendor.
@@ -64,7 +64,7 @@ In more complex cases, you can create a custom module that stores and manages th
## Build a Custom Storefront
Medusa's modular architecture removes any restrictions on the framework you use to build the storefront, or design and experience you provide customers. The storefront connects to the Medusa application using the Store API Routes.
Medusa's modular architecture removes any restrictions on the your storefront's tech stack, design, and the experience you provide customers. The storefront connects to the Medusa application using the Store API Routes.
You can build a unique experience around your products that focuses on the customer’s personalization capabilities.
+1 -1
View File
@@ -24,7 +24,7 @@ Medusa's modular architecture solves these challenges. Any frontend can utilize
## Freedom in Choosing Your POS Tech Stack
When you build a POS system, you must choose which programming framework, language, or tool you want to use.
When you build a POS system, you must choose the programming language or tool you want to use.
Medusa's modular architecture removes any restrictions you may have while making this choice. Any client or front end can connect to the Medusa application using its headless REST APIs.
@@ -9,7 +9,7 @@ export const metadata = {
In this guide, you'll learn how to support subscription purchases with Medusa.
When you install a Medusa application, you get a fully-fledged commerce platform with support for customizations. While Medusa doesn't provide subscription-based purchases natively, it provides the framework to support you in implementing this feature.
When you install a Medusa application, you get a fully-fledged commerce platform with support for customizations. While Medusa doesn't provide subscription-based purchases natively, it provides the Framework to support you in implementing this feature.
In this guide, you'll customize Medusa to implement subscription-based purchases with the following features:
@@ -23,7 +23,7 @@ This guide uses Stripe as an example to capture the subscription payments. You'r
<Note>
This guide provides an example of an approach to implement subscriptions. You're free to choose a different approach using Medusa's framework.
This guide provides an example of an approach to implement subscriptions. You're free to choose a different approach using the Medusa Framework.
</Note>
@@ -131,7 +131,7 @@ In the example above, you create a `handlePayment` function in the payment compo
- Send a request to the [Complete Cart API route](!api!/store#carts_postcartsidcomplete) once all actions with the third-party payment provider are performed.
- In the received response of the request, if the `type` is `cart`, it means that the cart completion failed. The error is set in the `error` response field.
- If the `type` is `order`, it means the card was completed and the order was placed successfully. You can access the order in the `order` response field.
- When the order is placed, you must unset the `cart_id` from the `localStorage`. You can redirect the customer to an order success page at this point. The redirection logic depends on the framework you're using.
- When the order is placed, you must unset the `cart_id` from the `localStorage`. You can redirect the customer to an order success page at this point. The redirection logic depends on the storefront framework you're using.
---
@@ -118,4 +118,4 @@ export const highlights = [
After the customer enters and submits their email, you send a request to the [Update Cart API route](!api!/store#carts_postcartsid) passing it the email in the request body.
Notice that if the cart doesn't have items, you should redirect to another page as the checkout requires at least one item in the cart. Redirecting to another page is not covered in this guide as this depends on the framework you're using.
Notice that if the cart doesn't have items, you should redirect to another page as the checkout requires at least one item in the cart. Redirecting to another page is not covered in this guide as this depends on the storefront framework you're using.
@@ -219,7 +219,7 @@ In the code snippet above, you:
- In the resolution function, you send a request to the [Complete Cart API route](!api!/store#carts_postcartsidcomplete) to complete the cart and place the order.
- In the received response of the request, if the `type` is `cart`, it means that the cart completion failed. The error is set in the `error` response field.
- If the `type` is `order`, it means the card was completed and the order was placed successfully. You can access the order in the `order` response field.
- When the order is placed, you refresh the cart. You can redirect the customer to an order success page at this point. The redirection logic depends on the framework you're using.
- When the order is placed, you refresh the cart. You can redirect the customer to an order success page at this point. The redirection logic depends on the storefront framework you're using.
---