docs: added dividers + see also section (#2899)
This commit is contained in:
@@ -14,6 +14,8 @@ This plugin is a [community plugin](https://github.com/Deathwish98/medusa-plugin
|
||||
|
||||
By integrating Strapi to Medusa, you can benefit from powerful features in your ecommerce store including detailed product CMS details, [two-way sync](#test-two-way-sync), an easy-to-use interface to use for static content and pages, and much more.
|
||||
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Medusa CLI
|
||||
@@ -24,6 +26,8 @@ By integrating Strapi to Medusa, you can benefit from powerful features in your
|
||||
|
||||
Redis is required for the Strapi plugin to work as expected on your Medusa server. If you don’t have it installed, you can learn [how to install it in this documentation](../tutorial/0-set-up-your-development-environment.mdx#redis).
|
||||
|
||||
---
|
||||
|
||||
## Create Strapi Project
|
||||
|
||||
The first step is to create a Strapi project using the Medusa template:
|
||||
@@ -52,6 +56,8 @@ Click on the Create new entry button at the top right. This opens a new form to
|
||||
|
||||
Enter the user’s username, email, and password. Once you’re done, click on the Save button at the top right.
|
||||
|
||||
---
|
||||
|
||||
## Modify Permissions
|
||||
|
||||
By default, created users have the “Authenticated” role. Before you start using the Strapi plugin on your Medusa server, you must modify this role’s permissions to allow making changes to Medusa’s models in Strapi.
|
||||
@@ -62,6 +68,8 @@ On your Strapi dashboard, go to Settings → Roles → Authenticated. Then, unde
|
||||
|
||||
Once you’re done, click the Save button at the top right.
|
||||
|
||||
---
|
||||
|
||||
## Create Medusa Server
|
||||
|
||||
:::note
|
||||
@@ -100,6 +108,8 @@ It is also recommended to use PostgreSQL for an optimal experience, however, it
|
||||
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## Install the Strapi Plugin
|
||||
|
||||
In the directory of your Medusa server, run the following command to install the Strapi plugin:
|
||||
@@ -144,6 +154,8 @@ const plugins = [
|
||||
];
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Run Medusa Server
|
||||
|
||||
Make sure the Strapi server is still running. If not, you can run the following command to run the Strapi server in the directory of the Strapi project:
|
||||
@@ -160,6 +172,8 @@ npm run start
|
||||
|
||||
Once you start your Medusa server, if you ran the `--seed` command when you created your Medusa server, you’ll see that `product.created` events have been triggered along with similar events. This will update Strapi with the products you seeded.
|
||||
|
||||
---
|
||||
|
||||
## Test Two-Way Sync
|
||||
|
||||
This plugin ensures a two-way sync between the Medusa server and the Strapi server. So, if you update data on Strapi, it will be reflected on your Medusa server, and vice-versa.
|
||||
@@ -172,7 +186,9 @@ Try updating any products on Strapi by going to Content Manager → Products and
|
||||
|
||||
If you try to update products on Medusa either using the [REST APIs](https://docs.medusajs.com/api/admin/#tag/Product/operation/PostProductsProduct) or using [the Medusa Admin](../user-guide/products/manage.mdx), you’ll see that the product is also updated on Strapi.
|
||||
|
||||
## What’s Next
|
||||
---
|
||||
|
||||
- Learn [how to deploy the Medusa server](../deployments/server/index.mdx).
|
||||
- Learn [how to create your own plugin](../advanced/backend/plugins/create.md).
|
||||
## See Also
|
||||
|
||||
- [Deploy the Medusa server](../deployments/server/index.mdx)
|
||||
- [Create your own plugin](../advanced/backend/plugins/create.md)
|
||||
|
||||
Reference in New Issue
Block a user