docs: added dividers + see also section (#2899)

This commit is contained in:
Shahed Nasser
2022-12-26 15:52:08 +02:00
committed by GitHub
parent b0e5769e27
commit b0ebfd6bcf
100 changed files with 1047 additions and 291 deletions
+21 -3
View File
@@ -2,6 +2,8 @@
In this document, youll learn how to install the [Algolia plugin](https://github.com/medusajs/medusa/tree/master/packages/medusa-plugin-algolia) and use it on both your Medusa Server and your storefront.
---
## Overview
[Algolia](https://www.algolia.com/) is a search engine service that allows developers to integrate advanced search functionalities into their websites including typo tolerance, recommended results, and quick responses.
@@ -10,6 +12,8 @@ Algolia can be used for a wide range of use cases, including ecommerce websites.
Through Medusa's flexible plugin system, it is possible to add a search engine to your Medusa server and storefront using Algolia with just a few steps.
---
## Prerequisites
### Medusa Components
@@ -28,6 +32,8 @@ If you dont install and configure Redis on your Medusa server, the Algolia in
You need to [create an Algolia account](https://www.algolia.com/users/sign_up) before you follow this documentation. Algolia offers a free plan to get started quickly.
---
## Create an Algolia App
The first step is to create an Algolia app for your Medusa server. To create one, open the [Applications page](https://www.algolia.com/account/applications) or, on your dashboard, go to Settings then choose Applications.
@@ -50,6 +56,8 @@ In the last step, youll see a summary of your order. If all looks good, check
![Summary of your application's order with the terms and agreement checkboxes checked](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000019/Medusa%20Docs/Algolia/PTI2Swq_a1qbi5.png)
---
## Retrieve API Keys
To retrieve the API keys that youll use in the next sections, go to Settings, then choose API Keys in the Team and Access section.
@@ -66,6 +74,8 @@ If you have more than one application in your Algolia account, make sure your
![Application ID, Search-Only API Key, and Admin API Key can be found in the API Keys page](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000037/Medusa%20Docs/Algolia/i50Irki_jmtyk6.png)
---
## Install the Algolia Plugin
In the directory of your Medusa server, run the following command to install the Algolia plugin:
@@ -118,6 +128,8 @@ const plugins = [
The `searchableAttributes` are the attributes in a product that are searchable, and `attributesToRetrieve` are the attributes to retrieve for each product result. Youre free to make changes to these attributes as you see fit, but these are the recommended attributes.
---
## Test the Algolia Plugin
Run your Medusa server with the following command:
@@ -150,6 +162,8 @@ This feature is only available if you have Redis installed and configured with y
:::
---
## Add Search to your Storefront
In this section, youll learn how to add the UI on your storefront to allow searching with Algolia. This section has instructions for Medusas [Next.js](../starters/nextjs-medusa-starter.mdx) storefront as well as React-based frameworks such as the [Gatsby](../starters/gatsby-medusa-starter.mdx) storefront.
@@ -213,6 +227,8 @@ To make sure the Next.js storefront properly displays the products in the search
![Search pop up in the Next.js storefront](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000082/Medusa%20Docs/Algolia/1f9qqK6_c0z8zi.png)
---
## Add to Gatsby and React-Based Storefronts
This section covers adding the search UI to React-based storefronts. It uses the Gatsby storefront as an example, but you can use the same steps on any React-based framework.
@@ -327,7 +343,9 @@ If you run your Gatsby storefront while the Medusa server is running, you should
![Search bar in the Gatsby storefront](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000097/Medusa%20Docs/Algolia/INtlcIo_jlh16x.png)
## Whats Next
---
- Learn how to [deploy your Medusa server](../deployments/server/index.mdx).
- Learn how to [deploy your Gatsby storefront](../deployments/storefront/deploying-gatsby-on-netlify.md).
## See Also
- [Deploy your Medusa server](../deployments/server/index.mdx)
- [Deploy your Gatsby storefront](../deployments/storefront/deploying-gatsby-on-netlify.md)
@@ -12,10 +12,14 @@ On your storefront, you can add any necessary components that can render the Con
As an example to explain this process, in this documentation, youll create a migration that creates a Rich Text content model in Contentful and edits the Page and Product content models to allow using Rich Text content as a tile in pages and products. Then, youll modify the Gatsby storefront to render the Rich Text content model.
---
## Prerequisites
Its assumed you already have set up a Medusa server integrated with Contentful and have a Gatsby storefront integrated with Contentful. If not, [please follow this documentation first](index.md).
---
## Create a Contentful Migration
The Contentful migrations are located in the `contentful-migrations` directory in the Medusa Contentful server starter. So, if you want to create your own Contentful migrations, you can create them under that directory.
@@ -144,6 +148,8 @@ Similarly, you can add Rich Text content to any product page.
![A rich text content is added to a product](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001305/Medusa%20Docs/Contentful/wgI8mEB_wbukpd.png)
---
## Render New Content Models in the Storefront
After creating a new content model in your Contentful Space, you must add the necessary component to render it in your Gatsby storefront.
@@ -308,7 +314,9 @@ Restart the Gatsby storefront then open a product that you added Rich Text conte
![Rich Text content you added to the product should be visible at the end of the page](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001342/Medusa%20Docs/Contentful/LGiVMxx_rqsr2l.png)
## Whats Next
---
- Learn how to deploy your Medusa server to [Heroku](../../deployments/server/deploying-on-heroku.mdx), [Qovery](../../deployments/server/deploying-on-qovery.md), or [DigitalOcean](../../deployments/server/deploying-on-digital-ocean.md).
- Learn [how to deploy your Gatsby storefront to Netlify](../../deployments/storefront/deploying-gatsby-on-netlify.md).
## See Also
- Deploy your Medusa server to [Heroku](../../deployments/server/deploying-on-heroku.mdx), [Qovery](../../deployments/server/deploying-on-qovery.md), or [DigitalOcean](../../deployments/server/deploying-on-digital-ocean.md).
- [How to deploy your Gatsby storefront to Netlify](../../deployments/storefront/deploying-gatsby-on-netlify.md).
+20 -3
View File
@@ -8,6 +8,8 @@ In this document, youll learn how to integrate a Medusa server with Contentfu
By integrating Contentful to Medusa, you can benefit from powerful features in your ecommerce store including detailed product CMS details, easy-to-use interface to use for static content and pages, localization, and much more.
---
## Prerequisites
### Needed Accounts
@@ -22,6 +24,8 @@ By integrating Contentful to Medusa, you can benefit from powerful features in y
- Gatsbys CLI tool. You can follow [this documentation to install it](https://www.gatsbyjs.com/docs/reference/gatsby-cli/#how-to-use-gatsby-cli).
- Medusas CLI tool. You can follow [this documentation to install it](../../cli/reference.md#how-to-install-cli-tool).
---
## Install Medusa Server Using Contentful Starter
Instead of using the default Medusa Server starter, you must use the [Contentful starter](https://github.com/medusajs/medusa-starter-contentful) to install a server that is ready to be used with Contentful. This server contains all the necessary files to make the integration work.
@@ -181,10 +185,14 @@ If you seeded the database with demo data, you should see that events related to
The Contentful integration ensures a two-way sync between the Medusa server and Contentful. So, when new products are added to Medusa, these products will be added to your Contentful Space as well.
---
## (Optional) Add Products with the Medusa Admin
Using the Medusa admin, you can add products to your Medusa server. This will trigger product events that subsequently add these products to Contentful.
---
## Manage Contentful Data
### Publish Products
@@ -217,6 +225,8 @@ Once youre done adding products, click on Publish changes in the right sideba
![Click on the publish changes button on the right](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001508/Medusa%20Docs/Contentful/URNpkXq_cb5ppp.png)
---
## Setup Gatsby Storefront
In this section, youll set up the Gatsby storefront of your Medusa server.
@@ -264,6 +274,8 @@ This starts the storefront at `localhost:8000`. Open it in your browser and you
![The storefront with the featured products section](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001537/Medusa%20Docs/Contentful/f6xwYbS_w1v993.png)
---
## Make Changes to Content
You can update the CMS content of your storefront in your Contentful Space. This includes the CMS pages or product details.
@@ -274,8 +286,13 @@ If you make changes to the data while your Gatsby storefront is running, the cha
:::
---
## Whats Next
- Learn [how to customize your Contentful server and storefront](./customize-contentful.md).
- Learn how to deploy your Medusa server to [Heroku](../../deployments/server/deploying-on-heroku.mdx), [Qovery](../../deployments/server/deploying-on-qovery.md), or [DigitalOcean](../../deployments/server/deploying-on-digital-ocean.md).
- Learn [how to deploy your Gatsby storefront to Netlify](../../deployments/storefront/deploying-gatsby-on-netlify.md).
Learn [How to customize your Contentful server and storefront](./customize-contentful.md).
## See Also
- How to deploy your Medusa server to [Heroku](../../deployments/server/deploying-on-heroku.mdx), [Qovery](../../deployments/server/deploying-on-qovery.md), or [DigitalOcean](../../deployments/server/deploying-on-digital-ocean.md).
- [How to deploy your Gatsby storefront to Netlify](../../deployments/storefront/deploying-gatsby-on-netlify.md).
+9 -1
View File
@@ -8,6 +8,8 @@ In this document, youll learn how to integrate Klarna as a payment provider i
You can integrate Klarna into Medusa using the [official plugin](https://github.com/medusajs/medusa/tree/master/packages/medusa-payment-klarna).
---
## Prerequisites
### Medusa Components
@@ -20,6 +22,8 @@ In addition, youll need to use the [Medusa Admin](../admin/quickstart.mdx) to
- A [Klarna business account](https://portal.klarna.com/)
---
## Install Plugin
On your Medusa server, run the following command to install the plugin:
@@ -69,12 +73,16 @@ const plugins = [
];
```
---
## Enable Klarna in Regions
To use Klarna in your store, you must enable it in at least one region.
You can follow [this user guide to learn how to enable a payment provider in a region](../user-guide/regions/providers#manage-payment-providers). You can alternatively use the [REST APIs](/api/admin/#tag/Region/operation/PostRegionsRegionPaymentProviders).
## Whats Next
---
## See Also
- Check out [more plugins](https://github.com/medusajs/medusa/tree/master/packages) you can add to your store.
+16 -2
View File
@@ -14,12 +14,16 @@ This plugin is only used to allow your customers to subscribe but does not actua
:::
---
## Prerequisites
Before going further with this guide make sure you have a Medusa server set up. You can follow the [Quickstart guide](https://docs.medusajs.com/quickstart/quick-start).
You also need a Mailchimp account, so please [create one](https://mailchimp.com/signup) before you start.
---
## Obtain Mailchimp Keys
To integrate the plugin into Medusa you need two keys: The API Key and the Newsletter list or Audience ID. The API Key acts as a credential for your account, whereas the Newsletter list ID determines which audience should the subscribed customers be added to.
@@ -28,6 +32,8 @@ You can follow [this guide](https://mailchimp.com/help/about-api-keys/#Find_or_g
You can follow [this guide](https://mailchimp.com/help/find-audience-id/) from Mailchimps documentation to obtain your Newsletter list or Audience ID.
---
## Install the Plugin
In the directory of your Medusa server, run the following command to install the Mailchimp plugin:
@@ -64,6 +70,8 @@ const plugins = [
];
```
---
## Test it Out
This plugin adds a new `POST` endpoint at `/mailchimp/subscribe`. This endpoint requires in the body of the request an `email` field. You can also optionally include a `data` object that holds any additional data you want to send to Mailchimp. You can check out [Mailchimps subscription documentation](https://mailchimp.com/developer/marketing/api/list-members/add-member-to-list/) for more details on the data you can send.
@@ -101,6 +109,8 @@ Heres an example of sending additional data with the subscription:
All fields inside `data` will be sent to Mailchimps API along with the email.
---
## Use Mailchimp Service
If you want to subscribe to users without using this endpoint or at a specific place in your code, you can use Mailchimps service `mailchimpService` in your endpoints, services, or subscribers. This service has a method `subscribeNewsletter` which lets you use the subscribe functionality.
@@ -122,6 +132,8 @@ You can learn more about how you can use services in your endpoints, services, a
:::
---
## Add Subscription Form
This section has a simple example of adding a subscription form in your storefront. The code is for React-based frameworks but you can use the same logic for your storefronts regardless of the framework you are using.
@@ -177,7 +189,9 @@ This will result in a subscription form similar to the following:
If you try entering an email and clicking Subscribe, the email will be subscribed to your Mailchimp newsletter successfully.
## Whats Next
---
## See Also
- Check out [SendGrid plugin](../add-plugins/sendgrid.mdx) for more Email functionalities.
- [Learn more about plugins.](../advanced/backend/plugins/overview.md)
- [Plugins Overview](../advanced/backend/plugins/overview.md)
+13 -3
View File
@@ -10,6 +10,8 @@ MeiliSearch also provides a pleasant developer experience, as it is extremely in
Through Medusa's flexible plugin system, it is possible to add a search engine to your Medusa server and storefront using MeiliSearch with just a few steps.
---
## Prerequisites
### Medusa Components
@@ -30,6 +32,8 @@ You must install MeiliSearch to use it with Medusa. You can follow [this documen
Furthermore, you should create a master key for your MeiliSearch instance. If you dont have one created, follow [this guide](https://docs.meilisearch.com/learn/security/master_api_keys.html#protecting-a-meilisearch-instance) to create a master key.
---
## Install the MeiliSearch Plugin
In the directory of your Medusa server, run the following command to install the MeiliSearch plugin:
@@ -77,6 +81,8 @@ const plugins = [
You can change the `searchableAttributes` and `displayedAttributes` as you see fit. However, the attributes included are the recommended attributes.
---
## Test MeiliSearch Plugin
Make sure your MeiliSearch instance is running. If youre unsure how to run it, you can check the [installation documentation](https://docs.meilisearch.com/learn/getting_started/quick_start.html#setup-and-installation) for the command to run the MeiliSearch instance.
@@ -105,6 +111,8 @@ This feature is only available if you have Redis installed and configured with y
:::
---
## Add Search to your Storefront
In this section, youll learn how to add the UI on your storefront to allow searching with MeiliSearch. This section has instructions for Medusas [Next.js](../starters/nextjs-medusa-starter.mdx) storefront as well as React-based frameworks such as the [Gatsby storefront](../starters/gatsby-medusa-starter.mdx).
@@ -286,7 +294,9 @@ If you run your Gatsby storefront while the Medusa server and the MeiliSearch in
![Search box in the header of the storefront](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000317/Medusa%20Docs/MeiliSearch/ZkRgF2h_ytnpv9.png)
## Whats Next
---
- Learn how to [deploy your Medusa server](../deployments/server/index.mdx).
- Learn how to [deploy your Gatsby storefront](./../deployments/storefront/deploying-gatsby-on-netlify.md).
## See Also
- [Deploy your Medusa server](../deployments/server/index.mdx).
- [Deploy your Gatsby storefront](./../deployments/storefront/deploying-gatsby-on-netlify.md).
+15 -1
View File
@@ -8,10 +8,14 @@ To manage images in Medusa, you need a file service plugin responsible for hosti
Medusa provides three different options to handle your file storage. This document will focus on setting up [MinIO](https://min.io) on your local machine and connecting Medusa to it.
---
## Prerequisites
A Medusa server is required to be set up before following along with this document. You can follow the [quickstart guide](../quickstart/quick-start.mdx) to get started in minutes.
---
## Set up MinIO
You can follow [MinIOs guide to install it](https://docs.min.io/minio/baremetal/quickstart/quickstart.html) on your machine based on your operating system.
@@ -76,6 +80,8 @@ You will not be able to access the Secret Key after closing the pop-up. So, make
:::
---
## Plugin Installation
In the directory of your Medusa server, run the following command to install the MinIO plugin:
@@ -115,12 +121,16 @@ If you have multiple storage plugins configured, the last plugin declared in the
:::
---
## Test it Out
Run your Medusa server alongside the [Medusa Admin](../admin/quickstart.mdx) to try out your new file service. Upon editing or creating products, you can now upload thumbnails and images, that are stored in a MinIO server.
![Image Uploaded on Admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000429/Medusa%20Docs/MinIO/alabX2i_dzg2mh.png)
---
## Private Buckets
### Handle Exports
@@ -181,6 +191,8 @@ Then, add two new options to the plugins options in `medusa-config.js`:
},
```
---
## Next.js Storefront Configuration
If youre using a [Next.js](../starters/nextjs-medusa-starter.mdx) storefront, you need to add an additional configuration that adds the MinIO domain name into the configured images domain names. This is because all URLs of product images will be from the MinIO server.
@@ -207,6 +219,8 @@ module.exports = withStoreConfig({
Where `127.0.0.1` is the domain of your local MinIO server.
## Whats Next
---
## See Also
- Check out [more plugins](https://github.com/medusajs/medusa/tree/master/packages) you can add to your store.
+13 -1
View File
@@ -10,6 +10,8 @@ As a developer, you can use PayPals SDKs and APIs to integrate PayPal as a pa
Using the `medusa-payment-paypal` plugin, this guide shows you how to set up your Medusa server with PayPal as a payment provider.
---
## Prerequisites
Before you proceed with this guide, make sure you create a [PayPal account](https://www.paypal.com). You also need a PayPal Developer account and retrieve the Client ID and Client Secret. You can learn more about how to do that in [PayPals documentation](https://developer.paypal.com/api/rest/).
@@ -22,6 +24,8 @@ Additionally, you need a Medusa server installed and set up. If not, you can fol
You also need [Medusa Admin](../admin/quickstart.mdx) installed to enable PayPal as a payment provider. You can alternatively use the [REST APIs](https://docs.medusajs.com/api/admin).
---
## Medusa Server
### Install the PayPal Plugin
@@ -68,6 +72,8 @@ const plugins = [
Thats all you need to install PayPal on your Medusa server!
---
## Admin Setup
This section will guide you through adding PayPal as a payment provider in a region using your Medusa admin dashboard.
@@ -82,6 +88,8 @@ If you dont have a Medusa admin installed, make sure to follow along with [th
You can refer to [this documentation in the user guide](../user-guide/regions/providers.mdx#manage-payment-providers) to learn how to add a payment provider like PayPal to a region.
---
## Storefront Setup
This section will take you through the steps to add PayPal as a payment method on the storefront. It includes the steps necessary when using one of Medusas official storefronts as well as your own custom React-based storefront.
@@ -384,6 +392,8 @@ If you run the Medusa server and the storefront server, you should see the PayPa
![PayPal Button](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000492/Medusa%20Docs/PayPal/PsibgPY_xtqdli.png)
---
## Capture Payments
After the customer places an order, you can see the order on the admin panel. In the payment information under the “Payment” section, you should see a “Capture” button.
@@ -394,6 +404,8 @@ Clicking this button lets you capture the payment for an order. You can also ref
Refunding or Capturing payments is reflected in your PayPal dashboard as well.
## What's Next
---
## See Also
- Check out [more plugins](https://github.com/medusajs/medusa/tree/master/packages) you can add to your store.
+17 -3
View File
@@ -8,6 +8,8 @@ To manage images in Medusa, you need a file service plugin responsible for hosti
Medusa provides three different options to handle your file storage. This document focuses on using [S3](https://aws.amazon.com/s3/) to store your Medusa servers images.
---
## Prerequisites
### Medusa Server
@@ -18,6 +20,8 @@ A Medusa server is required to be set up before following along with this docume
You need to [create an AWS account](https://console.aws.amazon.com/console/home?nc2=h_ct&src=header-signin) to follow along with this documentation.
---
## Create S3 Bucket
On your AWS Console, search for S3 in the search box at the top. Then, choose the first result you see which should be S3 under the Services category.
@@ -42,6 +46,8 @@ Then, in the “Block Public Access settings for this bucket” section, uncheck
You can leave the rest of the fields in the form as is and scroll down to the end of the page. Then, click on the Create Bucket button.
---
## Manage Bucket Policies
On the page of the bucket you just created, click on the Permissions tab. Then, scroll down until you find the Bucket policy section. Click on Edit in that section.
@@ -80,6 +86,8 @@ Your user must have the `AmazonS3FullAccess` policy attached to it. You can refe
You must obtain access keys for your user as youll use them to integrate the S3 plugin in Medusa with your bucket. To obtain the Access Key ID and the Secret Access Key, check out [this guide](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys).
---
## Install the S3 Plugin
In the directory of your Medusa server, run the following command to install the S3 Plugin:
@@ -157,6 +165,8 @@ If you have multiple storage plugins configured, the last plugin declared in the
:::
---
## Test the S3 Plugin
Run your Medusa server with the following command:
@@ -175,6 +185,8 @@ You can also check that the image was uploaded on the S3 buckets page.
![Image is now available in the S3 Bucket](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000630/Medusa%20Docs/S3/NJZ5bP8_ovv9rc.png)
---
## Next.js Storefront Configuration
If youre using a [Next.js](../starters/nextjs-medusa-starter.mdx) storefront, you need to add an additional configuration that adds the S3 bucket domain name into the configured images domain names. This is because all URLs of product images will be from the S3 bucket.
@@ -201,8 +213,10 @@ module.exports = withStoreConfig({
Where `<BUCKET_NAME>` is the name of the S3 bucket youre using.
## Whats Next
---
## See Also
- Check out [more plugins](https://github.com/medusajs/medusa/tree/master/packages) you can add to your store.
- Learn how to [deploy the Medusa server](../deployments/server/index.mdx).
- Learn about the [Next.js](../starters/nextjs-medusa-starter.mdx) and [Gatsby](../starters/gatsby-medusa-starter.mdx) storefronts.
- [Deploy the Medusa server](../deployments/server/index.mdx)
- Install the [Next.js](../starters/nextjs-medusa-starter.mdx) or [Gatsby](../starters/gatsby-medusa-starter.mdx) storefronts.
+17 -4
View File
@@ -36,6 +36,8 @@ Check out the [Event Reference](../advanced/backend/subscribers/events-list.md)
:::
---
## Prerequisites
### Medusa Server
@@ -48,6 +50,8 @@ In addition, make sure to have Redis installed and configured with your Medusa s
You need to [create a Segment account](https://app.segment.com/signup/) to follow along with the tutorial. Segment offers a free plan to get started quickly.
---
## Create a Segment Source
On your Segment dashboard, choose Catalog from the sidebar under Connections.
@@ -84,6 +88,8 @@ You can then choose from a list of destinations such as Google Universal Analyti
The process of integrating each destination is different, so you must follow the steps detailed in Segment for each destination you choose.
---
## Install the Segment Plugin
In the directory of your Medusa server, run the following command to install the Segment plugin:
@@ -114,6 +120,8 @@ const plugins = [
];
```
---
## Test the Plugin
Run your server with the following command:
@@ -136,6 +144,8 @@ If the data is not appearing on the destination, the issue is related to your co
:::
---
## Add Custom Tracking
In some cases, you might want to track more events or custom events. You can do that using the `SegmentService` provided by the Segment Plugin.
@@ -185,8 +195,11 @@ After adding the above subscriber, run your server again if it isnt running a
![The customer created event is recoreded on the Segment source](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000759/Medusa%20Docs/Segment/4LD41xE_qungdw.png)
## Whats Next
---
- Learn how [services](../advanced/backend/services/create-service.md) and [subscribers](../advanced/backend/subscribers/create-subscriber.md) work.
- Check out a [full list of events](../advanced/backend/subscribers/events-list.md) in Medusa.
- Learn how to [deploy the Medusa server](../deployments/server/index.mdx).
## See Also
- [Services Overview](../advanced/backend/services/create-service.md)
- [Subscribers Overview](../advanced/backend/subscribers/create-subscriber.md)
- [Events Reference](../advanced/backend/subscribers/events-list.md)
- [Deploy the Medusa server](../deployments/server/index.mdx)
+15 -3
View File
@@ -20,12 +20,16 @@ By integrating SendGrid with Medusa, youll be sending email notifications to
4. User-related events including reset passwords.
5. Restock Notifications for when product stocks are low.
---
## Prerequisites
Before going further with this guide make sure you have a Medusa server set up. You can follow the [Quickstart guide](../quickstart/quick-start.mdx).
You also must have [Redis configured on your Medusa server](/tutorial/set-up-your-development-environment#redis). Sending emails is done through Subscribers, which uses Redis as the event queue. If you dont set up Redis, the plugin will not send emails.
---
## Create a SendGrid Account
If you dont have a SendGrid account, make sure to [create one](https://signup.sendgrid.com) first. You also need to set up a [single sender](https://docs.sendgrid.com/ui/sending-email/sender-verification) first in SendGrid before you can start sending emails.
@@ -60,6 +64,8 @@ Medusa supports localization so you can also create multiple templates for multi
:::
---
## Template Reference
This section covers the template types supported by the plugin and what variables you can expect in your dynamic template. You can use the variables to add details like order total or customer name.
@@ -3891,6 +3897,8 @@ You dont have to create a template for every type in the reference. You can s
```
</details>
---
## Install the SendGrid Plugin
In the directory of your Medusa server run the following command to install the SendGrid plugin:
@@ -3941,6 +3949,8 @@ The `api_key` and `from` options are required. Then, use the key of each templat
You can also optionally pass the option `localization` if you want to support different languages. `localization` accepts an object that has the country and language codes as keys. The value for each code should be an object of template keys and their IDs as values. Make sure to include the localized template IDs in `.env` as well.
---
## Test it Out
Run your server now:
@@ -3961,7 +3971,9 @@ You can also track analytics related to emails sent from the SendGrid dashboard.
![SendGrid Analytics](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000788/Medusa%20Docs/SendGrid/X01LigH_mxmtbn.png)
## Whats Next
---
- Learn more about how [Notifications work in Medusa](../advanced/backend/notification/overview.md).
- Install the [Medusa admin](https://github.com/medusajs/admin#-setting-up-admin) for functionalities like Gift Cards creation, swaps, claims, order return requests, and more.
## See Also
- [Notifications Overview](../advanced/backend/notification/overview.md)
- Install the [Medusa admin](../admin/quickstart.mdx) for functionalities like Gift Cards creation, swaps, claims, order return requests, and more.
+11 -3
View File
@@ -17,6 +17,8 @@ The plugin registers a subscriber to the `order.placed` event. When an order is
Then, the order notificaiton is sent to Slack using Webhooks. So, you'll need to create a Slack App, add it into your workspace, and activate Incoming Webhooks.
---
## Prerequisites
### Slack Account
@@ -35,6 +37,8 @@ As the Slack plugin will listen to the `order.placed` event to know when to send
You can read the [Set up your development enviornment guideline](../tutorial/0-set-up-your-development-environment.mdx#redis) to learn more about how you can install and setup Redis.
---
## Create Slack App
The first step is to create a Slack app. This app will be connected to your workspace and will have Incoming Webhooks activated to receive notifications from the Medusa server using a Webhook URL.
@@ -63,6 +67,8 @@ After that, choose the channel to send the notifications to. You can also choose
This will create a new Webhook with a URL which you can see in the table at the end of the Incoming Webhooks page. Copy the URL as youll use it in the next section.
---
## Install Slack Plugin
The next step is to install Medusas [Slack plugin](https://github.com/medusajs/medusa/tree/master/packages/medusa-plugin-slack-notification) into your Medusa server.
@@ -95,7 +101,9 @@ const plugins = [
Thats all you need to do to integrate Slack into Medusa!
## What's Next
---
- Install [Medusa's Admin](https://github.com/medusajs/admin) for the full order-management experience.
- Add a Storefront to your Medusa server using [the Next.js starter](https://docs.medusajs.com/starters/nextjs-medusa-starter) or [the Gatsby starter](https://docs.medusajs.com/starters/gatsby-medusa-starter).
## See Also
- Install [Medusa's Admin](../admin/quickstart.mdx) for the full order-management experience.
- Install the [Next.js](../starters/nextjs-medusa-starter.mdx) or [Gatsby](../starters/gatsby-medusa-starter.mdx) starter storefronts.
+17 -3
View File
@@ -14,6 +14,8 @@ To manage images in Medusa, you need a file service plugin responsible for hosti
Medusa provides three different options to handle your file storage. This document focuses on using [Spaces](https://www.digitalocean.com/products/spaces) to store your Medusa servers images.
---
## Prerequisites
### Medusa Server
@@ -24,6 +26,8 @@ A Medusa server is required to be set up before following along with this docume
You need to [create a DigitalOcean account](https://cloud.digitalocean.com/registrations/new) to follow along with this documentation. A credit card is required during registration.
---
## Create DigitalOcean Space
In your DigitalOcean account, click on the Create button at the top right, then choose Spaces from the dropdown.
@@ -40,6 +44,8 @@ In the Finalize and Create section, enter a name for the field “Choose a uniqu
Once youre done, click on the Create a Space button. This creates the Space and redirects you to the Spaces page.
---
## Create Space Access Keys
Choose API from the bottom of the sidebar.
@@ -62,6 +68,8 @@ The secret access key will not be shown again after you leave the page. Make sur
:::
---
## Install the Spaces Plugin
In the directory of your Medusa server, run the following command to install the Spaces plugin:
@@ -117,6 +125,8 @@ If you have multiple storage plugins configured, the last plugin declared in the
:::
---
## Test the Space Plugin
Run your Medusa server with the following command:
@@ -135,6 +145,8 @@ You can also check that the image was uploaded on the Spaces page.
![Image can be seen on the Space's page on DigitalOcean](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001050/Medusa%20Docs/Spaces/BexmRkg_gimk1d.png)
---
## Next.js Storefront Configuration
If youre using a [Next.js](../starters/nextjs-medusa-starter.mdx) storefront, you need to add an additional configuration that adds the Spaces domain name into the configured images domain names. This is because all URLs of product images will be from the Space.
@@ -161,8 +173,10 @@ module.exports = withStoreConfig({
Where `<YOUR_SPACE_DOMAIN>` is the domain name for your Space which can be retrieved from the Space URL. For example, `medusa-server.fra1.digitaloceanspaces.com`.
## Whats Next
---
## See Also
- Check out [more plugins](https://github.com/medusajs/medusa/tree/master/packages) you can add to your store.
- Learn how to [deploy the Medusa server on DigitalOcean](../deployments/server/deploying-on-digital-ocean.md).
- Learn about the [Next.js](../starters/nextjs-medusa-starter.mdx) and [Gatsby](../starters/gatsby-medusa-starter.mdx) storefronts.
- [Seploy the Medusa server on DigitalOcean](../deployments/server/deploying-on-digital-ocean.md).
- Install the [Next.js](../starters/nextjs-medusa-starter.mdx) or [Gatsby](../starters/gatsby-medusa-starter.mdx) storefront.
+19 -3
View File
@@ -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 dont 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 users username, email, and password. Once youre 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 roles permissions to allow making changes to Medusas models in Strapi.
@@ -62,6 +68,8 @@ On your Strapi dashboard, go to Settings → Roles → Authenticated. Then, unde
Once youre 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, youll 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), youll see that the product is also updated on Strapi.
## Whats 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)
+13 -1
View File
@@ -18,10 +18,14 @@ You can also follow this video guide to learn how the setup works:
Using the `medusa-payment-stripe` plugin, this guide shows you how to set up your Medusa project with Stripe as a payment provider.
---
## Prerequisites
Before you proceed with this guide, make sure you create a [Stripe account](https://stripe.com). Youll later retrieve the API Keys and secrets from your account to connect Medusa to your Stripe account.
---
## Medusa Server
This section guides you over the steps necessary to add Stripe as a payment provider to your Medusa server.
@@ -95,6 +99,8 @@ After the Webhook is created, youll see "Signing secret" in the Webhook detai
STRIPE_WEBHOOK_SECRET=whsec_...
```
---
## Admin Setup
This section will guide you through adding Stripe as a payment provider in a region using your Medusa admin dashboard.
@@ -109,6 +115,8 @@ If you dont have a Medusa admin installed, make sure to follow along with [th
You can refer to [this documentation in the user guide](../user-guide/regions/providers.mdx#manage-payment-providers) to learn how to add a payment provider like Stripe to a region.
---
## Storefront Setup
This guide will take you through how to set up Stripe payments in your Medusa storefront. It includes the steps necessary when using one of Medusas official storefronts as well as your own custom React-based storefront.
@@ -346,6 +354,8 @@ If you run your server and storefront now, youll see the Stripe UI element an
![Stripe Form](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001190/Medusa%20Docs/Stripe/NOi8THw_xv3zsx.png)
---
## Capture Payments
After the customer places an order, youll be able to see the order on the admin panel. In the payment information under the “Payment” section, you should see a “Capture” button.
@@ -356,6 +366,8 @@ Clicking this button allows you to capture the payment for an order. You can als
Refunding or Capturing payments is reflected in your Stripes dashboard as well. This gives you access to all of Stripes analytical capabilities.
## Whats Next
---
## See Also
- Check out [more plugins](https://github.com/medusajs/medusa/tree/master/packages) you can add to your store.
+12 -2
View File
@@ -14,16 +14,22 @@ This plugin only gives you access to the Twilio SMS API but does not implement s
:::
---
## Prerequisites
Before going further with this guide make sure you have a Medusa server set up. You can follow the [Quickstart guide](../quickstart/quick-start.mdx) if you dont.
You also must have a [Twilio account created](https://www.twilio.com/sms) so if you dont already please go ahead and create one.
---
## Retrieve Credentials
For the [Twilio SMS plugin](https://github.com/medusajs/medusa/tree/master/packages/medusa-plugin-twilio-sms), you need three credentials from your Twilio account: Account SID, Auth Token, and a Twilio phone number to send from. You can find these three from your [Twilio Consoles homepage](https://console.twilio.com).
---
## Install Plugin
In the directory of your Medusa server, run the following command to install [Twilio SMS plugin](https://github.com/medusajs/medusa/tree/master/packages/medusa-plugin-twilio-sms):
@@ -58,6 +64,8 @@ const plugins = [
];
```
---
## Example Usage of the Plugin
This plugin adds the service `twilioSmsService` to your Medusa server. To send SMS using it, all you have to do is resolve it in your file as explained in the [Services](../advanced/backend/services/create-service.md#using-your-custom-service) documentation.
@@ -122,7 +130,9 @@ If youre on a Twilio trial make sure that the phone number you entered on che
![Twilio Dashboard](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001219/Medusa%20Docs/Stripe/MXtQMiL_kb7kxe.png)
## Whats Next
---
- Learn more about how [Notifications work in Medusa](../advanced/backend/notification/overview.md).
## See Also
- [Notifications Overview](../advanced/backend/notification/overview.md).
- Install the [Medusa admin](../admin/quickstart.mdx) for functionalities like Gift Cards creation, swaps, claims, order return requests, and more.