docs: migrated images to cloudinary from imgur (#2569)

This commit is contained in:
Shahed Nasser
2022-11-09 16:30:41 +02:00
committed by GitHub
parent 0a31ea9d43
commit 9e7e8c6d51
56 changed files with 326 additions and 328 deletions
+10 -10
View File
@@ -34,27 +34,27 @@ The first step is to create an Algolia app for your Medusa server. To create one
On the Applications page, click on the New application button at the top right.
![Click on New application button at the top right](https://i.imgur.com/WxckgS2.png)
![Click on New application button at the top right](https://res.cloudinary.com/dza7lstvk/image/upload/v1667999820/Medusa%20Docs/Algolia/WxckgS2_eygl8l.png)
In the new page that opens, optionally enter a name for the application and choose a subscription plan. You can choose the Free plan for now, but its recommended to switch to the Pay-as-you-go plan as your business grows.
![Optionally enter a name for the application and choose a subscription plan](https://i.imgur.com/jpM2EBU.png)
![Optionally enter a name for the application and choose a subscription plan](https://res.cloudinary.com/dza7lstvk/image/upload/v1667999980/Medusa%20Docs/Algolia/jpM2EBU_fui1lg.png)
Once youre done, click on the Next Step button. If you picked Pay as you go service, youll need to enter billing details before you proceed.
Then, youll be asked to pick a region for your application. Once youre done, click on Review Application Details.
![Select a region then click on Review Application Details at the bottom right](https://i.imgur.com/fahf2J2.png)
![Select a region then click on Review Application Details at the bottom right](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000005/Medusa%20Docs/Algolia/fahf2J2_qgm7sa.png)
In the last step, youll see a summary of your order. If all looks good, check the checkboxes at the end of the form to indicate that you agree to the terms and conditions. Then, click on the Create Application button.
![Summary of your application's order with the terms and agreement checkboxes checked](https://i.imgur.com/PTI2Swq.png)
![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.
![Click on API Keys in the Team and Access section of your settings](https://i.imgur.com/gnORibC.png)
![Click on API Keys in the Team and Access section of your settings](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000028/Medusa%20Docs/Algolia/gnORibC_msuur5.png)
On this page, youll find the Application ID, Search-Only API Key, and Admin API Key. Youll need the Application ID and Admin API Key for the Medusa server. As for the storefront, youll need the Application ID and Search-Only API Key.
@@ -64,7 +64,7 @@ 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://i.imgur.com/i50Irki.png)
![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
@@ -128,7 +128,7 @@ npm run start
The quickest way to test that the integration is working is by sending a `POST` request to `/store/products/search`. This endpoint accepts a `q` body parameter of the query to search for and returns in the result the products that match this query.
![Postman request send to the search endpoint that retrieves products using Algolia](https://i.imgur.com/IHeTsi7.png)
![Postman request send to the search endpoint that retrieves products using Algolia](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000054/Medusa%20Docs/Algolia/IHeTsi7_ymhb2p.png)
You can also check that the products are properly indexed by opening your Algolia dashboard and choosing Search from the left sidebar. Youll find your products that are on your Medusa server added there.
@@ -138,7 +138,7 @@ If you have more than one application on your Algolia account, make sure your
:::
![Products from the Medusa server can be seen on the Algolia dashboard](https://i.imgur.com/wkXzUH0.png)
![Products from the Medusa server can be seen on the Algolia dashboard](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000071/Medusa%20Docs/Algolia/wkXzUH0_dowyxj.png)
### Add or Update Products
@@ -211,7 +211,7 @@ To make sure the Next.js storefront properly displays the products in the search
:::
![Search pop up in the Next.js storefront](https://i.imgur.com/1f9qqK6.png)
![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
@@ -325,7 +325,7 @@ And add the `Search` component in the returned JSX before `RegionPopover`:
If you run your Gatsby storefront while the Medusa server is running, you should find a search bar in the header of the page. Try entering a query to search through the products in your store.
![Search bar in the Gatsby storefront](https://i.imgur.com/INtlcIo.png)
![Search bar in the Gatsby storefront](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000097/Medusa%20Docs/Algolia/INtlcIo_jlh16x.png)
## Whats Next
@@ -118,31 +118,31 @@ This runs the Contentful migration in that file and makes the necessary changes
To check if the above migration worked, in your Contentful Space dashboard go to Content Models from the navigation bar. You should see the new content model Rich Text.
![Rich Text can be found among content models](https://i.imgur.com/W5WzcTG.png)
![Rich Text can be found among content models](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001241/Medusa%20Docs/Contentful/W5WzcTG_vau6c9.png)
The above migration also allows you to add Rich Text content to pages. To test this out, go to Content from the navigation bar and choose Page in the select field next to the search bar. This shows the available pages in your Contentful Space.
![Filter content to only show pages by choosing Page in the Content Type select field](https://i.imgur.com/ht87z4e.png)
![Filter content to only show pages by choosing Page in the Content Type select field](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001251/Medusa%20Docs/Contentful/ht87z4e_gmbk6c.png)
Choose one of the pages. For example, the About page. Then, scroll down to the Add content button. If you click on it, you should be able to choose Rich Text under New Content.
![Click on add content and choose from the dropdown Rich Text](https://i.imgur.com/pJ5yM0m.png)
![Click on add content and choose from the dropdown Rich Text](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001261/Medusa%20Docs/Contentful/pJ5yM0m_dfb7vp.png)
Click on Rich Text and a new form will open to create new Rich Text content. It has the same fields that you defined in the migration file.
![The Rich Text form is filled with data](https://i.imgur.com/lAglhc9.png)
![The Rich Text form is filled with data](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001271/Medusa%20Docs/Contentful/lAglhc9_ejfs2i.png)
After adding the content you want, click on the Publish button on the right then go back to the About page editor.
![Click on the Publish button at the right](https://i.imgur.com/oYpQKsc.png)
![Click on the Publish button at the right](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001281/Medusa%20Docs/Contentful/oYpQKsc_piobfk.png)
Similarly, in the About page editor, click on the Publish Changes button on the right to view these changes later in the storefront.
![Click on the Publish changes button at the right](https://i.imgur.com/DIMo3hd.png)
![Click on the Publish changes button at the right](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001296/Medusa%20Docs/Contentful/DIMo3hd_ylxkr3.png)
Similarly, you can add Rich Text content to any product page.
![A rich text content is added to a product](https://i.imgur.com/wgI8mEB.png)
![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
@@ -238,7 +238,7 @@ npm run start
This runs the Gatsby storefront on `localhost:8000`. Go to the storefront in your browser and open the About page. You should see the Rich Text content you added.
![Rich Text content you added to the about page should be visible now](https://i.imgur.com/aQAY9Vz.png)
![Rich Text content you added to the about page should be visible now](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001320/Medusa%20Docs/Contentful/aQAY9Vz_yw4eop.png)
### Render Component in a Product Page
@@ -306,7 +306,7 @@ This loops over `contentModules` and if the type of the content is Rich Text, it
Restart the Gatsby storefront then open a product that you added Rich Text content to. You should see the Rich Text component at the end of the page.
![Rich Text content you added to the product should be visible at the end of the page](https://i.imgur.com/LGiVMxx.png)
![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
+15 -15
View File
@@ -52,15 +52,15 @@ Set the value for `CONTENTFUL_ENV` to `master`.
To retrieve the value of `CONTENTFUL_SPACE_ID`, go to your [Contentful Space dashboard](https://app.contentful.com/). Then, choose Settings in the navigation bar and select API keys from the dropdown.
![Click on Settings then select API keys from the dropdown](https://i.imgur.com/hvp6zo5.png)
![Click on Settings then select API keys from the dropdown](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001360/Medusa%20Docs/Contentful/hvp6zo5_uaqtmi.png)
On the APIs page, click Add API Key.
![Click on the Add API Key button](https://i.imgur.com/KlH2BDg.png)
![Click on the Add API Key button](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001375/Medusa%20Docs/Contentful/KlH2BDg_fiqd80.png)
In the form, enter a name for the API key and click Save.
![A form with the name of API key entered](https://i.imgur.com/hOG1RqM.png)
![A form with the name of API key entered](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001385/Medusa%20Docs/Contentful/hOG1RqM_tmctae.png)
Then, copy the value of Space ID and set it as the value of `CONTENTFUL_SPACE_ID`.
@@ -68,11 +68,11 @@ Then, copy the value of Space ID and set it as the value of `CONTENTFUL_SPACE_ID
Go back to the API Keys page and click on the Content management tokens tab.
![API Keys page with Content management tokens tab opened](https://i.imgur.com/7nWx1xk.png)
![API Keys page with Content management tokens tab opened](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001394/Medusa%20Docs/Contentful/7nWx1xk_co8ykw.png)
Click on Generate personal token. A pop-up will open where you have to enter a name for the token.
![Pop up model for Personal Access Token with token name entered](https://i.imgur.com/y6R81pH.png)
![Pop up model for Personal Access Token with token name entered](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001403/Medusa%20Docs/Contentful/y6R81pH_yhbg1u.png)
Once you click Generate, a personal access token will be generated. Use it to set the value of `CONTENTFUL_ACCESS_TOKEN`.
@@ -141,7 +141,7 @@ npm run migrate:contentful
Once this command finishes executing, in your Contentful Space dashboard click on Content Model in the navigation bar. You should see a list of new content models added.
![Content Model page filled with new content models](https://i.imgur.com/ZDJPNkr.png)
![Content Model page filled with new content models](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001419/Medusa%20Docs/Contentful/ZDJPNkr_avr7gy.png)
### Seed Content to Contentful
@@ -155,7 +155,7 @@ npm run seed:contentful
After this command finishes running, in your Contentful Space dashboard click on Content in the navigation bar. You should see a list of new content added.
![Content page filled with new content](https://i.imgur.com/bfgFxPg.png)
![Content page filled with new content](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001429/Medusa%20Docs/Contentful/bfgFxPg_jb4zok.png)
### (Optional) Seed Medusa Database
@@ -177,7 +177,7 @@ npm run start
If you seeded the database with demo data, you should see that events related to the products are triggered.
![Seed the database](https://i.imgur.com/ci4accp.png)
![Seed the database](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001440/Medusa%20Docs/Contentful/ci4accp_okaro3.png)
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.
@@ -195,7 +195,7 @@ To do that, open your Contentful Space Dashboard and click on Content in the Nav
Click on the checkbox at the top of the table to select all products then click Publish to publish these products.
![Select all products' checkboxes and click the publish button](https://i.imgur.com/3NrH5tJ.png)
![Select all products' checkboxes and click the publish button](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001452/Medusa%20Docs/Contentful/3NrH5tJ_f16iym.png)
### Added Featured Products
@@ -203,19 +203,19 @@ On the homepage of the storefront, theres a featured products tile that shows
To do that, open your Contentful Space Dashboard and click on Content in the Navigation bar. Make sure the select field next to the search bar is set to Any and search for Featured Products. You should find one content of the type Tile Section.
![Search for the featured products tile section](https://i.imgur.com/2gS0ozY.png)
![Search for the featured products tile section](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001462/Medusa%20Docs/Contentful/2gS0ozY_b2tpsb.png)
Click on it. You should find on the page an empty Tiles section where you can add tiles and products.
![On the content's page find the empty tiles section](https://i.imgur.com/inuN1OB.png)
![On the content's page find the empty tiles section](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001472/Medusa%20Docs/Contentful/inuN1OB_ipiszl.png)
Click on Add content then on Add existing content and pick some of the products you want to show on the homepage.
![Add at least 1 product as a tile](https://i.imgur.com/N5m4LbF.png)
![Add at least 1 product as a tile](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001500/Medusa%20Docs/Contentful/N5m4LbF_fb97tm.png)
Once youre done adding products, click on Publish changes in the right sidebar.
![Click on the publish changes button on the right](https://i.imgur.com/URNpkXq.png)
![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
@@ -250,7 +250,7 @@ To retrieve the value of `CONTENTFUL_ACCESS_TOKEN`, on your Contentful Space das
You should find the field "Content Delivery API - access token”. Copy its value and set it as the value of `CONTENTFUL_ACCESS_TOKEN`.
![Copy the value of the Content Delivery API access token](https://i.imgur.com/a7dl7DI.png)
![Copy the value of the Content Delivery API access token](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001522/Medusa%20Docs/Contentful/a7dl7DI_mziogm.png)
### Start Storefront
@@ -262,7 +262,7 @@ npm run start
This starts the storefront at `localhost:8000`. Open it in your browser and you should see on the homepage the Featured Product section with the products you chose on Contentful.
![The storefront with the featured products section](https://i.imgur.com/f6xwYbS.png)
![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
+3 -3
View File
@@ -80,11 +80,11 @@ Try sending a `POST` request to `/mailchimp/subscribe` with the following JSON b
If the subscription is successful, a `200` response code will be returned with `OK` message.
![Postman](https://i.imgur.com/tpr7uCF.png)
![Postman](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000185/Medusa%20Docs/Mailchimp/tpr7uCF_g4rymn.png)
If you check your Mailchimp dashboard, you should find the email added to your Audience list.
![Email Added](https://i.imgur.com/ALz6WUq.png)
![Email Added](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000199/Medusa%20Docs/Mailchimp/ALz6WUq_e4mkcs.png)
### With Additional Data
@@ -173,7 +173,7 @@ export default function NewsletterForm() {
This will result in a subscription form similar to the following:
![Subscription Form](https://i.imgur.com/JHIFEwe.png)
![Subscription Form](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000210/Medusa%20Docs/Mailchimp/JHIFEwe_fu4rkv.png)
If you try entering an email and clicking Subscribe, the email will be subscribed to your Mailchimp newsletter successfully.
+4 -4
View File
@@ -89,11 +89,11 @@ npm run start
The quickest way to test that the integration is working is by sending a `POST` request to `/store/products/search`. This endpoint accepts a `q` body parameter of the query to search for and returns in the result the products that match this query.
![Postman request to search endpoint that shows results returned from the search engine](https://i.imgur.com/RCGquxU.png)
![Postman request to search endpoint that shows results returned from the search engine](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000265/Medusa%20Docs/MeiliSearch/RCGquxU_um3dvn.png)
You can also check that the products are properly indexed by opening the MeiliSearch host URL in your browser, which is `http://127.0.0.1:7700/` by default. Youll find your products that are on your Medusa server added there.
![MeiliSearch dashboard showing products from the Medusa server indexed](https://i.imgur.com/5sk3jyP.png)
![MeiliSearch dashboard showing products from the Medusa server indexed](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000277/Medusa%20Docs/MeiliSearch/5sk3jyP_i3swkn.png)
### Add or Update Products
@@ -170,7 +170,7 @@ To make sure the Next.js storefront properly displays the products in the search
:::
![Search Result on Next.js storefront](https://i.imgur.com/gQVWvH2.png)
![Search Result on Next.js storefront](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000298/Medusa%20Docs/MeiliSearch/gQVWvH2_datei5.png)
### Add to Gatsby and React-Based Storefronts
@@ -284,7 +284,7 @@ And add the `Search` component in the returned JSX before `RegionPopover`:
If you run your Gatsby storefront while the Medusa server and the MeiliSearch instance are running, you should find a search bar in the header of the page. Try entering a query to search through the products in your store.
![Search box in the header of the storefront](https://i.imgur.com/ZkRgF2h.png)
![Search box in the header of the storefront](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000317/Medusa%20Docs/MeiliSearch/ZkRgF2h_ytnpv9.png)
## Whats Next
+8 -8
View File
@@ -32,19 +32,19 @@ minio server ~/minio --console-address :9090 --address :9001
After installing MinIO and logging into the Console, click on “Create Bucket” to create a new bucket that will store the files of your Medusa server.
![Create Bucket](https://i.imgur.com/PwLldKt.png)
![Create Bucket](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000345/Medusa%20Docs/MinIO/PwLldKt_vm4r6d.png)
Then, in the form, enter a name for the bucket and click on Create Bucket. By MinIOs requirement, the name can only consist of lower case characters, numbers, dots (`.`), and hyphens (`-`).
![Bucket Info](https://i.imgur.com/UB477rl.png)
![Bucket Info](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000356/Medusa%20Docs/MinIO/UB477rl_opdmzj.png)
After creating the bucket, click on the cog icon at the top right to configure the bucket.
![Configure Bucket](https://i.imgur.com/0pB8RIM.png)
![Configure Bucket](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000369/Medusa%20Docs/MinIO/0pB8RIM_bxo20d.png)
Then, click on the edit icon next to Access Policy. This will open a pop-up.
![Access Policy](https://i.imgur.com/qo3QQz4.png)
![Access Policy](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000379/Medusa%20Docs/MinIO/qo3QQz4_asdtgb.png)
In the pop-up, change the selected value to “public” and click Set.
@@ -58,15 +58,15 @@ Changing the Access Policy to public will allow anyone to access your bucket. Av
From the sidebar of your MinIO console, click on Identity then Service Accounts.
![Service Accounts Sidebar](https://i.imgur.com/CkTbrEc.png)
![Service Accounts Sidebar](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000392/Medusa%20Docs/MinIO/CkTbrEc_ni2hlz.png)
Then, click on Create Service Account.
![Create Service Account](https://i.imgur.com/a000HQf.png)
![Create Service Account](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000403/Medusa%20Docs/MinIO/a000HQf_noszz2.png)
This will generate a random Access Key and Secret Key for you.
![Generated Keys](https://i.imgur.com/my4c7zU.png)
![Generated Keys](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000415/Medusa%20Docs/MinIO/my4c7zU_yyw6fw.png)
Click on Create. A pop-up will then show the value for your Access Key and Secret Key. Copy them to use in the next section.
@@ -119,7 +119,7 @@ If you have multiple storage plugins configured, the last plugin declared in the
Run your Medusa server alongside the [Medusa Admin](../admin/quickstart.md) 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://i.imgur.com/alabX2i.png)
![Image Uploaded on Admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000429/Medusa%20Docs/MinIO/alabX2i_dzg2mh.png)
## Private Buckets
+4 -4
View File
@@ -127,7 +127,7 @@ Make sure to replace `<YOUR_CLIENT_ID>` with your PayPal Client ID.
Now, if you run your Medusa server and your storefront, on checkout youll be able to use PayPal].
![PayPal Button](https://i.imgur.com/F8OvsOJ.png)
![PayPal Button](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000463/Medusa%20Docs/PayPal/F8OvsOJ_v3ctol.png)
You can test out the payment with PayPal using your sandbox account.
@@ -276,7 +276,7 @@ Thats all you need to integrate PayPal into the Gatsby storefront.
Now, start the Medusa server and the Gatsby storefront server. Try adding an item into the cart and proceeding to checkout. When you reach the payment step, you should see the PayPal button.
![PayPal Button](https://i.imgur.com/SMLrptP.png)
![PayPal Button](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000477/Medusa%20Docs/PayPal/SMLrptP_g6b22m.png)
You can test out the payment with PayPal using your sandbox account.
@@ -382,13 +382,13 @@ You can then import this component where you want to show it in your storefront.
If you run the Medusa server and the storefront server, you should see the PayPal button on checkout.
![PayPal Button](https://i.imgur.com/PsibgPY.png)
![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.
![Capture Payment](https://i.imgur.com/Mx357yY.png)
![Capture Payment](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000502/Medusa%20Docs/PayPal/Mx357yY_xsandw.png)
Clicking this button lets you capture the payment for an order. You can also refund payments if an order has captured payments.
+8 -8
View File
@@ -22,23 +22,23 @@ You need to [create an AWS account](https://console.aws.amazon.com/console/home?
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.
![Enter S3 in the search box and choose S3 from the result in the Services category](https://i.imgur.com/wuPTfQ8.png)
![Enter S3 in the search box and choose S3 from the result in the Services category](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000547/Medusa%20Docs/S3/wuPTfQ8_bzbm8n.png)
Then, on the new page that opens, click on Create Bucket button at the top right of the Buckets table.
![Click on the Create bucket button](https://i.imgur.com/h95D38T.png)
![Click on the Create bucket button](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000527/Medusa%20Docs/S3/h95D38T_gptwpr.png)
The Create Bucket form will open. In the General Configuration section enter a name for the bucket and choose a region for the bucket. Both of the values of these fields are important as youll use them throughout the documentation.
![Enter bucket name and choose region in the General Configuration section](https://i.imgur.com/wlxUU8I.png)
![Enter bucket name and choose region in the General Configuration section](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000559/Medusa%20Docs/S3/wlxUU8I_m4ngqd.png)
Next, in the Object Ownership section, choose ACLs enabled. Then, two radio buttons will show below it. Choose Bucket owner preferred.
![In the Object Ownership section choose ACLs enabled, then choose Bucket owner preferred for the Object ownership field](https://i.imgur.com/ChUXQPt.png)
![In the Object Ownership section choose ACLs enabled, then choose Bucket owner preferred for the Object ownership field](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000572/Medusa%20Docs/S3/ChUXQPt_eg8mn1.png)
Then, in the “Block Public Access settings for this bucket” section, uncheck the “Block all public access” checkbox. This shows a warning message at the bottom of the section with another checkbox. Check the checkbox to ensure you understand that objects in the bucket are publicly accessible.
![Uncheck Block all public access and all fields under it, and check the checkbox field "I acknowledge that the current settings might result in this bucket and the objects within becoming public"](https://i.imgur.com/abHquFh.png)
![Uncheck Block all public access and all fields under it, and check the checkbox field "I acknowledge that the current settings might result in this bucket and the objects within becoming public"](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000586/Medusa%20Docs/S3/abHquFh_wypfbx.png)
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.
@@ -46,7 +46,7 @@ You can leave the rest of the fields in the form as is and scroll down to the en
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.
![Find the bucket policy section which should be empty and click on the Edit button](https://i.imgur.com/I6BBLwv.png)
![Find the bucket policy section which should be empty and click on the Edit button](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000607/Medusa%20Docs/S3/I6BBLwv_zoknft.png)
In the Edit Bucket Policy page, enter the following in the field:
@@ -142,11 +142,11 @@ Then, you can either test the plugin using the [REST APIs](https://docs.medusajs
On the Medusa Admin, create a new product and, in the Images section, upload an image then click Save. If the integration was successful, the product image will be uploaded successfully.
![An image is successfully uploaded on the Medusa Admin](https://i.imgur.com/zPC9qFH.png)
![An image is successfully uploaded on the Medusa Admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000619/Medusa%20Docs/S3/zPC9qFH_dgqf76.png)
You can also check that the image was uploaded on the S3 buckets page.
![Image is now available in the S3 Bucket](https://i.imgur.com/NJZ5bP8.png)
![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
+9 -9
View File
@@ -52,23 +52,23 @@ You need to [create a Segment account](https://app.segment.com/signup/) to follo
On your Segment dashboard, choose Catalog from the sidebar under Connections.
![Under Connections in the sidebar choose Catalog](https://i.imgur.com/rAeJkP3.png)
![Under Connections in the sidebar choose Catalog](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000661/Medusa%20Docs/Segment/rAeJkP3_ybyutz.png)
Then, in the catalog list find the Server category and choose Node.js from the list.
![Choose Node.js under the Server category](https://i.imgur.com/6RxQbW6.png)
![Choose Node.js under the Server category](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000672/Medusa%20Docs/Segment/6RxQbW6_wjphte.png)
This opens a new side menu. In the side menu, click on Add Source.
![Click on Add Source in the side menu showing information about the Node.js source](https://i.imgur.com/0VZJnpd.png)
![Click on Add Source in the side menu showing information about the Node.js source](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000683/Medusa%20Docs/Segment/0VZJnpd_ehagat.png)
This opens a new page to create a Node.js source. Enter the name of the source then click Add Source.
![Enter a name under the Name field then click on the Add Source button](https://i.imgur.com/u2hzkB5.png)
![Enter a name under the Name field then click on the Add Source button](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000693/Medusa%20Docs/Segment/u2hzkB5_t59yhj.png)
On the new source dashboard, you should find a Write Key. Youll use this key in the next section after you install the Segment plugin on your Medusa server.
![The Write Key is available on the new source's page](https://i.imgur.com/OTJVsz7.png)
![The Write Key is available on the new source's page](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000708/Medusa%20Docs/Segment/OTJVsz7_v95qla.png)
### Optional: Add Destination
@@ -76,11 +76,11 @@ After you create the Segment source, you can add destinations. This is where the
To add a destination, on the same Segment source page, click on Add Destination in the Destinations section.
![Click on the Add Destination button on the source page](https://i.imgur.com/FrKlUxh.png)
![Click on the Add Destination button on the source page](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000718/Medusa%20Docs/Segment/FrKlUxh_zlnkww.png)
You can then choose from a list of destinations such as Google Universal Analytics or Facebook Pixel.
![List of some of the available destinations in Segment's catalog](https://i.imgur.com/y2YnPUh.png)
![List of some of the available destinations in Segment's catalog](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000730/Medusa%20Docs/Segment/y2YnPUh_mgfqdo.png)
The process of integrating each destination is different, so you must follow the steps detailed in Segment for each destination you choose.
@@ -126,7 +126,7 @@ Then, try triggering one of the [mentioned events earlier in this document](#eve
After you place an order, on the Segment source that you created, click on the Debugger tab. You should see at least one event triggered for each order you place. If you click on the event, you can see the order details are passed to the event.
![The order completed event is recorded on the Segment source](https://i.imgur.com/LQVJTGg.png)
![The order completed event is recorded on the Segment source](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000743/Medusa%20Docs/Segment/LQVJTGg_i5jyge.png)
If you added a destination, you can also check your destination to make sure the data is reflected there.
@@ -183,7 +183,7 @@ The `SegmentServer` also provides the method `identify` to tie a user to their a
After adding the above subscriber, run your server again if it isnt running and create a customer using the REST APIs or one of the Medusa storefronts. If you check the Debugger in your Segment source, you should see a new event “Customer Created” tracked. If you click on it, youll see the data you passed to the `track` method.
![The customer created event is recoreded on the Segment source](https://i.imgur.com/4LD41xE.png)
![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
+1 -1
View File
@@ -3959,7 +3959,7 @@ If you dont have a storefront installed, check out the [Gatsby](../starters/g
You can also track analytics related to emails sent from the SendGrid dashboard.
![SendGrid Analytics](https://i.imgur.com/X01LigH.png)
![SendGrid Analytics](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000788/Medusa%20Docs/SendGrid/X01LigH_mxmtbn.png)
## Whats Next
+4 -4
View File
@@ -41,7 +41,7 @@ The first step is to create a Slack app. This app will be connected to your work
Go to [Slack API](https://api.slack.com/) and click Create app. This will take you to a new page with a pop-up. In the pop-up, choose From scratch.
![Create Slack App](https://i.imgur.com/liVfwF8.png)
![Create Slack App](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000844/Medusa%20Docs/Slack/liVfwF8_ryzly3.png)
Youll then need to enter some info like the App name and the workspace it will be connected to. Once youre done, the app will be created.
@@ -49,17 +49,17 @@ Youll then need to enter some info like the App name and the workspace it wil
To activate Incoming Webhooks, choose Features > Incoming Webhooks from the sidebar. At first, it will be disabled so make sure to enable it by switching the toggle.
![Incoming Webhooks](https://i.imgur.com/5Y0nv4p.png)
![Incoming Webhooks](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000856/Medusa%20Docs/Slack/5Y0nv4p_mugzkb.png)
### Add New Webhook
After activating Incoming Webhooks, on the same page scroll down and click on the Add New Webhook to Workspace button.
![Add New Webhook](https://i.imgur.com/sejdIqH.png)
![Add New Webhook](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000867/Medusa%20Docs/Slack/sejdIqH_wyqgs5.png)
After that, choose the channel to send the notifications to. You can also choose a DM to send the notifications to. Once youre done click Allow.
![Choose channel or DM](https://i.imgur.com/Zw3f5uF.png)
![Choose channel or DM](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000882/Medusa%20Docs/Slack/Zw3f5uF_hljfpr.png)
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.
+10 -10
View File
@@ -28,15 +28,15 @@ You need to [create a DigitalOcean account](https://cloud.digitalocean.com/regi
In your DigitalOcean account, click on the Create button at the top right, then choose Spaces from the dropdown.
![Click on the green Create button at the top right, then choose Spaces in the dropdown](https://i.imgur.com/AQqMRoJ.png)
![Click on the green Create button at the top right, then choose Spaces in the dropdown](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000907/Medusa%20Docs/Spaces/AQqMRoJ_uhkywh.png)
In the Create a Space form, you can choose any of the regions listed. You can alternatively leave all settings as they are and scroll down to the Finalize and Create section.
![The Space form can be left as is and move towards the Finalize and Create section](https://i.imgur.com/ipsIqoA.png)
![The Space form can be left as is and move towards the Finalize and Create section](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000929/Medusa%20Docs/Spaces/ipsIqoA_zeyfkf.png)
In the Finalize and Create section, enter a name for the field “Choose a unique name”. Youll use this name later in the integration with Medusa. Also, select the project you want to add the new Space to.
![Enter a name for the Space in the Choose a unique name field](https://i.imgur.com/NhlRX0h.png)
![Enter a name for the Space in the Choose a unique name field](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000949/Medusa%20Docs/Spaces/NhlRX0h_ptdhpk.png)
Once youre done, click on the Create a Space button. This creates the Space and redirects you to the Spaces page.
@@ -44,15 +44,15 @@ Once youre done, click on the Create a Space button. This creates the Space a
Choose API from the bottom of the sidebar.
![Choose API from the bottom of the sidebar.](https://i.imgur.com/6zNoDOW.png)
![Choose API from the bottom of the sidebar.](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000964/Medusa%20Docs/Spaces/6zNoDOW_tqbeqv.png)
This opens the Application & API page. Scroll down to Spaces Access Keys and click the Generate New Key button.
![In the Spaces access keys section, click the Generate New Key button](https://i.imgur.com/NUocdgh.png)
![In the Spaces access keys section, click the Generate New Key button](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000977/Medusa%20Docs/Spaces/NUocdgh_doi0dq.png)
This shows a table with the Name field editable. Enter a name for the Access Keys and click on the checkmark button to save and generate the Spaces access keys.
![Enter a name for the Space access key in the field under the Name column](https://i.imgur.com/ihJBx0T.png)
![Enter a name for the Space access key in the field under the Name column](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000987/Medusa%20Docs/Spaces/ihJBx0T_xfe4rh.png)
Then, two keys will be available under the Key column of the table. The first one is the Access Key ID and the second is the Secret Access Key. Copy both as youll use them later.
@@ -84,12 +84,12 @@ Where:
1. `<YOUR_SPACE_URL>` is the URL of your Space which you can find on the Spaces page below the Spaces name.
![The URL is available under the Space's name on the Space's page](https://i.imgur.com/cA3vkvh.png)
![The URL is available under the Space's name on the Space's page](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001004/Medusa%20Docs/Spaces/cA3vkvh_maixr0.png)
2. `<YOUR_SPACE_NAME>` is the name of your Space.
3. `<YOUR_SPACE_ENDPOINT>` is your Spaces endpoint which can be found by going to your Spaces page, clicking on the Settings tab, and scrolling to the Endpoint section.
![Endpoint can be found on the Settings tab in the Space's page](https://i.imgur.com/CnvLr6R.png)
![Endpoint can be found on the Settings tab in the Space's page](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001017/Medusa%20Docs/Spaces/CnvLr6R_tudlhu.png)
4. `<YOUR_ACCESS_KEY_ID>` and `<YOUR_SECRET_ACCESS_KEY>` are the keys you created in the previous section.
@@ -129,11 +129,11 @@ Then, you can either test the plugin using the [REST APIs](https://docs.medusaj
On the Medusa Admin, create a new product and, in the Images section, upload an image then click Save. If the integration was successful, the product image will be uploaded successfully.
![Image successfully uploaded on Medusa's admin](https://i.imgur.com/oTi4jIw.png)
![Image successfully uploaded on Medusa's admin](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001039/Medusa%20Docs/Spaces/oTi4jIw_c6vefa.png)
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://i.imgur.com/BexmRkg.png)
![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
+4 -4
View File
@@ -36,7 +36,7 @@ This creates the Strapi project in the directory `strapi-medusa`.
Once the installation is finished, the Strapi development server will run on `localhost:1337`. A new page will also open in your default browser to create a new admin user and log in.
![Create User Form in Strapi](https://i.imgur.com/9pFE1Ij.png)
![Create User Form in Strapi](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001083/Medusa%20Docs/Strapi/9pFE1Ij_h2dicv.png)
Once you log in, you can access the Strapi dashboard.
@@ -44,11 +44,11 @@ Once you log in, you can access the Strapi dashboard.
The Strapi plugin in Medusa requires the credentials of a Strapi user. To create a new user, go to Content Manager, then choose User under Collection Types.
![Showing the users under Content Manager](https://i.imgur.com/YyGJPUf.png)
![Showing the users under Content Manager](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001096/Medusa%20Docs/Strapi/YyGJPUf_mr5sx7.png)
Click on the Create new entry button at the top right. This opens a new form to enter the users details.
![Create User Form on Strapi](https://i.imgur.com/mdMhSlV.png)
![Create User Form on Strapi](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001105/Medusa%20Docs/Strapi/mdMhSlV_vy7ygv.png)
Enter the users username, email, and password. Once youre done, click on the Save button at the top right.
@@ -58,7 +58,7 @@ By default, created users have the “Authenticated” role. Before you start us
On your Strapi dashboard, go to Settings → Roles → Authenticated. Then, under the Permissions section, expand the accordion of each content model type and check the Select All checkbox.
![An example of modifying permissions on the Product content type](https://i.imgur.com/QgckXqS.png)
![An example of modifying permissions on the Product content type](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001116/Medusa%20Docs/Strapi/QgckXqS_wlyxe8.png)
Once youre done, click the Save button at the top right.
+4 -4
View File
@@ -131,7 +131,7 @@ Make sure to replace `<YOUR_PUBLISHABLE_KEY>` with your Stripe Publishable Key.
Now, if you run your Medusa server and your storefront, on checkout youll be able to use Stripe.
![Next.js Stripe Form](https://i.imgur.com/h5mWdJT.png)
![Next.js Stripe Form](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001145/Medusa%20Docs/Stripe/h5mWdJT_n1bktt.png)
### Add to Gatsby Storefront
@@ -151,7 +151,7 @@ You might find this environment variable already available so you can just repla
Now, if you run your Medusa server and your storefront, on checkout youll be able to use Stripe.
![Gatsby Stripe Form](https://i.imgur.com/1XvW776.png)
![Gatsby Stripe Form](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001172/Medusa%20Docs/Stripe/1XvW776_omosuz.png)
### Add to Custom Storefront
@@ -344,13 +344,13 @@ Once the promise resolves you can handle the errors, if there are any. If not, y
If you run your server and storefront now, youll see the Stripe UI element and youll be able to make orders.
![Stripe Form](https://i.imgur.com/NOi8THw.png)
![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.
![Capture Payment](https://i.imgur.com/Iz55PVZ.png)
![Capture Payment](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001205/Medusa%20Docs/Stripe/Iz55PVZ_p6hiz6.png)
Clicking this button allows you to capture the payment for an order. You can also refund payments if an order has captured payments.
+1 -1
View File
@@ -120,7 +120,7 @@ If youre on a Twilio trial make sure that the phone number you entered on che
:::
![Twilio Dashboard](https://i.imgur.com/MXtQMiL.png)
![Twilio Dashboard](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001219/Medusa%20Docs/Stripe/MXtQMiL_kb7kxe.png)
## Whats Next