From 926e8e844f3f8972c8ef78a3e835100a2010966e Mon Sep 17 00:00:00 2001 From: Dag Andersen Date: Thu, 26 Aug 2021 16:43:39 +0200 Subject: [PATCH 1/6] hotfix: README Spelling (#354) --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f7786cdc8d..ad6fa689d8 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ After these four steps and only a couple of minutes, you now have a complete com ## ⭐️ Features Medusa comes with a set of building blocks that allow you to create amazing digital commerce experiences, below is a list of some of the features that Medusa come with out of the box: -- **Headless**: Medusa is a highly customizable commerce API which means that you may use any presentation layer such as a website, app, chat bots, etc. +- **Headless**: Medusa is a highly customizable commerce API which means that you may use any presentation layer such as a website, app, chatbots, etc. - **Regions** allow you to specify currencies, payment providers, shipping providers, tax rates and more for one or more countries for truly international sales. - **Orders** come with all the functionality necessary to perform powerful customer service operations with ease. - **Carts** allow customers to collect products for purchase, add shipping details and complete payments. @@ -60,12 +60,12 @@ Medusa comes with a set of building blocks that allow you to create amazing digi - **Claims** can be created if customers experience problems with one of their products. Plugins make sure to automate sending out replacements, handling refunds and collecting valuable data for analysis. - **Returns** allow customers to send back products and can be configured to function in a 100% automated flow through accounting and payment plugins. - **Fulfillment API** makes it easy to integrate with any fulfillment provider by creating fulfillment plugins, check the `/packages` directory for a full list of plugins. -- **Payments API** makes it easy to integrate with any payment provider by creatingn payment plugins, we already support Stripe, Paypal and Klarna. -- **Notification API** allow integrations with email providers, chat bots, Slack channels etc. +- **Payments API** makes it easy to integrate with any payment provider by creating payment plugins, we already support Stripe, Paypal and Klarna. +- **Notification API** allow integrations with email providers, chatbots, Slack channels, etc. - **Customer Login** to give customers a way of managing their data, viewing their orders and saving payment details. - **Shipping Options & Profiles** enable powerful rules for free shipping limits, multiple fulfillment methods and more. - **Medusa's Plugin Architecture** makes it intuitive and easy to manage your integrations, switch providers and grow with ease. -- **Customization** is supported for those special use cases that all the other ecommerce platforms can't accommodate. +- **Customization** is supported for those special use cases that all the other e-commerce platforms can't accommodate. ## 🛒 Setting up a storefront for your Medusa project Medusa is a headless commerce engine which means that it can be used for any type of digital commerce experience - you may use it as the backend for an app, a voice application, social commerce experiences or a traditional e-commerce website, you may even want to integrate Medusa into your own software to enable commerce functionality. All of these are use cases that Medusa supports - to learn more read the documentation or reach out. From 29f2b01f9c5bbedbe1e909061bba2ee14025bc97 Mon Sep 17 00:00:00 2001 From: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com> Date: Fri, 27 Aug 2021 10:26:53 +0200 Subject: [PATCH 2/6] chore: Update README --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index ad6fa689d8..03fb367226 100644 --- a/README.md +++ b/README.md @@ -49,24 +49,6 @@ Medusa is an open-source headless commerce engine that enables developers to cre After these four steps and only a couple of minutes, you now have a complete commerce engine running locally. You may now explore [the documentation](https://docs.medusa-commerce.com/api) to learn how to interact with the Medusa API. You may also add [plugins](https://github.com/medusajs/medusa/tree/master/packages) to your Medusa store by specifying them in your `medusa-config.js` file. -## ⭐️ Features -Medusa comes with a set of building blocks that allow you to create amazing digital commerce experiences, below is a list of some of the features that Medusa come with out of the box: -- **Headless**: Medusa is a highly customizable commerce API which means that you may use any presentation layer such as a website, app, chatbots, etc. -- **Regions** allow you to specify currencies, payment providers, shipping providers, tax rates and more for one or more countries for truly international sales. -- **Orders** come with all the functionality necessary to perform powerful customer service operations with ease. -- **Carts** allow customers to collect products for purchase, add shipping details and complete payments. -- **Products** come with relevant fields for customs, stock keeping and sales. Medusa supports multiple options and unlimited variants. -- **Swaps** allow customers to exchange products after purchase (e.g. for incorrect sizes). Accounting, payment and fulfillment plugins handle all the tedious work for you for automated customer service. -- **Claims** can be created if customers experience problems with one of their products. Plugins make sure to automate sending out replacements, handling refunds and collecting valuable data for analysis. -- **Returns** allow customers to send back products and can be configured to function in a 100% automated flow through accounting and payment plugins. -- **Fulfillment API** makes it easy to integrate with any fulfillment provider by creating fulfillment plugins, check the `/packages` directory for a full list of plugins. -- **Payments API** makes it easy to integrate with any payment provider by creating payment plugins, we already support Stripe, Paypal and Klarna. -- **Notification API** allow integrations with email providers, chatbots, Slack channels, etc. -- **Customer Login** to give customers a way of managing their data, viewing their orders and saving payment details. -- **Shipping Options & Profiles** enable powerful rules for free shipping limits, multiple fulfillment methods and more. -- **Medusa's Plugin Architecture** makes it intuitive and easy to manage your integrations, switch providers and grow with ease. -- **Customization** is supported for those special use cases that all the other e-commerce platforms can't accommodate. - ## 🛒 Setting up a storefront for your Medusa project Medusa is a headless commerce engine which means that it can be used for any type of digital commerce experience - you may use it as the backend for an app, a voice application, social commerce experiences or a traditional e-commerce website, you may even want to integrate Medusa into your own software to enable commerce functionality. All of these are use cases that Medusa supports - to learn more read the documentation or reach out. @@ -98,6 +80,24 @@ With your project in local development you can link your Medusa instance to Medu You can now navigate to Orders in Medusa Cloud to view the orders in your local Medusa project, just like you would if your store was running in production. +## ⭐️ Features +Medusa comes with a set of building blocks that allow you to create amazing digital commerce experiences, below is a list of some of the features that Medusa come with out of the box: +- **Headless**: Medusa is a highly customizable commerce API which means that you may use any presentation layer such as a website, app, chatbots, etc. +- **Regions** allow you to specify currencies, payment providers, shipping providers, tax rates and more for one or more countries for truly international sales. +- **Orders** come with all the functionality necessary to perform powerful customer service operations with ease. +- **Carts** allow customers to collect products for purchase, add shipping details and complete payments. +- **Products** come with relevant fields for customs, stock keeping and sales. Medusa supports multiple options and unlimited variants. +- **Swaps** allow customers to exchange products after purchase (e.g. for incorrect sizes). Accounting, payment and fulfillment plugins handle all the tedious work for you for automated customer service. +- **Claims** can be created if customers experience problems with one of their products. Plugins make sure to automate sending out replacements, handling refunds and collecting valuable data for analysis. +- **Returns** allow customers to send back products and can be configured to function in a 100% automated flow through accounting and payment plugins. +- **Fulfillment API** makes it easy to integrate with any fulfillment provider by creating fulfillment plugins, check the `/packages` directory for a full list of plugins. +- **Payments API** makes it easy to integrate with any payment provider by creating payment plugins, we already support Stripe, Paypal and Klarna. +- **Notification API** allow integrations with email providers, chatbots, Slack channels, etc. +- **Customer Login** to give customers a way of managing their data, viewing their orders and saving payment details. +- **Shipping Options & Profiles** enable powerful rules for free shipping limits, multiple fulfillment methods and more. +- **Medusa's Plugin Architecture** makes it intuitive and easy to manage your integrations, switch providers and grow with ease. +- **Customization** is supported for those special use cases that all the other e-commerce platforms can't accommodate. + ## Database support In production Medusa requires Postgres and Redis, but SQLite is supported for development and testing purposes. If you plan on using Medusa for a project it is recommended that you install Postgres and Redis on your dev machine. From e2897e2a62c253d8ac39e08dde88f89905eb3ea5 Mon Sep 17 00:00:00 2001 From: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com> Date: Thu, 2 Sep 2021 17:49:02 +0200 Subject: [PATCH 3/6] hotfix: Adds options to cloned RestockNotificationService (#369) --- .../src/services/restock-notification.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/medusa-plugin-restock-notification/src/services/restock-notification.js b/packages/medusa-plugin-restock-notification/src/services/restock-notification.js index 014c38b748..d91c576785 100644 --- a/packages/medusa-plugin-restock-notification/src/services/restock-notification.js +++ b/packages/medusa-plugin-restock-notification/src/services/restock-notification.js @@ -34,13 +34,16 @@ class RestockNotificationService extends BaseService { return this } - const cloned = new RestockNotificationService({ - manager: transactionManager, - options: this.options_, - eventBusService: this.eventBus_, - productVariantService: this.productVariantService_, - restockNotificationModel: this.restockNotificationModel_, - }) + const cloned = new RestockNotificationService( + { + manager: transactionManager, + options: this.options_, + eventBusService: this.eventBus_, + productVariantService: this.productVariantService_, + restockNotificationModel: this.restockNotificationModel_, + }, + this.options_ + ) cloned.transactionManager_ = transactionManager From 692bca8a221ae814db4307e79139233a59903909 Mon Sep 17 00:00:00 2001 From: olivermrbl Date: Thu, 2 Sep 2021 17:53:22 +0200 Subject: [PATCH 4/6] chore(release): Publish - medusa-payment-manual@1.0.4 - medusa-plugin-brightpearl@1.1.30 - medusa-plugin-restock-notification@0.0.18 - medusa-plugin-wishlist@1.1.25 - @medusajs/medusa@1.1.40 --- packages/medusa-payment-manual/CHANGELOG.md | 11 +++++++++++ packages/medusa-payment-manual/package.json | 2 +- packages/medusa-plugin-brightpearl/CHANGELOG.md | 11 +++++++++++ packages/medusa-plugin-brightpearl/package.json | 2 +- .../CHANGELOG.md | 8 ++++++++ .../package.json | 2 +- packages/medusa-plugin-wishlist/CHANGELOG.md | 11 +++++++++++ packages/medusa-plugin-wishlist/package.json | 2 +- packages/medusa/CHANGELOG.md | 16 ++++++++++++++++ packages/medusa/package.json | 2 +- 10 files changed, 62 insertions(+), 5 deletions(-) diff --git a/packages/medusa-payment-manual/CHANGELOG.md b/packages/medusa-payment-manual/CHANGELOG.md index af9295ee1e..ed5429f861 100644 --- a/packages/medusa-payment-manual/CHANGELOG.md +++ b/packages/medusa-payment-manual/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.4](https://github.com/medusajs/medusa/compare/medusa-payment-manual@1.0.2...medusa-payment-manual@1.0.4) (2021-09-02) + + +### Features + +* Update to API references look and feel ([#343](https://github.com/medusajs/medusa/issues/343)) ([143f06a](https://github.com/medusajs/medusa/commit/143f06aa397dcc16991405a6143c22eaa0e3ffd9)) + + + + + ## [1.0.3](https://github.com/medusajs/medusa/compare/medusa-payment-manual@1.0.2...medusa-payment-manual@1.0.3) (2021-08-31) diff --git a/packages/medusa-payment-manual/package.json b/packages/medusa-payment-manual/package.json index eb92d9b4e1..4ee70b9e8c 100644 --- a/packages/medusa-payment-manual/package.json +++ b/packages/medusa-payment-manual/package.json @@ -1,6 +1,6 @@ { "name": "medusa-payment-manual", - "version": "1.0.3", + "version": "1.0.4", "description": "A dummy payment provider to be used for testing or manual payments", "main": "index.js", "repository": { diff --git a/packages/medusa-plugin-brightpearl/CHANGELOG.md b/packages/medusa-plugin-brightpearl/CHANGELOG.md index 3dd4b3503d..5591c5d591 100644 --- a/packages/medusa-plugin-brightpearl/CHANGELOG.md +++ b/packages/medusa-plugin-brightpearl/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.30](https://github.com/medusajs/medusa/compare/medusa-plugin-brightpearl@1.1.28...medusa-plugin-brightpearl@1.1.30) (2021-09-02) + + +### Bug Fixes + +* account for non-division currencies in sales credit ([#342](https://github.com/medusajs/medusa/issues/342)) ([bd1e115](https://github.com/medusajs/medusa/commit/bd1e115696cf020a29bbfe07e5e85a3e0314bf78)) + + + + + ## [1.1.29](https://github.com/medusajs/medusa/compare/medusa-plugin-brightpearl@1.1.28...medusa-plugin-brightpearl@1.1.29) (2021-08-31) diff --git a/packages/medusa-plugin-brightpearl/package.json b/packages/medusa-plugin-brightpearl/package.json index e290d68d5a..34396c7f46 100644 --- a/packages/medusa-plugin-brightpearl/package.json +++ b/packages/medusa-plugin-brightpearl/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-brightpearl", - "version": "1.1.29", + "version": "1.1.30", "description": "Brightpearl plugin for Medusa Commerce", "main": "index.js", "repository": { diff --git a/packages/medusa-plugin-restock-notification/CHANGELOG.md b/packages/medusa-plugin-restock-notification/CHANGELOG.md index ed2601da73..c06c02d000 100644 --- a/packages/medusa-plugin-restock-notification/CHANGELOG.md +++ b/packages/medusa-plugin-restock-notification/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.0.18](https://github.com/medusajs/medusa/compare/medusa-plugin-restock-notification@0.0.16...medusa-plugin-restock-notification@0.0.18) (2021-09-02) + +**Note:** Version bump only for package medusa-plugin-restock-notification + + + + + ## [0.0.17](https://github.com/medusajs/medusa/compare/medusa-plugin-restock-notification@0.0.16...medusa-plugin-restock-notification@0.0.17) (2021-08-31) **Note:** Version bump only for package medusa-plugin-restock-notification diff --git a/packages/medusa-plugin-restock-notification/package.json b/packages/medusa-plugin-restock-notification/package.json index 2004d857f2..a4fae5d89f 100644 --- a/packages/medusa-plugin-restock-notification/package.json +++ b/packages/medusa-plugin-restock-notification/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-restock-notification", - "version": "0.0.17", + "version": "0.0.18", "main": "index.js", "repository": { "type": "git", diff --git a/packages/medusa-plugin-wishlist/CHANGELOG.md b/packages/medusa-plugin-wishlist/CHANGELOG.md index 49003ab7b9..be22214d88 100644 --- a/packages/medusa-plugin-wishlist/CHANGELOG.md +++ b/packages/medusa-plugin-wishlist/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.25](https://github.com/medusajs/medusa/compare/medusa-plugin-wishlist@1.1.23...medusa-plugin-wishlist@1.1.25) (2021-09-02) + + +### Bug Fixes + +* 404 ([b1132ee](https://github.com/medusajs/medusa/commit/b1132eec23514a6e7a22fe6653f4a4b4fde0e83f)) + + + + + ## [1.1.24](https://github.com/medusajs/medusa/compare/medusa-plugin-wishlist@1.1.23...medusa-plugin-wishlist@1.1.24) (2021-08-31) diff --git a/packages/medusa-plugin-wishlist/package.json b/packages/medusa-plugin-wishlist/package.json index 10203c5e3d..bd75c4d73b 100644 --- a/packages/medusa-plugin-wishlist/package.json +++ b/packages/medusa-plugin-wishlist/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-wishlist", - "version": "1.1.24", + "version": "1.1.25", "description": "Provides /customers/:id/wishlist to add items to a customr's wishlist", "main": "index.js", "repository": { diff --git a/packages/medusa/CHANGELOG.md b/packages/medusa/CHANGELOG.md index 0ffeb0e49c..f654c66090 100644 --- a/packages/medusa/CHANGELOG.md +++ b/packages/medusa/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.40](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.38...@medusajs/medusa@1.1.40) (2021-09-02) + + +### Bug Fixes + +* Account for non-discountable items in getRefundTotal ([#347](https://github.com/medusajs/medusa/issues/347)) ([fd14e24](https://github.com/medusajs/medusa/commit/fd14e243daf2724ce91aaf85c29806f22f3b6623)) + + +### Features + +* creates support for swaps on the storefront ([#355](https://github.com/medusajs/medusa/issues/355)) ([ae82cfc](https://github.com/medusajs/medusa/commit/ae82cfc70a94655ff03fcf1d9b8596f14e8c2840)) + + + + + ## [1.1.39](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.38...@medusajs/medusa@1.1.39) (2021-08-31) diff --git a/packages/medusa/package.json b/packages/medusa/package.json index 3e19c333c9..f9768de5eb 100644 --- a/packages/medusa/package.json +++ b/packages/medusa/package.json @@ -1,6 +1,6 @@ { "name": "@medusajs/medusa", - "version": "1.1.39", + "version": "1.1.40", "description": "E-commerce for JAMstack", "main": "dist/index.js", "bin": { From 2030ab6d35913a9e515c4a691b683b6c6790862b Mon Sep 17 00:00:00 2001 From: Vadim Smirnov <62517920+FuzzyReason@users.noreply.github.com> Date: Tue, 7 Sep 2021 18:24:35 +0300 Subject: [PATCH 5/6] change target branch (#375) --- ...xtjs-storefront-for-your-medusa-project.md | 54 +++++++++++++++++++ www/docs/sidebars.js | 4 ++ 2 files changed, 58 insertions(+) create mode 100644 docs/content/how-to/setting-up-a-nextjs-storefront-for-your-medusa-project.md diff --git a/docs/content/how-to/setting-up-a-nextjs-storefront-for-your-medusa-project.md b/docs/content/how-to/setting-up-a-nextjs-storefront-for-your-medusa-project.md new file mode 100644 index 0000000000..e0b8b8b891 --- /dev/null +++ b/docs/content/how-to/setting-up-a-nextjs-storefront-for-your-medusa-project.md @@ -0,0 +1,54 @@ +--- +title: Setting up a Next.js storefront for your Medusa project +--- + +# Setting up a Next.js storefront for your Medusa project + +> Medusa is a headless open source commerce platform giving engineers the foundation for building unique and scaleable digital commerce projects through our API-first engine. +> Being headless, our starters serve as a good foundation for you to get coupled with a frontend in a matter of minutes. + +This article assumes you already have the Medusa project created and ready to be linked to your Next.js starter. + +## Getting started + +In order to get started let's open the terminal and use the following command to create an instance of your storefront: + +```zsh + npx create-next-app -e https://github.com/medusajs/nextjs-starter-medusa my-medusa-storefront +``` + +Now we have a storefront codebase that is ready to be used with our Medusa server. + +Next, we have to complete two steps to make our new shiny storefront to speak with our server: **link storefront to a server** and **update the `STORE_CORS` variable**. + +Let's jump to these two. + +## Link storefront to a server + +For this part, we should navigate to a `client.js` file which you can find in the utils folder. + +We don't need to do much in here, but to make sure that our storefront is pointing to the port, where the server is running + +```js +import Medusa from "@medusajs/medusa-js" +const BACKEND_URL = process.env.GATSBY_STORE_URL || "http://localhost:9000" // <--- That is the line we are looking for +export const createClient = () => new Medusa({ baseUrl: BACKEND_URL }) +``` + +By default the Medusa server is running at port 9000, so if you didn't change that we are good to go to our next step. + +## Update the `STORE_CORS` variable + +Here let's navigate to your Medusa server and open `medusa-config.js` + +Let's locate the `STORE_CORS` variable and make sure it's the right port (which is 3000 by default for Next.js projects) + +```js +/* + * CORS to avoid issues when consuming Medusa from a client. + * Should be pointing to the port where the storefront is running. + */ +const STORE_CORS = process.env.STORE_CORS || "http://localhost:3000" +``` + +Now we have a storefront that interacts with our Medusa server and with that we have a sweet and complete e-commerce setup with a Next.js storefront. diff --git a/www/docs/sidebars.js b/www/docs/sidebars.js index 7bcca221d6..016a92fa55 100644 --- a/www/docs/sidebars.js +++ b/www/docs/sidebars.js @@ -71,6 +71,10 @@ module.exports = { }, ], }, + { + type: "doc", + id: "how-to/setting-up-a-nextjs-storefront-for-your-medusa-project", + }, ], }, ], From da40c240d1a4c883f178f8eca6c83d03e19ca6ac Mon Sep 17 00:00:00 2001 From: Sebastian Rindom Date: Wed, 8 Sep 2021 08:10:43 +0200 Subject: [PATCH 6/6] Update README.md --- README.md | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/README.md b/README.md index 03fb367226..ac5f3b2616 100644 --- a/README.md +++ b/README.md @@ -66,20 +66,6 @@ To provide a quick way to get you started with a storefront install one of our t With your starter and your Medusa store running you can open http://localhost:8000 (for Gatsby) or http://localhost:3000 (for Nextjs) in your browser and view the products in your store, build a cart, add shipping details and pay and complete an order. -## ☁️ Linking development to Medusa Cloud -With your project in local development you can link your Medusa instance to Medusa Cloud - this will allow you to manage your store, view orders and test out the amazing functionalities that you are building. Linking your project to Medusa Cloud requires that you have a Medusa Cloud account. - -1. **Authenticate your CLI with Medusa Cloud:** - ``` - medusa login - ``` -2. **Link project** - ``` - medusa link --develop - ``` - -You can now navigate to Orders in Medusa Cloud to view the orders in your local Medusa project, just like you would if your store was running in production. - ## ⭐️ Features Medusa comes with a set of building blocks that allow you to create amazing digital commerce experiences, below is a list of some of the features that Medusa come with out of the box: - **Headless**: Medusa is a highly customizable commerce API which means that you may use any presentation layer such as a website, app, chatbots, etc.