Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
New Spree Documentation website (#12021)
Damian Legawiec436b462e97e3
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.mdindex 398a9364eb..78f9aae576 100644--- a/.github/CONTRIBUTING.md+++ b/.github/CONTRIBUTING.md@@ -1 +1 @@-Please visit [Contributing section](https://dev-docs.spreecommerce.org/contributing/index) of Spree Guides. Thank you!+Please visit [Contributing section](https://docs.spreecommerce.org/developer/contributing) of Spree Guides. Thank you!diff --git a/README.md b/README.mdindex f8c3f7a8c4..a8b5dfe7ad 100755--- a/README.md+++ b/README.md@@ -1,19 +1,57 @@-# [Spree Commerce](https://spreecommerce.org) [](https://badge.fury.io/rb/spree) [](https://codeclimate.com/github/spree/spree/test_coverage)--[](https://github.com/spree/spree/releases/tag/v4.7.0)--**Spree** is a headless open source e-commerce platform for global brands.--* [Success Stories](https://spreecommerce.org/stories/)-* [Integrations](https://spreecommerce.org/integrations/)-* [Roadmap](https://github.com/spree/spree/milestones?direction=asc&sort=due_date&state=open)-* [Join our Slack community](http://slack.spreecommerce.org/)--## Key Features--* **[Headless Commerce](https://spreecommerce.org/use-cases/headless-ecommerce-api/)** - build mobile apps or custom storefronts in any technology, [JS/TS SDK available](https://github.com/spree/spree-storefront-api-v2-js-sdk)-* **[PWA](https://spreecommerce.org/use-cases/spree-pwa-progressive-web-application/)** - offline shopping experiences like native mobile apps-* **[Global Commerce](https://spreecommerce.org/use-cases/international-sales-demo/)** - multi currency and multi language support out of the box, different shipping methods / costs for different regions, advanced tax calculation+<p align="center">+ <a href="https://spreecommerce.org">+ <img src="docs/images/spree_header_978-2x.png" alt="Spree Commerce">+ </a>++ <h1 align="center">Spree Commerce</h2>++ <p align="center">+ Open Source e-commerce platform for global brands.+ <br />+ <br />+ The best alternative to BigCommerce, Magento, Commerce Tools, etc.+ <br />+ Build any eCommerce solution that your business requires.+ <br />+ <br />+ <a href="https://slack.spreecommerce.org">Slack</a>+ ·+ <a href="https://docs.spreecommerce.org">Documentation</a>+ ·+ <a href="https://spreecommerce.org">Website</a>+ ·+ <a href="https://github.com/spree/spree/milestones?direction=asc&sort=due_date&state=open">Roadmap</a>+ </p>+</p>++<p align="center">+ <a href="https://rubygems.org/gems/spree">+ <img alt="Gem Total Downloads" src="https://img.shields.io/gem/dt/spree" />+ </a>+ <a href="https://slack.spreecommerce.org">+ <img alt="Slack members" src="https://img.shields.io/badge/slack%20members-6.5K-blue" />+ </a>+</p>++## Getting Started++Visit the [Quickstart Guide](https://docs.spreecommerce.org/developer/getting-started) to set up Spree in 5 minutes.++## Features++* **Composable**+ * connect with your existing ecosystem, build custom workflows with ease+ * [Storefront and Admin API](https://docs.spreecommerce.org/api-reference)+ * Webhooks+* **Customizable and modular**+ * pick and choose parts you want to use+ * customize everything else (storefront, order processing, API, etc)+* **[Global Commerce](https://spreecommerce.org/use-cases/international-sales-demo/)**+ * multi-currency+ * multi-language+ * full translation support for products, categories, and more+ * different shipping methods / costs for different regions+ * advanced tax calculation* **Multi-Store** - host multiple brands / stores on one Spree instance with different branding, configuration, payment methods, shipping options, product catalogs etc* **[Multi-vendor marketplace](https://spreecommerce.org/use-cases/multi-vendor-marketplace-demo/)** - run your own marketplace with multiple suppliers with dedicated Supplier Dashboard* **Responsive Admin Panel** - manage and curate products, users, orders, returns, shipments & more@@ -22,49 +60,23 @@* **Payments** - over 30 payment provider integration out of the box plus API to integrate any other gateway* **Run everywhere** - cloud, VPS, Docker, Kubernetes* **Battle Tested** - used by thousands of merchants around the globe in all categories since 2007!-* **Fully customizable** - pick and choose parts you want to use and customize everything else (storefront, order processing, API, etc) to create unique solutions that your business requires-* **More features available via extensions** - dozens of extensions built by community, ready for use for free!+* **Extensions** adding new features to Spree-## Documentation+<a href="https://docs.spreecommerce.org/developer/getting-started">+ <img src="docs/images/admin_panel_978-2x.png" alt="Spree Admin Dashboard" />+</a>-* [Getting Started](https://dev-docs.spreecommerce.org/getting-started/installation)-* [Developer Documentation](https://dev-docs.spreecommerce.org/)--## API--* [API Reference](https://api.spreecommerce.org/)-* [JavaScript / TypeScript SDK](https://github.com/spree/spree-storefront-api-v2-js-sdk)--## Contributing+## Community & ContributingSpree is an open source project and we love contributions in any form - pull requests, issues, feature ideas!-Please review the [Contributing Guide](https://dev-docs.spreecommerce.org/contributing/index) and see the list of our amazing [Contributors](https://github.com/spree/spree/graphs/contributors).--## Support--Get Spree support on [Slack](https://spree-commerce.slack.com/join/shared_invite/zt-ico7d35e-OeoAYXKO8XNtrZR1ZvBb5A#/shared-invite/email) or directly through a form on our [website](https://spreecommerce.org/contact/).--[](https://spree-commerce.slack.com/join/shared_invite/zt-ico7d35e-OeoAYXKO8XNtrZR1ZvBb5A#/shared-invite/email)--## Sponsored by--### Upside-[](https://upsidelab.io/)--Upside is a leading software development consultancy that specializes in helping global digital commerce brands scale their technology. Upside provides a range of end-to-end software development services, making it a one-stop shop for all digital commerce technology needs.--Visit the website: [upsidelab.io](https://upsidelab.io)--### Vendo--[](https://www.getvendo.com/)+Follow our [Contributing Guide](https://docs.spreecommerce.org/developer/contributing)-Vendo helps your eCommerce brand to sell more and effortlessly through tens of super motivated influencers only at the cost of a sales commission.+[Join our Slack](https://slack.spreecommerce.org) to meet other community members.-While getting your brand and all the products promoted for free to millions of social media followers interested in your products, Vendo automatically pulls and syncs your products and later pushes orders to your dashboard for fulfillment. No extra work.+## Enterprise support-👉 [Get more sales now!](https://www.getvendo.com/vendo-seller-network)+[Contact us](https://spreecommerce.org/contact/) for enterprise support. We offer migration services, can help with custom development, launch your own Spree applications, optimize your Spree stack, etc.## Licensediff --git a/SECURITY.md b/SECURITY.mdindex 1f33b77048..5434698c76 100644--- a/SECURITY.md+++ b/SECURITY.md@@ -1 +1 @@-Please see [Spree Guides Security section](https://dev-docs.spreecommerce.org/security/index).+Please see [Spree Guides Security section](https://docs.spreecommerce.org/developer/security).diff --git a/api/spec/swagger_helper.rb b/api/spec/swagger_helper.rbindex bcff999867..6c8a10b411 100644--- a/api/spec/swagger_helper.rb+++ b/api/spec/swagger_helper.rb@@ -16,7 +16,7 @@ RSpec.configure do |config|# document below. You can override this behavior by adding a swagger_doc tag to the# the root example_group in your specs, e.g. describe '...', swagger_doc: 'v2/swagger.json'config.swagger_docs = {- 'v2/platform/index.yaml' => {+ '../docs/api-reference/platform.yaml' => {openapi: '3.0.3',info: {title: 'Platform API',diff --git a/api/spree_api.gemspec b/api/spree_api.gemspecindex 87e9e4c0d3..951dc84d68 100644--- a/api/spree_api.gemspec+++ b/api/spree_api.gemspec@@ -13,7 +13,7 @@ Gem::Specification.new do |s|s.metadata = {'bug_tracker_uri' => 'https://github.com/spree/spree/issues','changelog_uri' => "https://github.com/spree/spree/releases/tag/v#{s.version}",- 'documentation_uri' => 'https://dev-docs.spreecommerce.org/',+ 'documentation_uri' => 'https://docs.spreecommerce.org/','source_code_uri' => "https://github.com/spree/spree/tree/v#{s.version}",}diff --git a/cli/lib/spree_cli/extension.rb b/cli/lib/spree_cli/extension.rbindex bc4a873277..f319c21478 100644--- a/cli/lib/spree_cli/extension.rb+++ b/cli/lib/spree_cli/extension.rb@@ -39,8 +39,7 @@ module SpreeCliCongrats, Your extension has been generated :rocket:Next steps:- * Read Spree Developer Documentation at: https://dev-docs.spreecommerce.org/customization- * Start your extension at: https://dev-docs.spreecommerce.org/extensions/extensions+ * Read Spree Developer Documentation at: https://docs.spreecommerce.org/developer/customization#{'*' * 80}}diff --git a/cli/lib/spree_cli/templates/extension/lib/%file_name%/configuration.rb.tt b/cli/lib/spree_cli/templates/extension/lib/%file_name%/configuration.rb.ttindex 4e13f5c19a..13dd3cc84a 100644--- a/cli/lib/spree_cli/templates/extension/lib/%file_name%/configuration.rb.tt+++ b/cli/lib/spree_cli/templates/extension/lib/%file_name%/configuration.rb.tt@@ -2,7 +2,7 @@ module <%= class_name %>class Configuration < Spree::Preferences::Configuration# Some example preferences are shown below, for more information visit:- # https://dev-docs.spreecommerce.org/internals/preferences+ # https://docs.spreecommerce.org/developer/customizationpreference :enabled, :boolean, default: true# preference :dark_chocolate, :boolean, default: truediff --git a/cli/spree_cli.gemspec b/cli/spree_cli.gemspecindex b4974b6b52..d269c0037a 100644--- a/cli/spree_cli.gemspec+++ b/cli/spree_cli.gemspec@@ -15,7 +15,7 @@ Gem::Specification.new do |s|s.metadata = {"bug_tracker_uri" => "https://github.com/spree/spree/issues","changelog_uri" => "https://github.com/spree/spree/releases/tag/v#{s.version}",- "documentation_uri" => "https://dev-docs.spreecommerce.org/",+ "documentation_uri" => "https://docs.spreecommerce.org/","source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",}diff --git a/core/app/models/spree/stock_location.rb b/core/app/models/spree/stock_location.rbindex c5fee7bb8a..f58d1806aa 100644--- a/core/app/models/spree/stock_location.rb+++ b/core/app/models/spree/stock_location.rb@@ -71,6 +71,11 @@ module Spreestock_item(variant_id) || propagate_variant(variant)end+ # Returns the count on hand number for the variant+ #+ # @param variant Variant instance+ #+ # @return [Integer]def count_on_hand(variant)stock_item(variant).try(:count_on_hand)enddiff --git a/core/lib/generators/spree/install/templates/config/initializers/spree.rb b/core/lib/generators/spree/install/templates/config/initializers/spree.rbindex 26b8a3f66b..146df0b193 100644--- a/core/lib/generators/spree/install/templates/config/initializers/spree.rb+++ b/core/lib/generators/spree/install/templates/config/initializers/spree.rb@@ -11,7 +11,7 @@# config.setting_name = 'new value'## More on configuring Spree preferences can be found at:-# https://dev-docs.spreecommerce.org/internals/preferences+# https://docs.spreecommerce.org/developer/customizationSpree.config do |config|# Example:# Uncomment to stop tracking inventory levels in the application@@ -42,7 +42,7 @@ end# Just removing an entry from this initializer will make the dependency value go away.## More on how to use Spree dependencies can be found at:-# https://dev-docs.spreecommerce.org/customization/dependencies+# https://docs.spreecommerce.org/customization/dependenciesSpree.dependencies do |dependencies|# Example:# Uncomment to change the default Service handling adding Items to Cartdiff --git a/core/lib/spree/core/configuration.rb b/core/lib/spree/core/configuration.rbindex f59ab05a3a..b4eb914588 100644--- a/core/lib/spree/core/configuration.rb+++ b/core/lib/spree/core/configuration.rb@@ -22,16 +22,16 @@ module Spreemodule Coreclass Configuration < Preferences::Configuration# Alphabetized to more easily lookup particular preferences- preference :address_requires_state, :boolean, default: true # should state/state_name be required+ preference :address_requires_state, :boolean, default: true, deprecated: true # should state/state_name be requiredpreference :address_requires_phone, :boolean, default: true # Determines whether we require phone in addresspreference :allow_checkout_on_gateway_error, :boolean, default: false- preference :allow_guest_checkout, :boolean, default: true+ preference :allow_guest_checkout, :boolean, default: true # this is only used in the rails frontend, and is not implemented in APIpreference :alternative_shipping_phone, :boolean, default: false # Request extra phone for ship addrpreference :always_include_confirm_step, :boolean, default: false # Ensures confirmation step is always in checkout_progress bar, but does not force a confirm step if your payment methods do not support it.preference :always_put_site_name_in_title, :boolean, deprecated: truepreference :auto_capture, :boolean, default: false # automatically capture the credit card (as opposed to just authorize and capture later)preference :auto_capture_on_dispatch, :boolean, default: false # Captures payment for each shipment in Shipment#after_ship callback, and makes Shipment.ready when payment authorized.- preference :binary_inventory_cache, :boolean, default: false # only invalidate product cache when a stock item changes whether it is in_stock+ preference :binary_inventory_cache, :boolean, default: false, deprecated: true # only invalidate product cache when a stock item changes whether it is in_stockpreference :checkout_zone, :string, default: nil, deprecated: true # replace with the name of a zone if you would like to limit the countriespreference :company, :boolean, default: false # Request company field for billing and shipping addrpreference :currency, :string, default: 'USD', deprecated: truediff --git a/core/spree_core.gemspec b/core/spree_core.gemspecindex cafc04a56e..7514c95c99 100644--- a/core/spree_core.gemspec+++ b/core/spree_core.gemspec@@ -16,7 +16,7 @@ Gem::Specification.new do |s|s.metadata = {"bug_tracker_uri" => "https://github.com/spree/spree/issues","changelog_uri" => "https://github.com/spree/spree/releases/tag/v#{s.version}",- "documentation_uri" => "https://dev-docs.spreecommerce.org/",+ "documentation_uri" => "https://docs.spreecommerce.org/","source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",}diff --git a/docs/api-reference/fetching-multiple-resources.mdx b/docs/api-reference/fetching-multiple-resources.mdxnew file mode 100644index 0000000000..479a858133--- /dev/null+++ b/docs/api-reference/fetching-multiple-resources.mdx@@ -0,0 +1,26 @@+Spree APIs allow you to fetch multiple associated resources in one API call, both for singular resources and collections, eg. we can fetch a Product with all of its variants and images:++```curl+curl --request GET \+ --url 'https://demo.spreecommerce.org/api/v2/storefront/products/classic-varsity-top?include=variants%252Cimages' \+ --header 'Accept: application/vnd.api+json'+```++This will return a JSON response with `data[relationships]` node (links to what resources connects to which) and `included` node (images and variants JSON responses).++This way you can easily control what resources you want to include in the response and+avoid making multiple API calls.++## Nested resources++You can also nest resources, eg. fetching Product Variants with their Option Values:++```curl+curl --request GET \+ --url 'https://demo.spreecommerce.org/api/v2/storefront/products/classic-varsity-top?include=variants.option_values' \+ --header 'Accept: application/vnd.api+json'+```++## Open source libraries to transform JSONApi to a flat JSON response++As you probably noticed the JSON response can sometimes be quite big and hard to follow. To ease working with included resources we recommend checking out [one of the open-source libraries](https://jsonapi.org/implementations/) that can help deserialize responses.\ No newline at end of filediff --git a/docs/api-reference/filtering-and-sorting.mdx b/docs/api-reference/filtering-and-sorting.mdxnew file mode 100644index 0000000000..8cfaa641fe--- /dev/null+++ b/docs/api-reference/filtering-and-sorting.mdx@@ -0,0 +1,53 @@+## Filtering++You can filter out collection results by applying filter parameters to your API calls, eg.++```curl+curl --request GET \+ --url 'https://demo.spreecommerce.org/api/v2/storefront/products' \+ --header 'Accept: application/vnd.api+json' \+ --data-urlencode 'filter[skus]=classic-varsity-top-large'+```++You can combine multiple filters to find only records that match both criteria:++```http+curl --request GET \+ --url 'https://demo.spreecommerce.org/api/v2/storefront/products' \+ --header 'Accept: application/vnd.api+json' \+ --data-urlencode 'filter[price]=10,100' \+ --data-urlencode 'filter[name]=Classic Varsity'+```++[Products list endpoint ](https://developers.spreecommerce.org/reference/products-list) covers how to filter by these attributes in more detail.++## Sorting++Sorting is being performed by supplying `sort` parameter in your API calls.++Ascending sort, eg.++```curl+curl --request GET \+ --url 'https://demo.spreecommerce.org/api/v2/storefront/products?sort=price' \+ --header 'Accept: application/vnd.api+json'+```++Descending sort is performed by adding `-` before the column name, eg:++```curl+curl --request GET \+ --url 'https://demo.spreecommerce.org/api/v2/storefront/products?sort=-price' \+ --header 'Accept: application/vnd.api+json'+```++You can also combine multiple attributes:++```curl+curl --request GET \+ --url 'https://demo.spreecommerce.org/api/v2/storefront/products' \+ --data-urlencode 'sort=-price,updated_at' \+ --header 'Accept: application/vnd.api+json'+```++Each endpoint includes a list of attributes you can sort by. The default ones are always `id`, `created_at`, `updated_at` and `name`.diff --git a/docs/api-reference/introduction.mdx b/docs/api-reference/introduction.mdxnew file mode 100644index 0000000000..005309dac2--- /dev/null+++ b/docs/api-reference/introduction.mdx@@ -0,0 +1,18 @@+Spree comes with a fully-featured API that allows it to operate in a fully headless mode. This means that you can use Spree as a backend and build your custom storefront, mobile app, or any other application that needs to interact with an e-commerce platform.++## APIs++Currently Spree includes 2 APIs:++<CardGroup cols={2}>+ <Card title="Storefront API" href="storefront">+ Designed to allow customers to interact with the store via external applications (e.g. Vue Storefront or a dedicated mobile app)+ </Card>+ <Card title="Platform API" href="platform">+ Provides management capabilities, allowing third party apps to perform actions otherwise available via the admin panel.+ </Card>+</CardGroup>++### Legacy REST API v1++Legacy REST API v1 was extracted to `spree_api_v1` gem. It is not recommended to use it in new projects, but it's still available for existing ones.diff --git a/api/docs/oauth/index.yml b/docs/api-reference/oauth.ymlsimilarity index 100%rename from api/docs/oauth/index.ymlrename to docs/api-reference/oauth.ymldiff --git a/docs/api-reference/pagination.mdx b/docs/api-reference/pagination.mdxnew file mode 100644index 0000000000..dc4bcc489a--- /dev/null+++ b/docs/api-reference/pagination.mdx@@ -0,0 +1,37 @@+All lists implement the same method for pagination with `page` and `per_page` parameters, eg.++```curl+curl --request GET \+ --url 'https://demo.spreecommerce.org/api/v2/storefront/products?page=1&per_page=25' \+ --header 'Accept: application/vnd.api+json'+```++Both of these parameters are optional. There is a limit of 500 records that can be fetched by a single request. If this doesn't work for your use case, please contact us so we can work on resolving this issue.++Response for that call will include a `meta` node with:++```json+"meta": {+ "count": 25,+ "total_count": 26,+ "total_pages": 2+}+```++`count` is the number of records returned on the current page+`total_count` is the total number of records in the collection+`total_pages` is the total number of pages++The response will also include the`links` node:++```json+"links": {+ "self": "https://demo.spreecommerce.org/api/v2/storefront/products?per_page=25",+ "next": "https://demo.spreecommerce.org/api/v2/storefront/products?page=2&per_page=25",+ "prev": "https://demo.spreecommerce.org/api/v2/storefront/products?page=1&per_page=25",+ "last": "https://demo.spreecommerce.org/api/v2/storefront/products?page=2&per_page=25",+ "first": "https://demo.spreecommerce.org/api/v2/storefront/products?page=1&per_page=25"+ }+```++With fully generates API URLs for pagination.\ No newline at end of filediff --git a/api/docs/v2/platform/index.yaml b/docs/api-reference/platform.yamlsimilarity index 100%rename from api/docs/v2/platform/index.yamlrename to docs/api-reference/platform.yamldiff --git a/docs/api-reference/platform/addresses/create-an-address.mdx b/docs/api-reference/platform/addresses/create-an-address.mdxnew file mode 100644index 0000000000..6e49b9edca--- /dev/null+++ b/docs/api-reference/platform/addresses/create-an-address.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/addresses+---\ No newline at end of filediff --git a/docs/api-reference/platform/addresses/delete-an-address.mdx b/docs/api-reference/platform/addresses/delete-an-address.mdxnew file mode 100644index 0000000000..3eac60561f--- /dev/null+++ b/docs/api-reference/platform/addresses/delete-an-address.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/addresses/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/addresses/return-a-list-of-addresses.mdx b/docs/api-reference/platform/addresses/return-a-list-of-addresses.mdxnew file mode 100644index 0000000000..2ea89ce0ee--- /dev/null+++ b/docs/api-reference/platform/addresses/return-a-list-of-addresses.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/addresses+---\ No newline at end of filediff --git a/docs/api-reference/platform/addresses/return-an-address.mdx b/docs/api-reference/platform/addresses/return-an-address.mdxnew file mode 100644index 0000000000..12da3c1a86--- /dev/null+++ b/docs/api-reference/platform/addresses/return-an-address.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/addresses/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/addresses/update-an-address.mdx b/docs/api-reference/platform/addresses/update-an-address.mdxnew file mode 100644index 0000000000..d50a884ae3--- /dev/null+++ b/docs/api-reference/platform/addresses/update-an-address.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/addresses/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/adjustments/create-an-adjustment.mdx b/docs/api-reference/platform/adjustments/create-an-adjustment.mdxnew file mode 100644index 0000000000..a90603302c--- /dev/null+++ b/docs/api-reference/platform/adjustments/create-an-adjustment.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/adjustments+---\ No newline at end of filediff --git a/docs/api-reference/platform/adjustments/delete-an-adjustment.mdx b/docs/api-reference/platform/adjustments/delete-an-adjustment.mdxnew file mode 100644index 0000000000..757163fc20--- /dev/null+++ b/docs/api-reference/platform/adjustments/delete-an-adjustment.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/adjustments/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/adjustments/return-a-list-of-adjustments.mdx b/docs/api-reference/platform/adjustments/return-a-list-of-adjustments.mdxnew file mode 100644index 0000000000..6fbf7864a2--- /dev/null+++ b/docs/api-reference/platform/adjustments/return-a-list-of-adjustments.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/adjustments+---\ No newline at end of filediff --git a/docs/api-reference/platform/adjustments/return-an-adjustment.mdx b/docs/api-reference/platform/adjustments/return-an-adjustment.mdxnew file mode 100644index 0000000000..11eb49be4d--- /dev/null+++ b/docs/api-reference/platform/adjustments/return-an-adjustment.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/adjustments/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/adjustments/update-an-adjustment.mdx b/docs/api-reference/platform/adjustments/update-an-adjustment.mdxnew file mode 100644index 0000000000..0f1a2eca73--- /dev/null+++ b/docs/api-reference/platform/adjustments/update-an-adjustment.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/adjustments/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/authentication.mdx b/docs/api-reference/platform/authentication.mdxnew file mode 100644index 0000000000..a9b6a1ac9e--- /dev/null+++ b/docs/api-reference/platform/authentication.mdx@@ -0,0 +1,38 @@+Platform API is meant to be used by external applications to perform operations within Spree. Because of that, it uses a different authentication schema than the Storefront API.++### Creating an application inside Spree++To generate a valid token for the Platform API, you'll first need to create an application inside Spree.++1. Go to Spree's admin panel and open `Apps` -> `oAuth Applications` in the menu++ <img src="/images/Platform API 1.png"/>++2. Click on `New oAuth Application`++ <img src="/images/Platform API 2.png"/>++3. Give your application a name and click `Create`++ <img src="/images/Platform API 3.png"/>++4. Save your Client ID and Secret - you'll later use it to generate a OAuth token to access the platform API++ <img src="/images/Platform API 4.png"/>++### Generating OAuth token++Once the application is configured inside Spree, you can use its credentials to generate an OAuth token that will give you access to the APIs.++To obtain the token, send the following `POST` request to `/spree_oauth/token`++```json+{+ "grant_type": "client_credentials",+ "client_id": "xxx",+ "client_secret": "xxx",+ "scope": "admin"+}+```++In the response, you'll receive a token to pass in `Authorization: Bearer {token}` header when making requests to the Platform API.diff --git a/docs/api-reference/platform/classifications/create-a-classification.mdx b/docs/api-reference/platform/classifications/create-a-classification.mdxnew file mode 100644index 0000000000..b0601ea708--- /dev/null+++ b/docs/api-reference/platform/classifications/create-a-classification.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/classifications+---\ No newline at end of filediff --git a/docs/api-reference/platform/classifications/delete-a-classification.mdx b/docs/api-reference/platform/classifications/delete-a-classification.mdxnew file mode 100644index 0000000000..d4c980fddb--- /dev/null+++ b/docs/api-reference/platform/classifications/delete-a-classification.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/classifications/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/classifications/return-a-classification.mdx b/docs/api-reference/platform/classifications/return-a-classification.mdxnew file mode 100644index 0000000000..53fe8cf15d--- /dev/null+++ b/docs/api-reference/platform/classifications/return-a-classification.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/classifications/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/classifications/return-a-list-of-classifications.mdx b/docs/api-reference/platform/classifications/return-a-list-of-classifications.mdxnew file mode 100644index 0000000000..927e3bb0ce--- /dev/null+++ b/docs/api-reference/platform/classifications/return-a-list-of-classifications.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/classifications+---\ No newline at end of filediff --git a/docs/api-reference/platform/classifications/update-a-classification.mdx b/docs/api-reference/platform/classifications/update-a-classification.mdxnew file mode 100644index 0000000000..19864a46fa--- /dev/null+++ b/docs/api-reference/platform/classifications/update-a-classification.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/classifications/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/cms-pages/create-a-cms-page.mdx b/docs/api-reference/platform/cms-pages/create-a-cms-page.mdxnew file mode 100644index 0000000000..5c142b4bbd--- /dev/null+++ b/docs/api-reference/platform/cms-pages/create-a-cms-page.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/cms_pages+---\ No newline at end of filediff --git a/docs/api-reference/platform/cms-pages/delete-a-cms-page.mdx b/docs/api-reference/platform/cms-pages/delete-a-cms-page.mdxnew file mode 100644index 0000000000..2bd63112ee--- /dev/null+++ b/docs/api-reference/platform/cms-pages/delete-a-cms-page.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/cms_pages/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/cms-pages/return-a-cms-page.mdx b/docs/api-reference/platform/cms-pages/return-a-cms-page.mdxnew file mode 100644index 0000000000..f2bf590455--- /dev/null+++ b/docs/api-reference/platform/cms-pages/return-a-cms-page.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/cms_pages/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/cms-pages/return-a-list-of-cms-pages.mdx b/docs/api-reference/platform/cms-pages/return-a-list-of-cms-pages.mdxnew file mode 100644index 0000000000..11407fe3d9--- /dev/null+++ b/docs/api-reference/platform/cms-pages/return-a-list-of-cms-pages.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/cms_pages+---\ No newline at end of filediff --git a/docs/api-reference/platform/cms-pages/update-a-cms-page.mdx b/docs/api-reference/platform/cms-pages/update-a-cms-page.mdxnew file mode 100644index 0000000000..1d9fe4fbf1--- /dev/null+++ b/docs/api-reference/platform/cms-pages/update-a-cms-page.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/cms_pages/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/cms-sections/create-a-cms-section.mdx b/docs/api-reference/platform/cms-sections/create-a-cms-section.mdxnew file mode 100644index 0000000000..85ffe828ca--- /dev/null+++ b/docs/api-reference/platform/cms-sections/create-a-cms-section.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/cms_sections+---\ No newline at end of filediff --git a/docs/api-reference/platform/cms-sections/delete-a-cms-section.mdx b/docs/api-reference/platform/cms-sections/delete-a-cms-section.mdxnew file mode 100644index 0000000000..c189424e89--- /dev/null+++ b/docs/api-reference/platform/cms-sections/delete-a-cms-section.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/cms_sections/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/cms-sections/return-a-cms-section.mdx b/docs/api-reference/platform/cms-sections/return-a-cms-section.mdxnew file mode 100644index 0000000000..c9a312681a--- /dev/null+++ b/docs/api-reference/platform/cms-sections/return-a-cms-section.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/cms_sections/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/cms-sections/return-a-list-of-cms-sections.mdx b/docs/api-reference/platform/cms-sections/return-a-list-of-cms-sections.mdxnew file mode 100644index 0000000000..9022b5e3d1--- /dev/null+++ b/docs/api-reference/platform/cms-sections/return-a-list-of-cms-sections.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/cms_sections+---\ No newline at end of filediff --git a/docs/api-reference/platform/cms-sections/update-a-cms-section.mdx b/docs/api-reference/platform/cms-sections/update-a-cms-section.mdxnew file mode 100644index 0000000000..75168424aa--- /dev/null+++ b/docs/api-reference/platform/cms-sections/update-a-cms-section.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/cms_sections/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/countries/returns-a-country.mdx b/docs/api-reference/platform/countries/returns-a-country.mdxnew file mode 100644index 0000000000..bc9774df1b--- /dev/null+++ b/docs/api-reference/platform/countries/returns-a-country.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/countries/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/countries/returns-a-list-of-countries.mdx b/docs/api-reference/platform/countries/returns-a-list-of-countries.mdxnew file mode 100644index 0000000000..d1a4843c68--- /dev/null+++ b/docs/api-reference/platform/countries/returns-a-list-of-countries.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/countries+---\ No newline at end of filediff --git a/docs/api-reference/platform/data-feeds/create-a-data-feed.mdx b/docs/api-reference/platform/data-feeds/create-a-data-feed.mdxnew file mode 100644index 0000000000..d881d1f0a0--- /dev/null+++ b/docs/api-reference/platform/data-feeds/create-a-data-feed.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/data_feeds+---\ No newline at end of filediff --git a/docs/api-reference/platform/data-feeds/delete-a-data-feed.mdx b/docs/api-reference/platform/data-feeds/delete-a-data-feed.mdxnew file mode 100644index 0000000000..ef911c13a4--- /dev/null+++ b/docs/api-reference/platform/data-feeds/delete-a-data-feed.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/data_feeds/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/data-feeds/return-a-data-feed.mdx b/docs/api-reference/platform/data-feeds/return-a-data-feed.mdxnew file mode 100644index 0000000000..fa033eaba0--- /dev/null+++ b/docs/api-reference/platform/data-feeds/return-a-data-feed.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/data_feeds/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/data-feeds/return-a-list-of-data-feeds.mdx b/docs/api-reference/platform/data-feeds/return-a-list-of-data-feeds.mdxnew file mode 100644index 0000000000..5baab2c69f--- /dev/null+++ b/docs/api-reference/platform/data-feeds/return-a-list-of-data-feeds.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/data_feeds+---\ No newline at end of filediff --git a/docs/api-reference/platform/data-feeds/update-a-data-feed.mdx b/docs/api-reference/platform/data-feeds/update-a-data-feed.mdxnew file mode 100644index 0000000000..eef9d1c38d--- /dev/null+++ b/docs/api-reference/platform/data-feeds/update-a-data-feed.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/data_feeds/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/digital-assets/create-a-digital-asset.mdx b/docs/api-reference/platform/digital-assets/create-a-digital-asset.mdxnew file mode 100644index 0000000000..260127ea3e--- /dev/null+++ b/docs/api-reference/platform/digital-assets/create-a-digital-asset.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/digitals+---\ No newline at end of filediff --git a/docs/api-reference/platform/digital-assets/delete-a-digital-asset.mdx b/docs/api-reference/platform/digital-assets/delete-a-digital-asset.mdxnew file mode 100644index 0000000000..731ae32fba--- /dev/null+++ b/docs/api-reference/platform/digital-assets/delete-a-digital-asset.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/digitals/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/digital-assets/return-a-digital-asset.mdx b/docs/api-reference/platform/digital-assets/return-a-digital-asset.mdxnew file mode 100644index 0000000000..85c703a321--- /dev/null+++ b/docs/api-reference/platform/digital-assets/return-a-digital-asset.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/digitals/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/digital-assets/return-a-list-of-digital-assets.mdx b/docs/api-reference/platform/digital-assets/return-a-list-of-digital-assets.mdxnew file mode 100644index 0000000000..dc1053a3c6--- /dev/null+++ b/docs/api-reference/platform/digital-assets/return-a-list-of-digital-assets.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/digitals+---\ No newline at end of filediff --git a/docs/api-reference/platform/digital-assets/update-a-digital-asset.mdx b/docs/api-reference/platform/digital-assets/update-a-digital-asset.mdxnew file mode 100644index 0000000000..262ccd30f9--- /dev/null+++ b/docs/api-reference/platform/digital-assets/update-a-digital-asset.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/digitals/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/digital-links/create-a-digital-link.mdx b/docs/api-reference/platform/digital-links/create-a-digital-link.mdxnew file mode 100644index 0000000000..863b8dff16--- /dev/null+++ b/docs/api-reference/platform/digital-links/create-a-digital-link.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/digital_links+---\ No newline at end of filediff --git a/docs/api-reference/platform/digital-links/delete-a-digital-link.mdx b/docs/api-reference/platform/digital-links/delete-a-digital-link.mdxnew file mode 100644index 0000000000..643956f5d2--- /dev/null+++ b/docs/api-reference/platform/digital-links/delete-a-digital-link.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/digital_links/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/digital-links/reset-a-digital-link.mdx b/docs/api-reference/platform/digital-links/reset-a-digital-link.mdxnew file mode 100644index 0000000000..1a466494f7--- /dev/null+++ b/docs/api-reference/platform/digital-links/reset-a-digital-link.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/digital_links/{id}/reset+---\ No newline at end of filediff --git a/docs/api-reference/platform/digital-links/return-a-digital-link.mdx b/docs/api-reference/platform/digital-links/return-a-digital-link.mdxnew file mode 100644index 0000000000..055d5312fa--- /dev/null+++ b/docs/api-reference/platform/digital-links/return-a-digital-link.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/digital_links/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/digital-links/return-a-list-of-digital-links.mdx b/docs/api-reference/platform/digital-links/return-a-list-of-digital-links.mdxnew file mode 100644index 0000000000..35bc821f45--- /dev/null+++ b/docs/api-reference/platform/digital-links/return-a-list-of-digital-links.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/digital_links+---\ No newline at end of filediff --git a/docs/api-reference/platform/digital-links/update-a-digital-link.mdx b/docs/api-reference/platform/digital-links/update-a-digital-link.mdxnew file mode 100644index 0000000000..864186a2bf--- /dev/null+++ b/docs/api-reference/platform/digital-links/update-a-digital-link.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/digital_links/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/line-items/create-a-line-item.mdx b/docs/api-reference/platform/line-items/create-a-line-item.mdxnew file mode 100644index 0000000000..633a967296--- /dev/null+++ b/docs/api-reference/platform/line-items/create-a-line-item.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/line_items+---\ No newline at end of filediff --git a/docs/api-reference/platform/line-items/delete-a-line-item.mdx b/docs/api-reference/platform/line-items/delete-a-line-item.mdxnew file mode 100644index 0000000000..69a28f0603--- /dev/null+++ b/docs/api-reference/platform/line-items/delete-a-line-item.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/line_items/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/line-items/return-a-line-item.mdx b/docs/api-reference/platform/line-items/return-a-line-item.mdxnew file mode 100644index 0000000000..84006937bd--- /dev/null+++ b/docs/api-reference/platform/line-items/return-a-line-item.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/line_items/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/line-items/return-a-list-of-line-items.mdx b/docs/api-reference/platform/line-items/return-a-list-of-line-items.mdxnew file mode 100644index 0000000000..32018b2af9--- /dev/null+++ b/docs/api-reference/platform/line-items/return-a-list-of-line-items.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/line_items+---\ No newline at end of filediff --git a/docs/api-reference/platform/line-items/update-a-line-item.mdx b/docs/api-reference/platform/line-items/update-a-line-item.mdxnew file mode 100644index 0000000000..da8694c53b--- /dev/null+++ b/docs/api-reference/platform/line-items/update-a-line-item.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/line_items/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/menu-items/create-a-menu-item.mdx b/docs/api-reference/platform/menu-items/create-a-menu-item.mdxnew file mode 100644index 0000000000..90d0f45591--- /dev/null+++ b/docs/api-reference/platform/menu-items/create-a-menu-item.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/menu_items+---\ No newline at end of filediff --git a/docs/api-reference/platform/menu-items/delete-a-menu-item.mdx b/docs/api-reference/platform/menu-items/delete-a-menu-item.mdxnew file mode 100644index 0000000000..4b0cc14f21--- /dev/null+++ b/docs/api-reference/platform/menu-items/delete-a-menu-item.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/menu_items/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/menu-items/reposition-a-menu-item.mdx b/docs/api-reference/platform/menu-items/reposition-a-menu-item.mdxnew file mode 100644index 0000000000..a3fa798aea--- /dev/null+++ b/docs/api-reference/platform/menu-items/reposition-a-menu-item.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/menu_items/{id}/reposition+---\ No newline at end of filediff --git a/docs/api-reference/platform/menu-items/return-a-list-of-menu-items.mdx b/docs/api-reference/platform/menu-items/return-a-list-of-menu-items.mdxnew file mode 100644index 0000000000..2e8fb31dc2--- /dev/null+++ b/docs/api-reference/platform/menu-items/return-a-list-of-menu-items.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/menu_items+---\ No newline at end of filediff --git a/docs/api-reference/platform/menu-items/return-a-menu-item.mdx b/docs/api-reference/platform/menu-items/return-a-menu-item.mdxnew file mode 100644index 0000000000..f8f4452329--- /dev/null+++ b/docs/api-reference/platform/menu-items/return-a-menu-item.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/menu_items/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/menu-items/update-a-menu-item.mdx b/docs/api-reference/platform/menu-items/update-a-menu-item.mdxnew file mode 100644index 0000000000..8eaeca1732--- /dev/null+++ b/docs/api-reference/platform/menu-items/update-a-menu-item.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/menu_items/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/menus/create-a-menu.mdx b/docs/api-reference/platform/menus/create-a-menu.mdxnew file mode 100644index 0000000000..c2a2a98fb7--- /dev/null+++ b/docs/api-reference/platform/menus/create-a-menu.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/menus+---\ No newline at end of filediff --git a/docs/api-reference/platform/menus/delete-a-menu.mdx b/docs/api-reference/platform/menus/delete-a-menu.mdxnew file mode 100644index 0000000000..c878f25ae0--- /dev/null+++ b/docs/api-reference/platform/menus/delete-a-menu.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/menus/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/menus/return-a-list-of-menus.mdx b/docs/api-reference/platform/menus/return-a-list-of-menus.mdxnew file mode 100644index 0000000000..ff329cdd8d--- /dev/null+++ b/docs/api-reference/platform/menus/return-a-list-of-menus.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/menus+---\ No newline at end of filediff --git a/docs/api-reference/platform/menus/return-a-menu.mdx b/docs/api-reference/platform/menus/return-a-menu.mdxnew file mode 100644index 0000000000..3693effd96--- /dev/null+++ b/docs/api-reference/platform/menus/return-a-menu.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/menus/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/menus/update-a-menu.mdx b/docs/api-reference/platform/menus/update-a-menu.mdxnew file mode 100644index 0000000000..f8516c9341--- /dev/null+++ b/docs/api-reference/platform/menus/update-a-menu.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/menus/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/option-types/create-an-option-type.mdx b/docs/api-reference/platform/option-types/create-an-option-type.mdxnew file mode 100644index 0000000000..39f8db934c--- /dev/null+++ b/docs/api-reference/platform/option-types/create-an-option-type.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/option_types+---\ No newline at end of filediff --git a/docs/api-reference/platform/option-types/delete-an-option-type.mdx b/docs/api-reference/platform/option-types/delete-an-option-type.mdxnew file mode 100644index 0000000000..4045b7f87d--- /dev/null+++ b/docs/api-reference/platform/option-types/delete-an-option-type.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/option_types/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/option-types/return-a-list-of-option-types.mdx b/docs/api-reference/platform/option-types/return-a-list-of-option-types.mdxnew file mode 100644index 0000000000..85982e1afb--- /dev/null+++ b/docs/api-reference/platform/option-types/return-a-list-of-option-types.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/option_types+---\ No newline at end of filediff --git a/docs/api-reference/platform/option-types/return-an-option-type.mdx b/docs/api-reference/platform/option-types/return-an-option-type.mdxnew file mode 100644index 0000000000..00b7cbdd9a--- /dev/null+++ b/docs/api-reference/platform/option-types/return-an-option-type.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/option_types/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/option-types/update-an-option-type.mdx b/docs/api-reference/platform/option-types/update-an-option-type.mdxnew file mode 100644index 0000000000..f5a9ed48d0--- /dev/null+++ b/docs/api-reference/platform/option-types/update-an-option-type.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/option_types/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/option-values/create-an-option-value.mdx b/docs/api-reference/platform/option-values/create-an-option-value.mdxnew file mode 100644index 0000000000..a2e7fdf01c--- /dev/null+++ b/docs/api-reference/platform/option-values/create-an-option-value.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/option_values+---\ No newline at end of filediff --git a/docs/api-reference/platform/option-values/delete-an-option-value.mdx b/docs/api-reference/platform/option-values/delete-an-option-value.mdxnew file mode 100644index 0000000000..bbd818f473--- /dev/null+++ b/docs/api-reference/platform/option-values/delete-an-option-value.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/option_values/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/option-values/return-a-list-of-option-values.mdx b/docs/api-reference/platform/option-values/return-a-list-of-option-values.mdxnew file mode 100644index 0000000000..808282333d--- /dev/null+++ b/docs/api-reference/platform/option-values/return-a-list-of-option-values.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/option_values+---\ No newline at end of filediff --git a/docs/api-reference/platform/option-values/return-an-option-value.mdx b/docs/api-reference/platform/option-values/return-an-option-value.mdxnew file mode 100644index 0000000000..76c4161b2a--- /dev/null+++ b/docs/api-reference/platform/option-values/return-an-option-value.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/option_values/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/option-values/update-an-option-value.mdx b/docs/api-reference/platform/option-values/update-an-option-value.mdxnew file mode 100644index 0000000000..e811e6a258--- /dev/null+++ b/docs/api-reference/platform/option-values/update-an-option-value.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/option_values/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/orders/advances-an-order.mdx b/docs/api-reference/platform/orders/advances-an-order.mdxnew file mode 100644index 0000000000..fff5b54933--- /dev/null+++ b/docs/api-reference/platform/orders/advances-an-order.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/orders/{id}/advance+---\ No newline at end of filediff --git a/docs/api-reference/platform/orders/apply-coupon-code-for-an-order.mdx b/docs/api-reference/platform/orders/apply-coupon-code-for-an-order.mdxnew file mode 100644index 0000000000..617f56c9a3--- /dev/null+++ b/docs/api-reference/platform/orders/apply-coupon-code-for-an-order.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/orders/{id}/apply_coupon_code+---\ No newline at end of filediff --git a/docs/api-reference/platform/orders/approves-an-order.mdx b/docs/api-reference/platform/orders/approves-an-order.mdxnew file mode 100644index 0000000000..da455275e9--- /dev/null+++ b/docs/api-reference/platform/orders/approves-an-order.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/orders/{id}/approve+---\ No newline at end of filediff --git a/docs/api-reference/platform/orders/cancels-an-order.mdx b/docs/api-reference/platform/orders/cancels-an-order.mdxnew file mode 100644index 0000000000..5f9af4f976--- /dev/null+++ b/docs/api-reference/platform/orders/cancels-an-order.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/orders/{id}/cancel+---\ No newline at end of filediff --git a/docs/api-reference/platform/orders/completes-an-order.mdx b/docs/api-reference/platform/orders/completes-an-order.mdxnew file mode 100644index 0000000000..ed92231caf--- /dev/null+++ b/docs/api-reference/platform/orders/completes-an-order.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/orders/{id}/complete+---\ No newline at end of filediff --git a/docs/api-reference/platform/orders/creates-an-order.mdx b/docs/api-reference/platform/orders/creates-an-order.mdxnew file mode 100644index 0000000000..326c9f9bd2--- /dev/null+++ b/docs/api-reference/platform/orders/creates-an-order.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/orders+---\ No newline at end of filediff --git a/docs/api-reference/platform/orders/delete-an-order.mdx b/docs/api-reference/platform/orders/delete-an-order.mdxnew file mode 100644index 0000000000..f1fbc3083b--- /dev/null+++ b/docs/api-reference/platform/orders/delete-an-order.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/orders/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/orders/empties-an-order.mdx b/docs/api-reference/platform/orders/empties-an-order.mdxnew file mode 100644index 0000000000..8728b9a20e--- /dev/null+++ b/docs/api-reference/platform/orders/empties-an-order.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/orders/{id}/empty+---\ No newline at end of filediff --git a/docs/api-reference/platform/orders/next-an-order.mdx b/docs/api-reference/platform/orders/next-an-order.mdxnew file mode 100644index 0000000000..f59b186984--- /dev/null+++ b/docs/api-reference/platform/orders/next-an-order.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/orders/{id}/next+---\ No newline at end of filediff --git a/docs/api-reference/platform/orders/return-a-list-of-orders.mdx b/docs/api-reference/platform/orders/return-a-list-of-orders.mdxnew file mode 100644index 0000000000..28b6f042e8--- /dev/null+++ b/docs/api-reference/platform/orders/return-a-list-of-orders.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/orders+---\ No newline at end of filediff --git a/docs/api-reference/platform/orders/return-an-order.mdx b/docs/api-reference/platform/orders/return-an-order.mdxnew file mode 100644index 0000000000..3a6acfd852--- /dev/null+++ b/docs/api-reference/platform/orders/return-an-order.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/orders/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/orders/update-an-order.mdx b/docs/api-reference/platform/orders/update-an-order.mdxnew file mode 100644index 0000000000..352506b304--- /dev/null+++ b/docs/api-reference/platform/orders/update-an-order.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/orders/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/orders/use-store-credit-for-an-order.mdx b/docs/api-reference/platform/orders/use-store-credit-for-an-order.mdxnew file mode 100644index 0000000000..4929cfec69--- /dev/null+++ b/docs/api-reference/platform/orders/use-store-credit-for-an-order.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/orders/{id}/use_store_credit+---\ No newline at end of filediff --git a/docs/api-reference/platform/payment-methods/create-a-payment-method.mdx b/docs/api-reference/platform/payment-methods/create-a-payment-method.mdxnew file mode 100644index 0000000000..a3556d7c4c--- /dev/null+++ b/docs/api-reference/platform/payment-methods/create-a-payment-method.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/payment_methods+---\ No newline at end of filediff --git a/docs/api-reference/platform/payment-methods/delete-a-payment-method.mdx b/docs/api-reference/platform/payment-methods/delete-a-payment-method.mdxnew file mode 100644index 0000000000..d8c6959087--- /dev/null+++ b/docs/api-reference/platform/payment-methods/delete-a-payment-method.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/payment_methods/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/payment-methods/return-a-list-of-payment-methods.mdx b/docs/api-reference/platform/payment-methods/return-a-list-of-payment-methods.mdxnew file mode 100644index 0000000000..9fc7b5cec3--- /dev/null+++ b/docs/api-reference/platform/payment-methods/return-a-list-of-payment-methods.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/payment_methods+---\ No newline at end of filediff --git a/docs/api-reference/platform/payment-methods/return-a-payment-method.mdx b/docs/api-reference/platform/payment-methods/return-a-payment-method.mdxnew file mode 100644index 0000000000..27198044c5--- /dev/null+++ b/docs/api-reference/platform/payment-methods/return-a-payment-method.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/payment_methods/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/payment-methods/update-a-payment-method.mdx b/docs/api-reference/platform/payment-methods/update-a-payment-method.mdxnew file mode 100644index 0000000000..5e818cf100--- /dev/null+++ b/docs/api-reference/platform/payment-methods/update-a-payment-method.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/payment_methods/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/payments/delete-a-payment.mdx b/docs/api-reference/platform/payments/delete-a-payment.mdxnew file mode 100644index 0000000000..0864b894ed--- /dev/null+++ b/docs/api-reference/platform/payments/delete-a-payment.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/payments/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/payments/return-a-list-of-payments.mdx b/docs/api-reference/platform/payments/return-a-list-of-payments.mdxnew file mode 100644index 0000000000..2b65508132--- /dev/null+++ b/docs/api-reference/platform/payments/return-a-list-of-payments.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/payments+---\ No newline at end of filediff --git a/docs/api-reference/platform/payments/return-a-payment.mdx b/docs/api-reference/platform/payments/return-a-payment.mdxnew file mode 100644index 0000000000..ce69fd133b--- /dev/null+++ b/docs/api-reference/platform/payments/return-a-payment.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/payments/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/products/create-a-product.mdx b/docs/api-reference/platform/products/create-a-product.mdxnew file mode 100644index 0000000000..c84361a53e--- /dev/null+++ b/docs/api-reference/platform/products/create-a-product.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/products+---\ No newline at end of filediff --git a/docs/api-reference/platform/products/delete-a-product.mdx b/docs/api-reference/platform/products/delete-a-product.mdxnew file mode 100644index 0000000000..36fa9eb6f7--- /dev/null+++ b/docs/api-reference/platform/products/delete-a-product.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/products/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/products/return-a-list-of-products.mdx b/docs/api-reference/platform/products/return-a-list-of-products.mdxnew file mode 100644index 0000000000..69bd7ac2da--- /dev/null+++ b/docs/api-reference/platform/products/return-a-list-of-products.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/products+---\ No newline at end of filediff --git a/docs/api-reference/platform/products/return-a-product.mdx b/docs/api-reference/platform/products/return-a-product.mdxnew file mode 100644index 0000000000..b7a6205235--- /dev/null+++ b/docs/api-reference/platform/products/return-a-product.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/products/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/products/update-a-product.mdx b/docs/api-reference/platform/products/update-a-product.mdxnew file mode 100644index 0000000000..bdefe94284--- /dev/null+++ b/docs/api-reference/platform/products/update-a-product.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/products/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-actions/create-a-promotion-action.mdx b/docs/api-reference/platform/promotion-actions/create-a-promotion-action.mdxnew file mode 100644index 0000000000..21abca25d1--- /dev/null+++ b/docs/api-reference/platform/promotion-actions/create-a-promotion-action.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/promotion_actions+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-actions/delete-a-promotion-action.mdx b/docs/api-reference/platform/promotion-actions/delete-a-promotion-action.mdxnew file mode 100644index 0000000000..ca7b20a7e2--- /dev/null+++ b/docs/api-reference/platform/promotion-actions/delete-a-promotion-action.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/promotion_actions/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-actions/return-a-list-of-promotion-actions.mdx b/docs/api-reference/platform/promotion-actions/return-a-list-of-promotion-actions.mdxnew file mode 100644index 0000000000..4f3ad26386--- /dev/null+++ b/docs/api-reference/platform/promotion-actions/return-a-list-of-promotion-actions.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/promotion_actions+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-actions/return-a-promotion-action.mdx b/docs/api-reference/platform/promotion-actions/return-a-promotion-action.mdxnew file mode 100644index 0000000000..103b809aed--- /dev/null+++ b/docs/api-reference/platform/promotion-actions/return-a-promotion-action.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/promotion_actions/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-actions/update-a-promotion-action.mdx b/docs/api-reference/platform/promotion-actions/update-a-promotion-action.mdxnew file mode 100644index 0000000000..db14ddb7fd--- /dev/null+++ b/docs/api-reference/platform/promotion-actions/update-a-promotion-action.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/promotion_actions/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-categories/create-a-promotion-category.mdx b/docs/api-reference/platform/promotion-categories/create-a-promotion-category.mdxnew file mode 100644index 0000000000..97ba502402--- /dev/null+++ b/docs/api-reference/platform/promotion-categories/create-a-promotion-category.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/promotion_categories+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-categories/delete-a-promotion-category.mdx b/docs/api-reference/platform/promotion-categories/delete-a-promotion-category.mdxnew file mode 100644index 0000000000..9afaf85def--- /dev/null+++ b/docs/api-reference/platform/promotion-categories/delete-a-promotion-category.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/promotion_categories/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-categories/return-a-list-of-promotion-categories.mdx b/docs/api-reference/platform/promotion-categories/return-a-list-of-promotion-categories.mdxnew file mode 100644index 0000000000..a3361549dd--- /dev/null+++ b/docs/api-reference/platform/promotion-categories/return-a-list-of-promotion-categories.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/promotion_categories+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-categories/return-a-promotion-category.mdx b/docs/api-reference/platform/promotion-categories/return-a-promotion-category.mdxnew file mode 100644index 0000000000..539ec2b230--- /dev/null+++ b/docs/api-reference/platform/promotion-categories/return-a-promotion-category.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/promotion_categories/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-categories/update-a-promotion-category.mdx b/docs/api-reference/platform/promotion-categories/update-a-promotion-category.mdxnew file mode 100644index 0000000000..ee2c3e4d69--- /dev/null+++ b/docs/api-reference/platform/promotion-categories/update-a-promotion-category.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/promotion_categories/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-rules/create-a-promotion-rule.mdx b/docs/api-reference/platform/promotion-rules/create-a-promotion-rule.mdxnew file mode 100644index 0000000000..58b900f405--- /dev/null+++ b/docs/api-reference/platform/promotion-rules/create-a-promotion-rule.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/promotion_rules+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-rules/delete-a-promotion-rule.mdx b/docs/api-reference/platform/promotion-rules/delete-a-promotion-rule.mdxnew file mode 100644index 0000000000..06a3bdb3a5--- /dev/null+++ b/docs/api-reference/platform/promotion-rules/delete-a-promotion-rule.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/promotion_rules/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-rules/return-a-list-of-promotion-rules.mdx b/docs/api-reference/platform/promotion-rules/return-a-list-of-promotion-rules.mdxnew file mode 100644index 0000000000..f510809307--- /dev/null+++ b/docs/api-reference/platform/promotion-rules/return-a-list-of-promotion-rules.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/promotion_rules+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-rules/return-a-promotion-rule.mdx b/docs/api-reference/platform/promotion-rules/return-a-promotion-rule.mdxnew file mode 100644index 0000000000..464523a363--- /dev/null+++ b/docs/api-reference/platform/promotion-rules/return-a-promotion-rule.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/promotion_rules/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotion-rules/update-a-promotion-rule.mdx b/docs/api-reference/platform/promotion-rules/update-a-promotion-rule.mdxnew file mode 100644index 0000000000..1e4554f9a3--- /dev/null+++ b/docs/api-reference/platform/promotion-rules/update-a-promotion-rule.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/promotion_rules/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotions/create-a-promotion.mdx b/docs/api-reference/platform/promotions/create-a-promotion.mdxnew file mode 100644index 0000000000..7846ce5b90--- /dev/null+++ b/docs/api-reference/platform/promotions/create-a-promotion.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/promotions+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotions/delete-a-promotion.mdx b/docs/api-reference/platform/promotions/delete-a-promotion.mdxnew file mode 100644index 0000000000..980281529e--- /dev/null+++ b/docs/api-reference/platform/promotions/delete-a-promotion.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/promotions/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotions/return-a-list-of-promotions.mdx b/docs/api-reference/platform/promotions/return-a-list-of-promotions.mdxnew file mode 100644index 0000000000..6a86d3e577--- /dev/null+++ b/docs/api-reference/platform/promotions/return-a-list-of-promotions.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/promotions+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotions/return-a-promotion.mdx b/docs/api-reference/platform/promotions/return-a-promotion.mdxnew file mode 100644index 0000000000..23ea5404cb--- /dev/null+++ b/docs/api-reference/platform/promotions/return-a-promotion.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/promotions/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/promotions/update-a-promotion.mdx b/docs/api-reference/platform/promotions/update-a-promotion.mdxnew file mode 100644index 0000000000..e016f2e620--- /dev/null+++ b/docs/api-reference/platform/promotions/update-a-promotion.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/promotions/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/roles/create-a-role.mdx b/docs/api-reference/platform/roles/create-a-role.mdxnew file mode 100644index 0000000000..76214a762d--- /dev/null+++ b/docs/api-reference/platform/roles/create-a-role.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/roles+---\ No newline at end of filediff --git a/docs/api-reference/platform/roles/delete-a-role.mdx b/docs/api-reference/platform/roles/delete-a-role.mdxnew file mode 100644index 0000000000..7d3f20fd41--- /dev/null+++ b/docs/api-reference/platform/roles/delete-a-role.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/roles/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/roles/return-a-list-of-roles.mdx b/docs/api-reference/platform/roles/return-a-list-of-roles.mdxnew file mode 100644index 0000000000..780278d5be--- /dev/null+++ b/docs/api-reference/platform/roles/return-a-list-of-roles.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/roles+---\ No newline at end of filediff --git a/docs/api-reference/platform/roles/return-a-role.mdx b/docs/api-reference/platform/roles/return-a-role.mdxnew file mode 100644index 0000000000..529011ae57--- /dev/null+++ b/docs/api-reference/platform/roles/return-a-role.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/roles/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/roles/update-a-role.mdx b/docs/api-reference/platform/roles/update-a-role.mdxnew file mode 100644index 0000000000..6714cdcda2--- /dev/null+++ b/docs/api-reference/platform/roles/update-a-role.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/roles/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipments/adds-item-variant-to-an-existing-shipment.mdx b/docs/api-reference/platform/shipments/adds-item-variant-to-an-existing-shipment.mdxnew file mode 100644index 0000000000..ea1a112b1f--- /dev/null+++ b/docs/api-reference/platform/shipments/adds-item-variant-to-an-existing-shipment.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/shipments/{id}/add_item+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipments/cancels-the-shipment.mdx b/docs/api-reference/platform/shipments/cancels-the-shipment.mdxnew file mode 100644index 0000000000..12cf6ce766--- /dev/null+++ b/docs/api-reference/platform/shipments/cancels-the-shipment.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/shipments/{id}/cancel+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipments/create-a-shipment.mdx b/docs/api-reference/platform/shipments/create-a-shipment.mdxnew file mode 100644index 0000000000..83f6cb1299--- /dev/null+++ b/docs/api-reference/platform/shipments/create-a-shipment.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/shipments+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipments/delete-a-shipment.mdx b/docs/api-reference/platform/shipments/delete-a-shipment.mdxnew file mode 100644index 0000000000..cfd4c1e2b2--- /dev/null+++ b/docs/api-reference/platform/shipments/delete-a-shipment.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/shipments/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipments/mark-shipment-as-ready-to-be-shipped.mdx b/docs/api-reference/platform/shipments/mark-shipment-as-ready-to-be-shipped.mdxnew file mode 100644index 0000000000..04c4bd05b1--- /dev/null+++ b/docs/api-reference/platform/shipments/mark-shipment-as-ready-to-be-shipped.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/shipments/{id}/ready+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipments/mark-shipment-as-shipped.mdx b/docs/api-reference/platform/shipments/mark-shipment-as-shipped.mdxnew file mode 100644index 0000000000..eab0b3e05a--- /dev/null+++ b/docs/api-reference/platform/shipments/mark-shipment-as-shipped.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/shipments/{id}/ship+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipments/moves-shipment-back-to-pending-state.mdx b/docs/api-reference/platform/shipments/moves-shipment-back-to-pending-state.mdxnew file mode 100644index 0000000000..37075b98aa--- /dev/null+++ b/docs/api-reference/platform/shipments/moves-shipment-back-to-pending-state.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/shipments/{id}/pend+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipments/removes-item-variant-from-shipment.mdx b/docs/api-reference/platform/shipments/removes-item-variant-from-shipment.mdxnew file mode 100644index 0000000000..fa72033207--- /dev/null+++ b/docs/api-reference/platform/shipments/removes-item-variant-from-shipment.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/shipments/{id}/remove_item+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipments/resumes-the-shipment.mdx b/docs/api-reference/platform/shipments/resumes-the-shipment.mdxnew file mode 100644index 0000000000..7bb75420de--- /dev/null+++ b/docs/api-reference/platform/shipments/resumes-the-shipment.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/shipments/{id}/resume+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipments/return-a-list-of-shipments.mdx b/docs/api-reference/platform/shipments/return-a-list-of-shipments.mdxnew file mode 100644index 0000000000..332b9d2abf--- /dev/null+++ b/docs/api-reference/platform/shipments/return-a-list-of-shipments.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/shipments+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipments/return-a-shipment.mdx b/docs/api-reference/platform/shipments/return-a-shipment.mdxnew file mode 100644index 0000000000..30928294f9--- /dev/null+++ b/docs/api-reference/platform/shipments/return-a-shipment.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/shipments/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipments/update-a-shipment.mdx b/docs/api-reference/platform/shipments/update-a-shipment.mdxnew file mode 100644index 0000000000..82fad4cf68--- /dev/null+++ b/docs/api-reference/platform/shipments/update-a-shipment.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/shipments/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipping-categories/create-a-shipping-category.mdx b/docs/api-reference/platform/shipping-categories/create-a-shipping-category.mdxnew file mode 100644index 0000000000..0c598f0086--- /dev/null+++ b/docs/api-reference/platform/shipping-categories/create-a-shipping-category.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/shipping_categories+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipping-categories/delete-a-shipping-category.mdx b/docs/api-reference/platform/shipping-categories/delete-a-shipping-category.mdxnew file mode 100644index 0000000000..c76792d844--- /dev/null+++ b/docs/api-reference/platform/shipping-categories/delete-a-shipping-category.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/shipping_categories/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipping-categories/return-a-list-of-shipping-categories.mdx b/docs/api-reference/platform/shipping-categories/return-a-list-of-shipping-categories.mdxnew file mode 100644index 0000000000..baeef1db20--- /dev/null+++ b/docs/api-reference/platform/shipping-categories/return-a-list-of-shipping-categories.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/shipping_categories+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipping-categories/return-a-shipping-category.mdx b/docs/api-reference/platform/shipping-categories/return-a-shipping-category.mdxnew file mode 100644index 0000000000..a6ccbe23a1--- /dev/null+++ b/docs/api-reference/platform/shipping-categories/return-a-shipping-category.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/shipping_categories/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipping-categories/update-a-shipping-category.mdx b/docs/api-reference/platform/shipping-categories/update-a-shipping-category.mdxnew file mode 100644index 0000000000..4e17126143--- /dev/null+++ b/docs/api-reference/platform/shipping-categories/update-a-shipping-category.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/shipping_categories/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipping-methods/create-a-shipping-method.mdx b/docs/api-reference/platform/shipping-methods/create-a-shipping-method.mdxnew file mode 100644index 0000000000..1c10585de0--- /dev/null+++ b/docs/api-reference/platform/shipping-methods/create-a-shipping-method.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/shipping_methods+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipping-methods/delete-a-shipping-method.mdx b/docs/api-reference/platform/shipping-methods/delete-a-shipping-method.mdxnew file mode 100644index 0000000000..e84d93f58c--- /dev/null+++ b/docs/api-reference/platform/shipping-methods/delete-a-shipping-method.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/shipping_methods/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipping-methods/return-a-list-of-shipping-methods.mdx b/docs/api-reference/platform/shipping-methods/return-a-list-of-shipping-methods.mdxnew file mode 100644index 0000000000..1049066612--- /dev/null+++ b/docs/api-reference/platform/shipping-methods/return-a-list-of-shipping-methods.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/shipping_methods+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipping-methods/return-a-shipping-method.mdx b/docs/api-reference/platform/shipping-methods/return-a-shipping-method.mdxnew file mode 100644index 0000000000..f1bc0d1e90--- /dev/null+++ b/docs/api-reference/platform/shipping-methods/return-a-shipping-method.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/shipping_methods/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/shipping-methods/update-a-shipping-method.mdx b/docs/api-reference/platform/shipping-methods/update-a-shipping-method.mdxnew file mode 100644index 0000000000..da7ce1c982--- /dev/null+++ b/docs/api-reference/platform/shipping-methods/update-a-shipping-method.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/shipping_methods/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/states/returns-a-list-of-states.mdx b/docs/api-reference/platform/states/returns-a-list-of-states.mdxnew file mode 100644index 0000000000..e2e029b363--- /dev/null+++ b/docs/api-reference/platform/states/returns-a-list-of-states.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/states+---\ No newline at end of filediff --git a/docs/api-reference/platform/states/returns-a-state.mdx b/docs/api-reference/platform/states/returns-a-state.mdxnew file mode 100644index 0000000000..ea88d288fb--- /dev/null+++ b/docs/api-reference/platform/states/returns-a-state.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/states/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/stock-items/create-a-stock-item.mdx b/docs/api-reference/platform/stock-items/create-a-stock-item.mdxnew file mode 100644index 0000000000..265065b0ee--- /dev/null+++ b/docs/api-reference/platform/stock-items/create-a-stock-item.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/stock_items+---\ No newline at end of filediff --git a/docs/api-reference/platform/stock-items/delete-a-stock-item.mdx b/docs/api-reference/platform/stock-items/delete-a-stock-item.mdxnew file mode 100644index 0000000000..91bad5442f--- /dev/null+++ b/docs/api-reference/platform/stock-items/delete-a-stock-item.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/stock_items/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/stock-items/return-a-list-of-stock-items.mdx b/docs/api-reference/platform/stock-items/return-a-list-of-stock-items.mdxnew file mode 100644index 0000000000..edce90da4b--- /dev/null+++ b/docs/api-reference/platform/stock-items/return-a-list-of-stock-items.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/stock_items+---\ No newline at end of filediff --git a/docs/api-reference/platform/stock-items/return-a-stock-item.mdx b/docs/api-reference/platform/stock-items/return-a-stock-item.mdxnew file mode 100644index 0000000000..88771e9306--- /dev/null+++ b/docs/api-reference/platform/stock-items/return-a-stock-item.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/stock_items/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/stock-items/update-a-stock-item.mdx b/docs/api-reference/platform/stock-items/update-a-stock-item.mdxnew file mode 100644index 0000000000..ef665ea3d9--- /dev/null+++ b/docs/api-reference/platform/stock-items/update-a-stock-item.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/stock_items/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/stock-locations/create-a-stock-location.mdx b/docs/api-reference/platform/stock-locations/create-a-stock-location.mdxnew file mode 100644index 0000000000..c515a38484--- /dev/null+++ b/docs/api-reference/platform/stock-locations/create-a-stock-location.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/stock_locations+---\ No newline at end of filediff --git a/docs/api-reference/platform/stock-locations/delete-a-stock-location.mdx b/docs/api-reference/platform/stock-locations/delete-a-stock-location.mdxnew file mode 100644index 0000000000..29762b4c4f--- /dev/null+++ b/docs/api-reference/platform/stock-locations/delete-a-stock-location.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/stock_locations/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/stock-locations/return-a-list-of-stock-locations.mdx b/docs/api-reference/platform/stock-locations/return-a-list-of-stock-locations.mdxnew file mode 100644index 0000000000..7df8e6c28a--- /dev/null+++ b/docs/api-reference/platform/stock-locations/return-a-list-of-stock-locations.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/stock_locations+---\ No newline at end of filediff --git a/docs/api-reference/platform/stock-locations/return-a-stock-location.mdx b/docs/api-reference/platform/stock-locations/return-a-stock-location.mdxnew file mode 100644index 0000000000..7938b58d6c--- /dev/null+++ b/docs/api-reference/platform/stock-locations/return-a-stock-location.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/stock_locations/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/stock-locations/update-a-stock-location.mdx b/docs/api-reference/platform/stock-locations/update-a-stock-location.mdxnew file mode 100644index 0000000000..d419270546--- /dev/null+++ b/docs/api-reference/platform/stock-locations/update-a-stock-location.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/stock_locations/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credit-categories/create-a-store-credit-category.mdx b/docs/api-reference/platform/store-credit-categories/create-a-store-credit-category.mdxnew file mode 100644index 0000000000..9cddfdebbe--- /dev/null+++ b/docs/api-reference/platform/store-credit-categories/create-a-store-credit-category.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/store_credit_categories+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credit-categories/delete-a-store-credit-category.mdx b/docs/api-reference/platform/store-credit-categories/delete-a-store-credit-category.mdxnew file mode 100644index 0000000000..f2a9924121--- /dev/null+++ b/docs/api-reference/platform/store-credit-categories/delete-a-store-credit-category.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/store_credit_categories/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credit-categories/return-a-list-of-store-credit-categories.mdx b/docs/api-reference/platform/store-credit-categories/return-a-list-of-store-credit-categories.mdxnew file mode 100644index 0000000000..896f951e07--- /dev/null+++ b/docs/api-reference/platform/store-credit-categories/return-a-list-of-store-credit-categories.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/store_credit_categories+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credit-categories/return-a-store-credit-category.mdx b/docs/api-reference/platform/store-credit-categories/return-a-store-credit-category.mdxnew file mode 100644index 0000000000..0588ef1b5b--- /dev/null+++ b/docs/api-reference/platform/store-credit-categories/return-a-store-credit-category.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/store_credit_categories/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credit-categories/update-a-store-credit-category.mdx b/docs/api-reference/platform/store-credit-categories/update-a-store-credit-category.mdxnew file mode 100644index 0000000000..b82ccfce24--- /dev/null+++ b/docs/api-reference/platform/store-credit-categories/update-a-store-credit-category.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/store_credit_categories/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credit-types/create-a-store-credit-type.mdx b/docs/api-reference/platform/store-credit-types/create-a-store-credit-type.mdxnew file mode 100644index 0000000000..93c3fc6b7d--- /dev/null+++ b/docs/api-reference/platform/store-credit-types/create-a-store-credit-type.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/store_credit_types+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credit-types/delete-a-store-credit-type.mdx b/docs/api-reference/platform/store-credit-types/delete-a-store-credit-type.mdxnew file mode 100644index 0000000000..a37dd1f065--- /dev/null+++ b/docs/api-reference/platform/store-credit-types/delete-a-store-credit-type.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/store_credit_types/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credit-types/return-a-list-of-store-credit-types.mdx b/docs/api-reference/platform/store-credit-types/return-a-list-of-store-credit-types.mdxnew file mode 100644index 0000000000..1b554bcdc4--- /dev/null+++ b/docs/api-reference/platform/store-credit-types/return-a-list-of-store-credit-types.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/store_credit_types+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credit-types/return-a-store-credit-type.mdx b/docs/api-reference/platform/store-credit-types/return-a-store-credit-type.mdxnew file mode 100644index 0000000000..b474055211--- /dev/null+++ b/docs/api-reference/platform/store-credit-types/return-a-store-credit-type.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/store_credit_types/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credit-types/update-a-store-credit-type.mdx b/docs/api-reference/platform/store-credit-types/update-a-store-credit-type.mdxnew file mode 100644index 0000000000..5e9b406986--- /dev/null+++ b/docs/api-reference/platform/store-credit-types/update-a-store-credit-type.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/store_credit_types/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credits/create-a-store-credit.mdx b/docs/api-reference/platform/store-credits/create-a-store-credit.mdxnew file mode 100644index 0000000000..62a74da372--- /dev/null+++ b/docs/api-reference/platform/store-credits/create-a-store-credit.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/store_credits+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credits/delete-a-store-credit.mdx b/docs/api-reference/platform/store-credits/delete-a-store-credit.mdxnew file mode 100644index 0000000000..6c1e493e90--- /dev/null+++ b/docs/api-reference/platform/store-credits/delete-a-store-credit.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/store_credits/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credits/return-a-list-of-store-credits.mdx b/docs/api-reference/platform/store-credits/return-a-list-of-store-credits.mdxnew file mode 100644index 0000000000..f2b17acdc4--- /dev/null+++ b/docs/api-reference/platform/store-credits/return-a-list-of-store-credits.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/store_credits+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credits/return-a-store-credit.mdx b/docs/api-reference/platform/store-credits/return-a-store-credit.mdxnew file mode 100644index 0000000000..d086b532c3--- /dev/null+++ b/docs/api-reference/platform/store-credits/return-a-store-credit.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/store_credits/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/store-credits/update-a-store-credit.mdx b/docs/api-reference/platform/store-credits/update-a-store-credit.mdxnew file mode 100644index 0000000000..fff92e4b52--- /dev/null+++ b/docs/api-reference/platform/store-credits/update-a-store-credit.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/store_credits/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/tax-categories/create-a-tax-category.mdx b/docs/api-reference/platform/tax-categories/create-a-tax-category.mdxnew file mode 100644index 0000000000..f249313e01--- /dev/null+++ b/docs/api-reference/platform/tax-categories/create-a-tax-category.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/tax_categories+---\ No newline at end of filediff --git a/docs/api-reference/platform/tax-categories/delete-a-tax-category.mdx b/docs/api-reference/platform/tax-categories/delete-a-tax-category.mdxnew file mode 100644index 0000000000..9722cb3b14--- /dev/null+++ b/docs/api-reference/platform/tax-categories/delete-a-tax-category.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/tax_categories/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/tax-categories/return-a-list-of-tax-categories.mdx b/docs/api-reference/platform/tax-categories/return-a-list-of-tax-categories.mdxnew file mode 100644index 0000000000..429ab6e93e--- /dev/null+++ b/docs/api-reference/platform/tax-categories/return-a-list-of-tax-categories.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/tax_categories+---\ No newline at end of filediff --git a/docs/api-reference/platform/tax-categories/return-a-tax-category.mdx b/docs/api-reference/platform/tax-categories/return-a-tax-category.mdxnew file mode 100644index 0000000000..a2cac66898--- /dev/null+++ b/docs/api-reference/platform/tax-categories/return-a-tax-category.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/tax_categories/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/tax-categories/update-a-tax-category.mdx b/docs/api-reference/platform/tax-categories/update-a-tax-category.mdxnew file mode 100644index 0000000000..edcc60ff2a--- /dev/null+++ b/docs/api-reference/platform/tax-categories/update-a-tax-category.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/tax_categories/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/tax-rates/create-a-tax-rate.mdx b/docs/api-reference/platform/tax-rates/create-a-tax-rate.mdxnew file mode 100644index 0000000000..0fa41418c9--- /dev/null+++ b/docs/api-reference/platform/tax-rates/create-a-tax-rate.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/tax_rates+---\ No newline at end of filediff --git a/docs/api-reference/platform/tax-rates/delete-a-tax-rate.mdx b/docs/api-reference/platform/tax-rates/delete-a-tax-rate.mdxnew file mode 100644index 0000000000..faba1ecf18--- /dev/null+++ b/docs/api-reference/platform/tax-rates/delete-a-tax-rate.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/tax_rates/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/tax-rates/return-a-list-of-tax-rates.mdx b/docs/api-reference/platform/tax-rates/return-a-list-of-tax-rates.mdxnew file mode 100644index 0000000000..95e66c3bc8--- /dev/null+++ b/docs/api-reference/platform/tax-rates/return-a-list-of-tax-rates.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/tax_rates+---\ No newline at end of filediff --git a/docs/api-reference/platform/tax-rates/return-a-tax-rate.mdx b/docs/api-reference/platform/tax-rates/return-a-tax-rate.mdxnew file mode 100644index 0000000000..35ccd68b67--- /dev/null+++ b/docs/api-reference/platform/tax-rates/return-a-tax-rate.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/tax_rates/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/tax-rates/update-a-tax-rate.mdx b/docs/api-reference/platform/tax-rates/update-a-tax-rate.mdxnew file mode 100644index 0000000000..d3d8906abd--- /dev/null+++ b/docs/api-reference/platform/tax-rates/update-a-tax-rate.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/tax_rates/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/taxonomies/create-a-taxonomy.mdx b/docs/api-reference/platform/taxonomies/create-a-taxonomy.mdxnew file mode 100644index 0000000000..4407591fe7--- /dev/null+++ b/docs/api-reference/platform/taxonomies/create-a-taxonomy.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/taxonomies+---\ No newline at end of filediff --git a/docs/api-reference/platform/taxonomies/delete-a-taxonomy.mdx b/docs/api-reference/platform/taxonomies/delete-a-taxonomy.mdxnew file mode 100644index 0000000000..22a43f02b1--- /dev/null+++ b/docs/api-reference/platform/taxonomies/delete-a-taxonomy.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/taxonomies/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/taxonomies/return-a-list-of-taxonomies.mdx b/docs/api-reference/platform/taxonomies/return-a-list-of-taxonomies.mdxnew file mode 100644index 0000000000..80ec0e7f94--- /dev/null+++ b/docs/api-reference/platform/taxonomies/return-a-list-of-taxonomies.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/taxonomies+---\ No newline at end of filediff --git a/docs/api-reference/platform/taxonomies/return-a-taxonomy.mdx b/docs/api-reference/platform/taxonomies/return-a-taxonomy.mdxnew file mode 100644index 0000000000..53d02f163f--- /dev/null+++ b/docs/api-reference/platform/taxonomies/return-a-taxonomy.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/taxonomies/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/taxonomies/update-a-taxonomy.mdx b/docs/api-reference/platform/taxonomies/update-a-taxonomy.mdxnew file mode 100644index 0000000000..3fe654e1f8--- /dev/null+++ b/docs/api-reference/platform/taxonomies/update-a-taxonomy.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/taxonomies/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/taxons/create-a-taxon.mdx b/docs/api-reference/platform/taxons/create-a-taxon.mdxnew file mode 100644index 0000000000..bb0384e752--- /dev/null+++ b/docs/api-reference/platform/taxons/create-a-taxon.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/taxons+---\ No newline at end of filediff --git a/docs/api-reference/platform/taxons/delete-a-taxon.mdx b/docs/api-reference/platform/taxons/delete-a-taxon.mdxnew file mode 100644index 0000000000..cfa589b0de--- /dev/null+++ b/docs/api-reference/platform/taxons/delete-a-taxon.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/taxons/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/taxons/reposition-a-taxon.mdx b/docs/api-reference/platform/taxons/reposition-a-taxon.mdxnew file mode 100644index 0000000000..60cfd02fc4--- /dev/null+++ b/docs/api-reference/platform/taxons/reposition-a-taxon.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/taxons/{id}/reposition+---\ No newline at end of filediff --git a/docs/api-reference/platform/taxons/return-a-list-of-taxons.mdx b/docs/api-reference/platform/taxons/return-a-list-of-taxons.mdxnew file mode 100644index 0000000000..7999e61355--- /dev/null+++ b/docs/api-reference/platform/taxons/return-a-list-of-taxons.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/taxons+---\ No newline at end of filediff --git a/docs/api-reference/platform/taxons/return-a-taxon.mdx b/docs/api-reference/platform/taxons/return-a-taxon.mdxnew file mode 100644index 0000000000..2fa2ea2836--- /dev/null+++ b/docs/api-reference/platform/taxons/return-a-taxon.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/taxons/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/taxons/update-a-taxon.mdx b/docs/api-reference/platform/taxons/update-a-taxon.mdxnew file mode 100644index 0000000000..ee6b79123f--- /dev/null+++ b/docs/api-reference/platform/taxons/update-a-taxon.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/taxons/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/users/create-a-user.mdx b/docs/api-reference/platform/users/create-a-user.mdxnew file mode 100644index 0000000000..f9cf189a8d--- /dev/null+++ b/docs/api-reference/platform/users/create-a-user.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/users+---\ No newline at end of filediff --git a/docs/api-reference/platform/users/delete-a-user.mdx b/docs/api-reference/platform/users/delete-a-user.mdxnew file mode 100644index 0000000000..03f85ef2a9--- /dev/null+++ b/docs/api-reference/platform/users/delete-a-user.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/users/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/users/return-a-list-of-users.mdx b/docs/api-reference/platform/users/return-a-list-of-users.mdxnew file mode 100644index 0000000000..1571f5aeac--- /dev/null+++ b/docs/api-reference/platform/users/return-a-list-of-users.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/users+---\ No newline at end of filediff --git a/docs/api-reference/platform/users/return-a-user.mdx b/docs/api-reference/platform/users/return-a-user.mdxnew file mode 100644index 0000000000..93e3716c9e--- /dev/null+++ b/docs/api-reference/platform/users/return-a-user.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/users/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/users/update-a-user.mdx b/docs/api-reference/platform/users/update-a-user.mdxnew file mode 100644index 0000000000..9b640e3e75--- /dev/null+++ b/docs/api-reference/platform/users/update-a-user.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/users/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/variants/delete-a-variant.mdx b/docs/api-reference/platform/variants/delete-a-variant.mdxnew file mode 100644index 0000000000..68908d721d--- /dev/null+++ b/docs/api-reference/platform/variants/delete-a-variant.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/variants/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/variants/return-a-list-of-variants.mdx b/docs/api-reference/platform/variants/return-a-list-of-variants.mdxnew file mode 100644index 0000000000..08c5bb1a6c--- /dev/null+++ b/docs/api-reference/platform/variants/return-a-list-of-variants.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/variants+---\ No newline at end of filediff --git a/docs/api-reference/platform/variants/return-a-variant.mdx b/docs/api-reference/platform/variants/return-a-variant.mdxnew file mode 100644index 0000000000..748edf5670--- /dev/null+++ b/docs/api-reference/platform/variants/return-a-variant.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/variants/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/webhook-events/return-a-list-of-webhook-events.mdx b/docs/api-reference/platform/webhook-events/return-a-list-of-webhook-events.mdxnew file mode 100644index 0000000000..380ebe9b89--- /dev/null+++ b/docs/api-reference/platform/webhook-events/return-a-list-of-webhook-events.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/webhooks/events+---\ No newline at end of filediff --git a/docs/api-reference/platform/webhook-subscribers/create-a-webhook-subscriber.mdx b/docs/api-reference/platform/webhook-subscribers/create-a-webhook-subscriber.mdxnew file mode 100644index 0000000000..7567d2156a--- /dev/null+++ b/docs/api-reference/platform/webhook-subscribers/create-a-webhook-subscriber.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/webhooks/subscribers+---\ No newline at end of filediff --git a/docs/api-reference/platform/webhook-subscribers/delete-a-webhook-subscriber.mdx b/docs/api-reference/platform/webhook-subscribers/delete-a-webhook-subscriber.mdxnew file mode 100644index 0000000000..ccda9996e9--- /dev/null+++ b/docs/api-reference/platform/webhook-subscribers/delete-a-webhook-subscriber.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/webhooks/subscribers/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/webhook-subscribers/return-a-list-of-webhook-subscribers.mdx b/docs/api-reference/platform/webhook-subscribers/return-a-list-of-webhook-subscribers.mdxnew file mode 100644index 0000000000..fa43e9b1b9--- /dev/null+++ b/docs/api-reference/platform/webhook-subscribers/return-a-list-of-webhook-subscribers.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/webhooks/subscribers+---\ No newline at end of filediff --git a/docs/api-reference/platform/webhook-subscribers/return-a-webhook-subscriber.mdx b/docs/api-reference/platform/webhook-subscribers/return-a-webhook-subscriber.mdxnew file mode 100644index 0000000000..c47a87bbbe--- /dev/null+++ b/docs/api-reference/platform/webhook-subscribers/return-a-webhook-subscriber.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/webhooks/subscribers/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/webhook-subscribers/update-a-webhook-subscriber.mdx b/docs/api-reference/platform/webhook-subscribers/update-a-webhook-subscriber.mdxnew file mode 100644index 0000000000..d58ba2cb34--- /dev/null+++ b/docs/api-reference/platform/webhook-subscribers/update-a-webhook-subscriber.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/webhooks/subscribers/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/wished-items/create-a-wished-item.mdx b/docs/api-reference/platform/wished-items/create-a-wished-item.mdxnew file mode 100644index 0000000000..7b8da7b42c--- /dev/null+++ b/docs/api-reference/platform/wished-items/create-a-wished-item.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/wished_items+---\ No newline at end of filediff --git a/docs/api-reference/platform/wished-items/delete-a-wished-item.mdx b/docs/api-reference/platform/wished-items/delete-a-wished-item.mdxnew file mode 100644index 0000000000..aa0f97f71e--- /dev/null+++ b/docs/api-reference/platform/wished-items/delete-a-wished-item.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/wished_items/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/wished-items/return-a-list-of-wished-items.mdx b/docs/api-reference/platform/wished-items/return-a-list-of-wished-items.mdxnew file mode 100644index 0000000000..f02fb57f07--- /dev/null+++ b/docs/api-reference/platform/wished-items/return-a-list-of-wished-items.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/wished_items+---\ No newline at end of filediff --git a/docs/api-reference/platform/wished-items/return-a-wished-item.mdx b/docs/api-reference/platform/wished-items/return-a-wished-item.mdxnew file mode 100644index 0000000000..2490dce19f--- /dev/null+++ b/docs/api-reference/platform/wished-items/return-a-wished-item.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/wished_items/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/wished-items/update-a-wished-item.mdx b/docs/api-reference/platform/wished-items/update-a-wished-item.mdxnew file mode 100644index 0000000000..174d6001bb--- /dev/null+++ b/docs/api-reference/platform/wished-items/update-a-wished-item.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/wished_items/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/wishlists/create-a-wishlist.mdx b/docs/api-reference/platform/wishlists/create-a-wishlist.mdxnew file mode 100644index 0000000000..3b1ec82d5d--- /dev/null+++ b/docs/api-reference/platform/wishlists/create-a-wishlist.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/wishlists+---\ No newline at end of filediff --git a/docs/api-reference/platform/wishlists/delete-a-wishlist.mdx b/docs/api-reference/platform/wishlists/delete-a-wishlist.mdxnew file mode 100644index 0000000000..a7d3df960a--- /dev/null+++ b/docs/api-reference/platform/wishlists/delete-a-wishlist.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/wishlists/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/wishlists/return-a-list-of-wishlists.mdx b/docs/api-reference/platform/wishlists/return-a-list-of-wishlists.mdxnew file mode 100644index 0000000000..a907367629--- /dev/null+++ b/docs/api-reference/platform/wishlists/return-a-list-of-wishlists.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/wishlists+---\ No newline at end of filediff --git a/docs/api-reference/platform/wishlists/return-a-wishlist.mdx b/docs/api-reference/platform/wishlists/return-a-wishlist.mdxnew file mode 100644index 0000000000..6a98cfca81--- /dev/null+++ b/docs/api-reference/platform/wishlists/return-a-wishlist.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/wishlists/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/wishlists/update-a-wishlist.mdx b/docs/api-reference/platform/wishlists/update-a-wishlist.mdxnew file mode 100644index 0000000000..a68292aa65--- /dev/null+++ b/docs/api-reference/platform/wishlists/update-a-wishlist.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/wishlists/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/zones/create-a-zone.mdx b/docs/api-reference/platform/zones/create-a-zone.mdxnew file mode 100644index 0000000000..1391b1be61--- /dev/null+++ b/docs/api-reference/platform/zones/create-a-zone.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/platform/zones+---\ No newline at end of filediff --git a/docs/api-reference/platform/zones/delete-a-zone.mdx b/docs/api-reference/platform/zones/delete-a-zone.mdxnew file mode 100644index 0000000000..c493e1a2bb--- /dev/null+++ b/docs/api-reference/platform/zones/delete-a-zone.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/platform/zones/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/zones/return-a-list-of-zones.mdx b/docs/api-reference/platform/zones/return-a-list-of-zones.mdxnew file mode 100644index 0000000000..987932f643--- /dev/null+++ b/docs/api-reference/platform/zones/return-a-list-of-zones.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/zones+---\ No newline at end of filediff --git a/docs/api-reference/platform/zones/return-a-zone.mdx b/docs/api-reference/platform/zones/return-a-zone.mdxnew file mode 100644index 0000000000..3a20d9645c--- /dev/null+++ b/docs/api-reference/platform/zones/return-a-zone.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/platform/zones/{id}+---\ No newline at end of filediff --git a/docs/api-reference/platform/zones/update-a-zone.mdx b/docs/api-reference/platform/zones/update-a-zone.mdxnew file mode 100644index 0000000000..f371f98195--- /dev/null+++ b/docs/api-reference/platform/zones/update-a-zone.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/platform/zones/{id}+---\ No newline at end of filediff --git a/api/docs/v2/storefront/index.yaml b/docs/api-reference/storefront.yamlsimilarity index 99%rename from api/docs/v2/storefront/index.yamlrename to docs/api-reference/storefront.yamlindex 40dae3b4ab..7188381e39 100644--- a/api/docs/v2/storefront/index.yaml+++ b/docs/api-reference/storefront.yaml@@ -984,7 +984,7 @@ paths:System will automatically invalidate previous (non-finalized) payments (excluding store credit / gift card payments).- [More details on payment system](https://dev-docs.spreecommerce.org/internals/payments)+ [More details on payment system](https://docs.spreecommerce.org/developer/core-concepts/payments)operationId: create-paymentresponses:'200':@@ -1271,7 +1271,7 @@ paths:/api/v2/storefront/store:get:summary: Return the current Store- description: 'Returns the current Store. [Read more about Stores](https://dev-docs.spreecommerce.org/internals/stores)'+ description: 'Returns the current Store. [Read more about Stores](https://docs.spreecommerce.org/developer/core-concepts/stores)'tags:- StoresoperationId: show-current-store@@ -1287,7 +1287,7 @@ paths:- bearerAuth: []/api/v2/storefront/taxons:get:- description: 'Returns a list of Taxons. [Read more about Taxons](https://dev-docs.spreecommerce.org/internals/products#taxons-and-taxonomies)'+ description: 'Returns a list of Taxons. [Read more about Taxons](https://docs.spreecommerce.org/developer/core-concepts/products#taxons-and-taxonomies)'tags:- TaxonsoperationId: taxons-list@@ -1840,17 +1840,15 @@ components:scheme: bearerdescription: |-User token to authorize Cart and Checkout requests.-- You can obtain it from [/spree_oauth/token](../../oauth/index.yml) endpoint.+It is required to associate Cart with the User.orderToken:type: apiKeyin: headerdescription: |-Order token to authorize Cart and Checkout requests.- Useful for guest checouts when you don't have the user token (bearerAuth)-- You can obtain it from the [/cart](index.yaml/paths/~1cart/post) endpoint - it's part of the response (value of the `token` attribute).++ [How to obtain X-Spree-Order-Token](../authentication#for-guest-users)name: X-Spree-Order-Tokenschemas:Address:@@ -1976,7 +1974,7 @@ components:- city- country_isoCart:- description: 'The Cart provides a central place to collect information about an order, including line items, adjustments, payments, addresses, and shipments. [Read more in Spree docs](https://dev-docs.spreecommerce.org/internals/orders)'+ description: 'The Cart provides a central place to collect information about an order, including line items, adjustments, payments, addresses, and shipments. [Read more in Spree docs](https://docs.spreecommerce.org/developer/core-concepts/orders)'type: objecttitle: Cartx-internal: false@@ -2044,7 +2042,7 @@ components:- confirm- completedescription: |-- State of the Cart in the Checkout flow. Please see <a href="https://dev-docs.spreecommerce.org/internals/orders#the-order-state-machine">+ State of the Cart in the Checkout flow. Please see <a href="https://docs.spreecommerce.org/developer/core-concepts/orders#the-order-state-machine">The Order State machine</a> for a full list with description.email:@@ -2109,7 +2107,7 @@ components:- shipped- nulldescription: |-- Overall state of the Shipments. Please see <a href="https://dev-docs.spreecommerce.org/internals/orders#order-shipment-states-1">+ Overall state of the Shipments. Please see <a href="https://docs.spreecommerce.org/developer/core-concepts/orders#order-shipment-states-1">Order Shipments states</a> for a full list with description.nullable: true@@ -2123,7 +2121,7 @@ components:- void- nulldescription: |-- Overall state of the Payments. Please see <a href="https://dev-docs.spreecommerce.org/internals/orders#order-payment-states">+ Overall state of the Payments. Please see <a href="https://docs.spreecommerce.org/developer/core-concepts/orders#order-payment-states">Order Payments states</a> for a full list with description.nullable: true@@ -2365,7 +2363,7 @@ components:- relationshipsCountry:title: Country- description: 'Countries within Spree are used as a container for states. Countries can be zone members, and also link to an address. The difference between one country and another on an address record can determine which tax rates and shipping methods are used for the order.[Read more about Countries in Spree](https://dev-docs.spreecommerce.org/internals/addresses#countries)'+ description: 'Countries within Spree are used as a container for states. Countries can be zone members, and also link to an address. The difference between one country and another on an address record can determine which tax rates and shipping methods are used for the order.[Read more about Countries in Spree](https://docs.spreecommerce.org/developer/core-concepts/addresses#countries)'type: objectx-internal: falseproperties:@@ -3349,7 +3347,7 @@ components:- shipped- canceleddescription: |-- Status of the Shipment. For a list of all available statuses please refer: <a href="https://dev-docs.spreecommerce.org/internals/shipments" target="_blank" rel="noopener">+ Status of the Shipment. For a list of all available statuses please refer: <a href="https://docs.spreecommerce.org/developer/core-concepts/shipments" target="_blank" rel="noopener">Shipment section in Spree Guides</a>shipped_at:diff --git a/docs/api-reference/storefront/account-address/create-an-address.mdx b/docs/api-reference/storefront/account-address/create-an-address.mdxnew file mode 100644index 0000000000..45078b90ee--- /dev/null+++ b/docs/api-reference/storefront/account-address/create-an-address.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/storefront/account/addresses+---\ No newline at end of filediff --git a/docs/api-reference/storefront/account-address/list-all-addresses.mdx b/docs/api-reference/storefront/account-address/list-all-addresses.mdxnew file mode 100644index 0000000000..9e07fd3448--- /dev/null+++ b/docs/api-reference/storefront/account-address/list-all-addresses.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/account/addresses+---\ No newline at end of filediff --git a/docs/api-reference/storefront/account-address/remove-an-address.mdx b/docs/api-reference/storefront/account-address/remove-an-address.mdxnew file mode 100644index 0000000000..2f8e54f184--- /dev/null+++ b/docs/api-reference/storefront/account-address/remove-an-address.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/storefront/account/addresses/{id}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/account-address/update-an-address.mdx b/docs/api-reference/storefront/account-address/update-an-address.mdxnew file mode 100644index 0000000000..2fa44de96e--- /dev/null+++ b/docs/api-reference/storefront/account-address/update-an-address.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/storefront/account/addresses/{id}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/account-credit-cards/list-all-credit-cards.mdx b/docs/api-reference/storefront/account-credit-cards/list-all-credit-cards.mdxnew file mode 100644index 0000000000..cc7ce5b39f--- /dev/null+++ b/docs/api-reference/storefront/account-credit-cards/list-all-credit-cards.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/account/credit_cards+---\ No newline at end of filediff --git a/docs/api-reference/storefront/account-credit-cards/remove-a-credit-card.mdx b/docs/api-reference/storefront/account-credit-cards/remove-a-credit-card.mdxnew file mode 100644index 0000000000..63e55d196f--- /dev/null+++ b/docs/api-reference/storefront/account-credit-cards/remove-a-credit-card.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/storefront/account/credit_cards/{id}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/account-credit-cards/retrieve-the-default-credit-card.mdx b/docs/api-reference/storefront/account-credit-cards/retrieve-the-default-credit-card.mdxnew file mode 100644index 0000000000..bda6dde380--- /dev/null+++ b/docs/api-reference/storefront/account-credit-cards/retrieve-the-default-credit-card.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/account/credit_cards/default+---\ No newline at end of filediff --git a/docs/api-reference/storefront/account-orders/list-all-orders.mdx b/docs/api-reference/storefront/account-orders/list-all-orders.mdxnew file mode 100644index 0000000000..eaca22061a--- /dev/null+++ b/docs/api-reference/storefront/account-orders/list-all-orders.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/account/orders+---\ No newline at end of filediff --git a/docs/api-reference/storefront/account-orders/retrieve-an-order.mdx b/docs/api-reference/storefront/account-orders/retrieve-an-order.mdxnew file mode 100644index 0000000000..5a88b815d3--- /dev/null+++ b/docs/api-reference/storefront/account-orders/retrieve-an-order.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/account/orders/{order_number}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/account/create-an-account.mdx b/docs/api-reference/storefront/account/create-an-account.mdxnew file mode 100644index 0000000000..352ce21ea4--- /dev/null+++ b/docs/api-reference/storefront/account/create-an-account.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/storefront/account+---\ No newline at end of filediff --git a/docs/api-reference/storefront/account/retrieve-an-account.mdx b/docs/api-reference/storefront/account/retrieve-an-account.mdxnew file mode 100644index 0000000000..580bd2f845--- /dev/null+++ b/docs/api-reference/storefront/account/retrieve-an-account.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/account+---\ No newline at end of filediff --git a/docs/api-reference/storefront/account/update-an-account.mdx b/docs/api-reference/storefront/account/update-an-account.mdxnew file mode 100644index 0000000000..c19ab29477--- /dev/null+++ b/docs/api-reference/storefront/account/update-an-account.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/storefront/account+---\ No newline at end of filediff --git a/docs/api-reference/storefront/authentication.mdx b/docs/api-reference/storefront/authentication.mdxnew file mode 100644index 0000000000..8c12931b7f--- /dev/null+++ b/docs/api-reference/storefront/authentication.mdx@@ -0,0 +1,88 @@+---+title: Authentication+description: Learn how to authenticate requests to the Storefront API.+---++Storefront API requires authorization only for certain actions associated with user account (e.g. updating saved addresses) or manipulating cart and checkout.++## For guest users++### Using X-Spree-Order-Token header++[Cart](/api-reference/storefront/cart) and [Checkout](/api-reference/storefront/checkout) endpoints paths also allow interactions without the bearer token to allow creating and managing guest checkouts.++When you first create a cart via:++```bash+curl --request POST \+ --url 'https://demo.spreecommerce.org/api/v2/storefront/cart?fields%5Bcart%5D=number%2Ctoken' \+ --header 'Content-Type: application/vnd.api+json'+```++You'll receive a response containing an empty cart. This response also contains a `data.token` attribute.++```json+{+ "data": {+ "id": "114",+ "type": "cart",+ "attributes": {+ "number": "R522550303",+ "token": "NswjLVjZOw4OpEm1yWqlJg1713367317414"+ },+ "relationships": {}+ }+}+```++You can store this token in the frontend session (eg. Session Storage or a cookie) and pass it in a `X-Spree-Order-Token: {token}` header.++## For signed in users++For users who have an account in your store, you will need to generate oAuth tokens to authenticate requests to endpoints such as [Account](/api-reference/storefront/account), [Cart](/api-reference/storefront/cart) and [Checkout](/api-reference/storefront/checkout).++### Generating OAuth token++To obtain a token, execute the following curl command:++```bash+curl -X POST http://localhost:3000/spree_oauth/token \+ --header "Content-Type: application/x-www-form-urlencoded" \+ --data "grant_type=password&[email protected]&password=spree123"+```++You should receive a JSON response with a `access_token` and a `refresh_token`, eg.++```json+{+ "access_token": "CmVXoDp6f5Y51s2xFAAdSbdT5wcGZIuGKKr27zAkBvQ",+ "token_type": "Bearer",+ "expires_in": 7200,+ "refresh_token": "g5xPzY51_QYyok-ZcH9f4_btBkT_RZ6pB7ugGRaMjQQ",+ "created_at": 1713367848+}+```++### Refreshing OAuth token++OAuth tokens obtained via the previous step are valid only for a specific time (defined in `expires_in` attribute).++After that period, you can refresh the token by executing the following curl command:++```bash+curl -X POST http://localhost:3000/spree_oauth/token \+ --header "Content-Type: application/x-www-form-urlencoded" \+ --data "grant_type=refresh_token&refresh_token=g5xPzY51_QYyok-ZcH9f4_btBkT_RZ6pB7ugGRaMjQQ"+```++On a success, you'll receive a new bearer token to use when accessing the API, eg.++```json+{+ "access_token": "JVMcaoCkxV4o2xofhAwf7ReeFEWUM94ZnVSKRITd3TQ",+ "token_type": "Bearer",+ "expires_in": 7200,+ "refresh_token": "nMlyfxfA9U6xfSDnFhoZQzL4IOkDc-EkW1y66ZTf5Oc",+ "created_at": 1713367950+}+```\ No newline at end of filediff --git a/docs/api-reference/storefront/cart-coupons/apply-a-coupon-code.mdx b/docs/api-reference/storefront/cart-coupons/apply-a-coupon-code.mdxnew file mode 100644index 0000000000..574aaf0c79--- /dev/null+++ b/docs/api-reference/storefront/cart-coupons/apply-a-coupon-code.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/storefront/cart/apply_coupon_code+---\ No newline at end of filediff --git a/docs/api-reference/storefront/cart-coupons/remove-a-coupon.mdx b/docs/api-reference/storefront/cart-coupons/remove-a-coupon.mdxnew file mode 100644index 0000000000..d32bc37a85--- /dev/null+++ b/docs/api-reference/storefront/cart-coupons/remove-a-coupon.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/storefront/cart/remove_coupon_code/{coupon_code}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/cart-coupons/remove-all-coupons.mdx b/docs/api-reference/storefront/cart-coupons/remove-all-coupons.mdxnew file mode 100644index 0000000000..e7a6ff187b--- /dev/null+++ b/docs/api-reference/storefront/cart-coupons/remove-all-coupons.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/storefront/cart/remove_coupon_code+---\ No newline at end of filediff --git a/docs/api-reference/storefront/cart-line-items/add-an-item-to-cart.mdx b/docs/api-reference/storefront/cart-line-items/add-an-item-to-cart.mdxnew file mode 100644index 0000000000..4a035fe3ce--- /dev/null+++ b/docs/api-reference/storefront/cart-line-items/add-an-item-to-cart.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/storefront/cart/add_item+---\ No newline at end of filediff --git a/docs/api-reference/storefront/cart-line-items/remove-a-line-item.mdx b/docs/api-reference/storefront/cart-line-items/remove-a-line-item.mdxnew file mode 100644index 0000000000..5753fa78f6--- /dev/null+++ b/docs/api-reference/storefront/cart-line-items/remove-a-line-item.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/storefront/cart/remove_line_item/{id}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/cart-line-items/set-line-item-quantity.mdx b/docs/api-reference/storefront/cart-line-items/set-line-item-quantity.mdxnew file mode 100644index 0000000000..719c0a357b--- /dev/null+++ b/docs/api-reference/storefront/cart-line-items/set-line-item-quantity.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/storefront/cart/set_quantity+---\ No newline at end of filediff --git a/docs/api-reference/storefront/cart-other/associate-a-cart-with-a-user.mdx b/docs/api-reference/storefront/cart-other/associate-a-cart-with-a-user.mdxnew file mode 100644index 0000000000..902a6476a3--- /dev/null+++ b/docs/api-reference/storefront/cart-other/associate-a-cart-with-a-user.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/storefront/cart/associate+---\ No newline at end of filediff --git a/docs/api-reference/storefront/cart-other/change-cart-currency.mdx b/docs/api-reference/storefront/cart-other/change-cart-currency.mdxnew file mode 100644index 0000000000..f25fb99233--- /dev/null+++ b/docs/api-reference/storefront/cart-other/change-cart-currency.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/storefront/cart/change_currency+---\ No newline at end of filediff --git a/docs/api-reference/storefront/cart-other/empty-the-cart.mdx b/docs/api-reference/storefront/cart-other/empty-the-cart.mdxnew file mode 100644index 0000000000..1db8e1f61c--- /dev/null+++ b/docs/api-reference/storefront/cart-other/empty-the-cart.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/storefront/cart/empty+---\ No newline at end of filediff --git a/docs/api-reference/storefront/cart-other/list-estimated-shipping-rates.mdx b/docs/api-reference/storefront/cart-other/list-estimated-shipping-rates.mdxnew file mode 100644index 0000000000..ce2efacf11--- /dev/null+++ b/docs/api-reference/storefront/cart-other/list-estimated-shipping-rates.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/cart/estimate_shipping_rates+---\ No newline at end of filediff --git a/docs/api-reference/storefront/cart/create-a-cart.mdx b/docs/api-reference/storefront/cart/create-a-cart.mdxnew file mode 100644index 0000000000..587aa91b16--- /dev/null+++ b/docs/api-reference/storefront/cart/create-a-cart.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/storefront/cart+---\ No newline at end of filediff --git a/docs/api-reference/storefront/cart/delete-a-cart.mdx b/docs/api-reference/storefront/cart/delete-a-cart.mdxnew file mode 100644index 0000000000..d69c9bb461--- /dev/null+++ b/docs/api-reference/storefront/cart/delete-a-cart.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/storefront/cart+---\ No newline at end of filediff --git a/docs/api-reference/storefront/cart/retrieve-a-cart.mdx b/docs/api-reference/storefront/cart/retrieve-a-cart.mdxnew file mode 100644index 0000000000..6186c0e4c2--- /dev/null+++ b/docs/api-reference/storefront/cart/retrieve-a-cart.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/cart+---\ No newline at end of filediff --git a/docs/api-reference/storefront/checkout-payments/create-new-payment.mdx b/docs/api-reference/storefront/checkout-payments/create-new-payment.mdxnew file mode 100644index 0000000000..e83b0aca50--- /dev/null+++ b/docs/api-reference/storefront/checkout-payments/create-new-payment.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/storefront/checkout/create_payment+---\ No newline at end of filediff --git a/docs/api-reference/storefront/checkout-payments/list-payment-methods.mdx b/docs/api-reference/storefront/checkout-payments/list-payment-methods.mdxnew file mode 100644index 0000000000..dd1307e274--- /dev/null+++ b/docs/api-reference/storefront/checkout-payments/list-payment-methods.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/checkout/payment_methods+---\ No newline at end of filediff --git a/docs/api-reference/storefront/checkout-shipments/list-shipping-rates.mdx b/docs/api-reference/storefront/checkout-shipments/list-shipping-rates.mdxnew file mode 100644index 0000000000..cba7da0699--- /dev/null+++ b/docs/api-reference/storefront/checkout-shipments/list-shipping-rates.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/checkout/shipping_rates+---\ No newline at end of filediff --git a/docs/api-reference/storefront/checkout-shipments/selects-shipping-method-for-shipments.mdx b/docs/api-reference/storefront/checkout-shipments/selects-shipping-method-for-shipments.mdxnew file mode 100644index 0000000000..8a5075364a--- /dev/null+++ b/docs/api-reference/storefront/checkout-shipments/selects-shipping-method-for-shipments.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/storefront/checkout/select_shipping_method+---\ No newline at end of filediff --git a/docs/api-reference/storefront/checkout-state/advance-checkout.mdx b/docs/api-reference/storefront/checkout-state/advance-checkout.mdxnew file mode 100644index 0000000000..de31273607--- /dev/null+++ b/docs/api-reference/storefront/checkout-state/advance-checkout.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/storefront/checkout/advance+---\ No newline at end of filediff --git a/docs/api-reference/storefront/checkout-state/complete-checkout.mdx b/docs/api-reference/storefront/checkout-state/complete-checkout.mdxnew file mode 100644index 0000000000..6b84313d81--- /dev/null+++ b/docs/api-reference/storefront/checkout-state/complete-checkout.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/storefront/checkout/complete+---\ No newline at end of filediff --git a/docs/api-reference/storefront/checkout-state/next-checkout-step.mdx b/docs/api-reference/storefront/checkout-state/next-checkout-step.mdxnew file mode 100644index 0000000000..870d1ef4f1--- /dev/null+++ b/docs/api-reference/storefront/checkout-state/next-checkout-step.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/storefront/checkout/next+---\ No newline at end of filediff --git a/docs/api-reference/storefront/checkout-store-credit/add-store-credit.mdx b/docs/api-reference/storefront/checkout-store-credit/add-store-credit.mdxnew file mode 100644index 0000000000..230c12083b--- /dev/null+++ b/docs/api-reference/storefront/checkout-store-credit/add-store-credit.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/storefront/checkout/add_store_credit+---\ No newline at end of filediff --git a/docs/api-reference/storefront/checkout-store-credit/remove-store-credit.mdx b/docs/api-reference/storefront/checkout-store-credit/remove-store-credit.mdxnew file mode 100644index 0000000000..132ef5dc9c--- /dev/null+++ b/docs/api-reference/storefront/checkout-store-credit/remove-store-credit.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/storefront/checkout/remove_store_credit+---\ No newline at end of filediff --git a/docs/api-reference/storefront/checkout/update-checkout.mdx b/docs/api-reference/storefront/checkout/update-checkout.mdxnew file mode 100644index 0000000000..17a035b91f--- /dev/null+++ b/docs/api-reference/storefront/checkout/update-checkout.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/storefront/checkout+---\ No newline at end of filediff --git a/docs/api-reference/storefront/cms-pages/list-all-cms-pages.mdx b/docs/api-reference/storefront/cms-pages/list-all-cms-pages.mdxnew file mode 100644index 0000000000..78d1ac6dd5--- /dev/null+++ b/docs/api-reference/storefront/cms-pages/list-all-cms-pages.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/cms_pages+---\ No newline at end of filediff --git a/docs/api-reference/storefront/cms-pages/retrieve-a-cms-page.mdx b/docs/api-reference/storefront/cms-pages/retrieve-a-cms-page.mdxnew file mode 100644index 0000000000..966c7abbdc--- /dev/null+++ b/docs/api-reference/storefront/cms-pages/retrieve-a-cms-page.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/cms_pages/{cms_page_slug}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/countries/get-default-country.mdx b/docs/api-reference/storefront/countries/get-default-country.mdxnew file mode 100644index 0000000000..eca1642f1c--- /dev/null+++ b/docs/api-reference/storefront/countries/get-default-country.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/countries/default+---\ No newline at end of filediff --git a/docs/api-reference/storefront/countries/list-all-countries.mdx b/docs/api-reference/storefront/countries/list-all-countries.mdxnew file mode 100644index 0000000000..ea4891b922--- /dev/null+++ b/docs/api-reference/storefront/countries/list-all-countries.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/countries+---\ No newline at end of filediff --git a/docs/api-reference/storefront/countries/retrieve-a-country.mdx b/docs/api-reference/storefront/countries/retrieve-a-country.mdxnew file mode 100644index 0000000000..51ab308f06--- /dev/null+++ b/docs/api-reference/storefront/countries/retrieve-a-country.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/countries/{iso}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/digital-downloads/download-a-digital-asset.mdx b/docs/api-reference/storefront/digital-downloads/download-a-digital-asset.mdxnew file mode 100644index 0000000000..848aad6ba8--- /dev/null+++ b/docs/api-reference/storefront/digital-downloads/download-a-digital-asset.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/digitals/{token}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/menus/list-all-menus.mdx b/docs/api-reference/storefront/menus/list-all-menus.mdxnew file mode 100644index 0000000000..935d30faaa--- /dev/null+++ b/docs/api-reference/storefront/menus/list-all-menus.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/menus+---\ No newline at end of filediff --git a/docs/api-reference/storefront/menus/retrieve-a-menu.mdx b/docs/api-reference/storefront/menus/retrieve-a-menu.mdxnew file mode 100644index 0000000000..52a1b82240--- /dev/null+++ b/docs/api-reference/storefront/menus/retrieve-a-menu.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/menus/{id}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/order-status/retrieve-an-order-status.mdx b/docs/api-reference/storefront/order-status/retrieve-an-order-status.mdxnew file mode 100644index 0000000000..a1a960e778--- /dev/null+++ b/docs/api-reference/storefront/order-status/retrieve-an-order-status.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/order_status/{order_number}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/products/list-all-products.mdx b/docs/api-reference/storefront/products/list-all-products.mdxnew file mode 100644index 0000000000..83872d25c0--- /dev/null+++ b/docs/api-reference/storefront/products/list-all-products.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/products+---\ No newline at end of filediff --git a/docs/api-reference/storefront/products/retrieve-a-product.mdx b/docs/api-reference/storefront/products/retrieve-a-product.mdxnew file mode 100644index 0000000000..47a27e5cd3--- /dev/null+++ b/docs/api-reference/storefront/products/retrieve-a-product.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/products/{product_slug}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/stores/return-the-current-store.mdx b/docs/api-reference/storefront/stores/return-the-current-store.mdxnew file mode 100644index 0000000000..2b87aa830e--- /dev/null+++ b/docs/api-reference/storefront/stores/return-the-current-store.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/store+---\ No newline at end of filediff --git a/docs/api-reference/storefront/taxons/list-all-taxons.mdx b/docs/api-reference/storefront/taxons/list-all-taxons.mdxnew file mode 100644index 0000000000..8f38f6b04f--- /dev/null+++ b/docs/api-reference/storefront/taxons/list-all-taxons.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/taxons+---\ No newline at end of filediff --git a/docs/api-reference/storefront/taxons/retrieve-a-taxon.mdx b/docs/api-reference/storefront/taxons/retrieve-a-taxon.mdxnew file mode 100644index 0000000000..2fa186a8d2--- /dev/null+++ b/docs/api-reference/storefront/taxons/retrieve-a-taxon.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/taxons/{taxon_permalink}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/wishlists-wished-items/add-item-to-wishlist.mdx b/docs/api-reference/storefront/wishlists-wished-items/add-item-to-wishlist.mdxnew file mode 100644index 0000000000..4437ff9e86--- /dev/null+++ b/docs/api-reference/storefront/wishlists-wished-items/add-item-to-wishlist.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/storefront/wishlists/{token}/add_item+---\ No newline at end of filediff --git a/docs/api-reference/storefront/wishlists-wished-items/delete-item-from-wishlist.mdx b/docs/api-reference/storefront/wishlists-wished-items/delete-item-from-wishlist.mdxnew file mode 100644index 0000000000..6185b41dca--- /dev/null+++ b/docs/api-reference/storefront/wishlists-wished-items/delete-item-from-wishlist.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/storefront/wishlists/{token}/remove_item/{item_id}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/wishlists-wished-items/set-wished-item-quantity.mdx b/docs/api-reference/storefront/wishlists-wished-items/set-wished-item-quantity.mdxnew file mode 100644index 0000000000..98f5c15cdb--- /dev/null+++ b/docs/api-reference/storefront/wishlists-wished-items/set-wished-item-quantity.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/storefront/wishlists/{token}/set_item_quantity/{item_id}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/wishlists/create-a-wishlist.mdx b/docs/api-reference/storefront/wishlists/create-a-wishlist.mdxnew file mode 100644index 0000000000..813298c0f0--- /dev/null+++ b/docs/api-reference/storefront/wishlists/create-a-wishlist.mdx@@ -0,0 +1,3 @@+---+openapi: post /api/v2/storefront/wishlists+---\ No newline at end of filediff --git a/docs/api-reference/storefront/wishlists/delete-a-wishlist.mdx b/docs/api-reference/storefront/wishlists/delete-a-wishlist.mdxnew file mode 100644index 0000000000..65a2fafaea--- /dev/null+++ b/docs/api-reference/storefront/wishlists/delete-a-wishlist.mdx@@ -0,0 +1,3 @@+---+openapi: delete /api/v2/storefront/wishlists/{token}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/wishlists/list-all-wishlists.mdx b/docs/api-reference/storefront/wishlists/list-all-wishlists.mdxnew file mode 100644index 0000000000..9d9856391e--- /dev/null+++ b/docs/api-reference/storefront/wishlists/list-all-wishlists.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/wishlists+---\ No newline at end of filediff --git a/docs/api-reference/storefront/wishlists/retrieve-a-wishlist.mdx b/docs/api-reference/storefront/wishlists/retrieve-a-wishlist.mdxnew file mode 100644index 0000000000..53cf2c0d47--- /dev/null+++ b/docs/api-reference/storefront/wishlists/retrieve-a-wishlist.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/wishlists/{token}+---\ No newline at end of filediff --git a/docs/api-reference/storefront/wishlists/retrieve-the-default-wishlist.mdx b/docs/api-reference/storefront/wishlists/retrieve-the-default-wishlist.mdxnew file mode 100644index 0000000000..0d57b55bfc--- /dev/null+++ b/docs/api-reference/storefront/wishlists/retrieve-the-default-wishlist.mdx@@ -0,0 +1,3 @@+---+openapi: get /api/v2/storefront/wishlists/default+---\ No newline at end of filediff --git a/docs/api-reference/storefront/wishlists/update-a-wishlist.mdx b/docs/api-reference/storefront/wishlists/update-a-wishlist.mdxnew file mode 100644index 0000000000..6a6e3bd814--- /dev/null+++ b/docs/api-reference/storefront/wishlists/update-a-wishlist.mdx@@ -0,0 +1,3 @@+---+openapi: patch /api/v2/storefront/wishlists/{token}+---\ No newline at end of filediff --git a/docs/developer/advanced/existing_app_tutorial.mdx b/docs/developer/advanced/existing_app_tutorial.mdxnew file mode 100644index 0000000000..0ba85c2cde--- /dev/null+++ b/docs/developer/advanced/existing_app_tutorial.mdx@@ -0,0 +1,86 @@+# Adding Spree to an existing Rails application++### Add Spree gems to your `Gemfile`++```ruby+gem 'spree' # core and API+gem 'spree_backend' # Admin panel (optional)+gem 'spree_frontend' # Storefront (optional)+gem 'spree_emails' # transactional emails (optional)+gem 'spree_sample' # dummy data like products, taxons, etc+gem 'spree_auth_devise' # Devise integration (optional)+gem 'spree_gateway' # payment gateways eg. Stripe, Braintree (optional)+gem 'spree_i18n' # translation files (optional)++# only needed for MacOS and Ruby 3++gem 'sassc', github: 'sass/sassc-ruby', branch: 'master'+```++### Install gems++```bash+ bundle install+```++### Use the install generators to set up Spree++```+bin/rails g spree:install --user_class=Spree::User+bin/rails g spree:backend:install+bin/rails g spree:frontend:install+bin/rails g spree:auth:install+bin/rails g spree_gateway:install+```++### Installation options++By default, the installation generator (`rails g spree:install`) will run migrations as well as adding seed. This can be disabled using++```bash+bin/rails g spree:install --migrate=false --sample=false --seed=false+```++You can always perform any of these steps later by using these commands.++```bash+bin/rake railties:install:migrations+bin/rails db:migrate+bin/rails db:seed+bin/rake spree_sample:load+```++### Mounting the Spree engine++When `rails g spree:install` is run inside an application, it will install Spree, mounting the `Spree::Core::Engine` component by inserting this line automatically into `config/routes.rb`:++```ruby+mount Spree::Core::Engine, at: '/'+```++By default, all Spree routes will be available at the root of your domain. For example, if your domain is `http://localhost:3000`, Spree’s `/products` URL will be available at `http://localhost:3000/products`.++You can customize this simply by changing the `:at` specification in `config/routes.rb` to be something else. For example, if you would like Spree to be mounted at `/shop`, you can write this:++```ruby+mount Spree::Core::Engine, at: `/shop`+```++The different parts of Spree (API, Admin) will be mounted there as well, eg. `http://localhost:3000/shop/admin`.++### Use your existing authentication++[Spree Auth Devise](https://github.com/spree/spree\_auth\_devise) is the default authentication that comes with Spree but you can swap it for your own, please [follow this guide](../customization/authentication)++### Hello, Spree Commerce++You now have a functional Spree application after running only a few commands!++To stop the webserver, hit Ctrl-C in the terminal window where it's running. In development mode, Spree does not generally require you to stop the server; changes you make in files will be automatically picked up by the server.++#### Logging Into the Admin Panel++The next thing you'll probably want to do is to log into the admin interface. Use your browser window to navigate to [http://localhost:3000/admin](http://localhost:3000/admin). You can log in with the username `[email protected]` and password `spree123`.++Upon successful authentication, you should see the admin screen:++Feel free to explore some of the Admin Panel features that Spree has to offer and to verify that your installation is working properly.diff --git a/docs/developer/contributing/creating-an-extension.mdx b/docs/developer/contributing/creating-an-extension.mdxnew file mode 100644index 0000000000..0c9910165b--- /dev/null+++ b/docs/developer/contributing/creating-an-extension.mdx@@ -0,0 +1,235 @@+---+title: Creating an Extension+description: Learn how to create a Spree extension.+---++## Overview++[Spree Extensions](/extending-spree/3rd-party-extensions) are a way to add new functionality to your Spree store. They are a great way to extend the functionality of Spree and add new features. You can share them with Spree community on Github so anyone can use them, contribute back and share your improvements.++## Getting Started++Let's build a simple extension. Suppose we want the ability to mark certain products as being on sale. We'd like to be able to set a sale price on a product and show products that are on sale on a separate products page. This is a great example of how an extension can be used to build on the solid Spree foundation.++Before we start, let's make sure we have Spree CLI installed by running:++```bash+gem install spree_cmd+```++So let's start by generating the extension. Run the following command from a directory of your choice outside of our Spree application:++```bash+spree extension simple_sales+```++This creates a `spree_simple_sales` directory with several additional files and directories. After generating the extension make sure you change to its directory:++```bash+cd spree_simple_sales+```++## Adding a Sale Price to Variants++The first thing we need to do is create a migration that adds a sale\_price column to [variants](/core-concepts/products#variants).++We can do this with the following command:++```bash+bundle exec rails g migration add_sale_price_to_spree_variants sale_price:decimal+```++Because we are dealing with prices, we need to now edit the generated migration to ensure the correct precision and scale. Edit the file `db/migrate/XXXXXXXXXXX_add_sale_price_to_spree_variants.rb` so that it contains the following:++```ruby+class AddSalePriceToSpreeVariants < ActiveRecord::Migration[7.1]+ def change+ add_column :spree_variants, :sale_price, :decimal, precision: 8, scale: 2+ end+end+```++## Adding Our Extension to the Spree Application++Before we continue development of our extension, let's add it to the Spree application.++Within the `my_store` application directory, add the following line to the bottom of our `Gemfile`:++```ruby+gem 'spree_simple_sales', path: '../spree_simple_sales'+```++You may have to adjust the path somewhat depending on where you created the extension. You want this to be the path relative to the location of the `my_store` application.++Once you have added the gem, it's time to bundle:++```bash+bundle install+```++Finally, let's run the `spree_simple_sales` install generator to copy over the migration we just created \(answer **yes** if prompted to run migrations\):++```bash+# context: Your Spree store's app root (i.e. Rails.root); not the extension's root path.+bundle exec rails g spree_simple_sales:install+```++## Adding a Controller Action to HomeController++Now we need to extend `Spree::HomeController` and add an action that selects "on sale" products.++ Note for the sake of this example that \`Spree::HomeController\` is only included in spree\_frontend so you need to make it a dependency on your extensions \*.gemspec file.++Make sure you are in the `spree_simple_sales` root directory and run the following command to create the directory structure for our controller decorator:++```bash+mkdir -p app/controllers/spree_simple_sales/spree+```++Next, create a new file in the directory we just created called `home_controller_decorator.rb` and add the following content to it:++```ruby+module SpreeSimpleSales+ module Spree+ module HomeControllerDecorator+ def sale+ @products = ::Spree::Product.joins(:variants_including_master).where('spree_variants.sale_price is not null').distinct+ end+ end+ end+end++Spree::HomeController.prepend SpreeSimpleSales::Spree::HomeControllerDecorator+```++This will select just the products that have a variant with a `sale_price` set.++We also need to add a route to this action in our `config/routes.rb` file. Let's do this now. Update the routes file to contain the following:++```ruby+Spree::Core::Engine.routes.draw do+ get "/sale" => "home#sale"+end+```++## Viewing On Sale Products++### Setting the Sale Price for a Variant++Now that our variants have the attribute `sale_price` available to them, let's update the sample data so we have at least one product that is on sale in our application. We will need to do this in the rails console for the time being, as we have no admin interface to set sale prices for variants. So, in order to do this, first open up the rails console:++```bash+bundle exec rails c+```++Now, follow the steps I take in selecting a product and updating its master variant to have a sale price. Note, you may not be editing the exact same product as I am, but this is not important. We just need one "on sale" product to display on the sales page.++```ruby+> product = Spree::Product.first+=> #<Spree::Product id: 107377505, name: "Spree Bag", description: "Lorem ipsum dolor sit amet, consectetuer adipiscing...", available_on: "2013-02-13 18:30:16", deleted_at: nil, permalink: "spree-bag", meta_description: nil, meta_keywords: nil, tax_category_id: 25484906, shipping_category_id: nil, count_on_hand: 10, created_at: "2013-02-13 18:30:16", updated_at: "2013-02-13 18:30:16", on_demand: false>++> variant = product.master+=> #<Spree::Variant id: 833839126, sku: "SPR-00012", weight: nil, height: nil, width: nil, depth: nil, deleted_at: nil, is_master: true, product_id: 107377505, count_on_hand: 10, cost_price: #<BigDecimal:7f8dda5eebf0,'0.21E2',9(36)>, position: nil, lock_version: 0, on_demand: false, cost_currency: nil, sale_price: nil>++> variant.sale_price = 8.00+=> 8.0++> variant.save+=> true+```++## Decorating Variants++Let's fix our extension so that it uses the `sale_price` when it is present.++First, create the required directory structure for our new decorator:++```bash+mkdir -p app/models/spree_simple_sales/spree+```++Next, create the file `app/models/spree_simple_sales/spree/variant_decorator.rb` and add the following content to it:++```ruby+module SpreeSimpleSales+ module Spree+ module VariantDecorator+ def price_in(currency)+ return super unless sale_price.present?+ ::Spree::Price.new(variant_id: self.id, amount: self.sale_price, currency: currency)+ end+ end+ end+end++Spree::Variant.prepend SpreeSimpleSales::Spree::VariantDecorator+```++If there is a `sale_price` present on the product's master variant, we return that price. Otherwise, we call the original implementation of `price_in` \(using `return super`\).++## Testing Our Decorator++It's always a good idea to test your code. We should be extra careful to write tests for our Variant decorator since we are modifying core Spree functionality. Let's write a couple of simple unit tests for `variant_decorator.rb`++### Generating the Test App++An extension is not a full Rails application, so we need something to test our extension against. By running the Spree `test_app` rake task, we can generate a barebones Spree application within our `spec` directory to run our tests against.++We can do this with the following command from the root directory of our extension:++```bash+bundle exec rake test_app+```++After this command completes, you should be able to run `rspec` and see the following output:++```bash+No examples found.++Finished in 0.00005 seconds+0 examples, 0 failures+```++Great! We're ready to start adding some tests. Let's replicate the extension's directory structure in our spec directory by running the following command++```bash+mkdir -p spec/models/spree+```++Now, let's create a new file in this directory called `variant_decorator_spec.rb` and add the following tests to it:++```ruby+require 'spec_helper'++describe Spree::Variant do+ describe "#price_in" do+ it "returns the sale price if it is present" do+ variant = create(:variant, sale_price: 8.00)+ expected = Spree::Price.new(variant_id: variant.id, currency: "USD", amount: variant.sale_price)++ result = variant.price_in("USD")++ expect(result.variant_id).to eq(expected.variant_id)+ expect(result.amount.to_f).to eq(expected.amount.to_f)+ expect(result.currency).to eq(expected.currency)+ end++ it "returns the normal price if it is not on sale" do+ variant = create(:variant, price: 15.00)+ expected = Spree::Price.new(variant_id: variant.id, currency: "USD", amount: variant.price)++ result = variant.price_in("USD")++ expect(result.variant_id).to eq(expected.variant_id)+ expect(result.amount.to_f).to eq(expected.amount.to_f)+ expect(result.currency).to eq(expected.currency)+ end+ end+end+```++These specs test that the `price_in` method we overrode in our `VariantDecorator` returns the correct price both when the sale price is present and when it is not.++## Summary++In this tutorial, you learned how to both install extensions and create your own. A lot of core Spree development concepts were covered and you gained exposure to some of the Spree internals.\ No newline at end of filediff --git a/docs/developer/contributing/developing-spree.mdx b/docs/developer/contributing/developing-spree.mdxnew file mode 100644index 0000000000..3db8fc8565--- /dev/null+++ b/docs/developer/contributing/developing-spree.mdx@@ -0,0 +1,179 @@+---+description: >-+ This guide covers all the necessary steps to contributing to Spree source+ code. We're happy you're here!+---++# Developing Spree++## Spree codebase++Spree API is written in Ruby on Rails framework and is mounted into a Rails application as [a Rails Engine](https://guides.rubyonrails.org/engines.html).++### Spree namespace++All Spree models, controllers and other Ruby classes are namespaced by the `Spree` keyword, eg. `Spree::Product`. This means that those files are also located in `spree` sub-directories eg. [app/models/spree/product.rb](https://github.com/spree/spree/blob/master/core/app/models/spree/product.rb).++## Forking Spree repo++Go to [Spree GitHub repository](https://github.com/spree/spree) and click the **Fork** button. This will create a copy of the Spree repository on your GitHub account. See [Github Documentation](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) for more information on forking.++## Local setup++1. Clone your fork repository++ ```bash+ git clone git://github.com/your_github_username/spree.git+ cd spree+ ```++2. [Install ruby](https://www.ruby-lang.org/en/documentation/installation/)+3. Install required libraries++ You will need SQLite (or PostgreSQL or MySQL) and libvips installed on your system. You can install them using the following commands:++ ```bash+ brew install vips+ ```++ If you are using Ubuntu or Windows Linux Subsystem, you can install libvips using the following command:++ ```bash+ sudo apt-get install libvips+ ```++ Please refer to the [libvips installation guide](https://libvips.github.io/libvips/install.html) for more information.++4. Install the gem dependencies++ ```bash+ bundle install+ ```++## Creating Sandbox application++Bellow command will setup a Rails application with Spree pre-installed with some data seeded:++```bash+bin/sandbox.sh+```++By default, Sandbox uses the **SQLite** database. But you can switch to **PostgreSQL** or **MySQL**:++```bash+DB=postgres bin/sandbox.sh+```++When developing [Spree Admin Dashboard](https://github.com/spree/spree\_backend) you can also pass `SPREE_DASHBOARD_PATH`++```bash+SPREE_DASHBOARD_PATH=../../spree_backend bin/sandbox.sh+```++Start the server++```bash+cd sandbox+bin/rails s+```++### Performance in development mode++You may notice that your Spree store runs slower in development environment. This is caused by disabled caching and automatic reloading of code after each change.++### Caching++Caching is disabled by default. To turn on caching please run:++```bash+bin/rails dev:cache+```++You will need to restart rails server after this change.++## Making changes++Create a new branch for your changes. Do not push changes to the main branch. Branch name should be human-readable and informative, eg.++* bug fixes: `fix/order-recalculation-total-bug`+* features: `feature/my-new-amazing-feature`++## Running Tests++We use [CircleCI](https://circleci.com/) to run the tests for Spree.++You can see the build statuses at [https://circleci.com/gh/spree/spree](https://circleci.com/gh/spree/spree).++Each gem contains its own series of tests, and for each directory, you need to do a quick one-time creation of a test application and then you can use it to run the tests. For example, to run the tests for the core project.++```bash+cd core+bundle exec rake test_app+bundle exec rspec+```++If you would like to run specs against a particular database you may specify the dummy app's database, which defaults to sqlite3.++```bash+DB=postgres bundle exec rake test_app+```++If you want to run specs for only a single spec file++```bash+cd core+bundle exec rspec spec/models/spree/state_spec.rb+```++If you want to run a particular line of spec++```bash+cd core+bundle exec rspec spec/models/spree/state_spec.rb:7+```++If a large number of tests fail when you run rspec for the first time, confirm that you have Redis installed and running. You can use the command `brew services info redis` to check if Redis is running. If it is not running, start Redis with `brew services start redis`.++### Running integration tests on MacOS (only applicable for Admin Panel)++We use chromedriver to run integration tests. To install it please use this command:++```bash+brew cask install chromedriver+```++## Submitting Changes++Please keep your commit history meaningful and clear. [This guide](https://about.gitlab.com/blog/2018/06/07/keeping-git-commit-history-clean/) covers it quite well and we recommend reading it, not only for Spree project but for any IT project overall.++1. Push your changes to a topic branch in your fork of the repository.++ ```bash+ git push -u origin fix/order-recalculation-total-bug+ ```++2. Create a Pull request - [please follow this guide](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork)++ If your changes references Github issues, please mark which issue you're fixing by adding `Fixes #<number or url of the issue>` in the commit name or PR title/description. This will automatically mark that issue as closed when your PR will be merged.+3. Wait for CI to pass+4. If CI passed wait for Spree Core team code review++ We're aiming to review and leave feedback as soon as possible. We'll leave you a meaningul feedback if needed.++## Troubleshooting++This section will help you troubleshoot common issues with Spree.++#### libvips error++If you are using Spree 4.5 or higher, you may encounter the following libvips error:++```bash+LoadError: Could not open library 'vips.so.42'+```++This error is usually an indication that you do not have libvips installed locally on your machine. Check that libvips is installed with `vips -v`, and if it is not installed, follow [installation instructions here](https://www.libvips.org/install.html).++## That's a wrap!++Thank you for participating in Open Source and improving Spree - you're awesome!diff --git a/docs/developer/contributing/quickstart.mdx b/docs/developer/contributing/quickstart.mdxnew file mode 100644index 0000000000..5b03e6c181--- /dev/null+++ b/docs/developer/contributing/quickstart.mdx@@ -0,0 +1,36 @@+---+title: Quickstart+description: How to get started contributing to Spree+---++Spree is an open, community-powered project that anyone can contribute to. There are several ways you can help us improve Spree:++* fixing a bug or creating a new feature+* creating a Spree extension+* upgrading old extensions to recent Spree versions+* helping others on Spree slack+* submitting an issue describing a bug or a feature request++## Fixing a bug or creating a new feature++Before diving into the Spree codebase we recommend you spend some time reviewing the [Core Concepts section](/core-concepts) which will help you understand how Spree works under the hood.++After you're done with that please follow to [Developing Spree guide](developing-spree)++To find issues you can tackle on we recommend visiting [Spree Contribute page](https://github.com/spree/spree/contribute) which lists issues tagged with [Good First Issue label](https://github.com/spree/spree/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22). Those bugs or features are great starting points into Open Source development.++## Creating a Spree extension++Extensions provide additional features and integrations for your Spree store. You can create your own and share with the rest of the community. Before doing so please check our [Extension directory](../extensions/extensions) if your desired extension does not exist already. If not [follow Extensions tutorial](../contributing/extensions_tutorial) to learn how to create one.++## Upgrading old extensions to recent Spree versions++If you found an extension that does not work with the current Spree version you can read the [Updating Extensions for Spree guide](updating-extensions) to bring it up to speed.++## Helping others on Spree slack++Last but not least, you're invited to [join our slack](http://slack.spreecommerce.org) to help and receive guidance from fellow Spree developers including Spree Core Team.++## Submitting issues++You can [submit an issue](https://github.com/spree/spree/issues/new/choose) on our [Github Issues tracker](https://github.com/spree/spree/issues)diff --git a/docs/developer/contributing/updating-extensions.mdx b/docs/developer/contributing/updating-extensions.mdxnew file mode 100644index 0000000000..bc0f44695e--- /dev/null+++ b/docs/developer/contributing/updating-extensions.mdx@@ -0,0 +1,71 @@+---+title: Updating Extensions+description: How to upgrade your Spree extension to work with Spree 4+---++## Zeitwerk compatibility++Zeitwerk is the [new default code autoloader in Rails 6](https://weblog.rubyonrails.org/2019/2/22/zeitwerk-integration-in-rails-6-beta-2/).++This doesn't work well with the old approach to decorators \(files that name ends with decorator.rb, eg. `app/models/spree/order_decorator.rb`\) using [class\_eval](https://www.jimmycuadra.com/posts/metaprogramming-ruby-class-eval-and-instance-eval/).++To fix this we need to convert all `class_eval` decorators to modules and use [Module.prepend](https://medium.com/@leo_hetsch/ruby-modules-include-vs-prepend-vs-extend-f09837a5b073). Also we need to name them properly according to [Zeitwerk naming rules](https://github.com/fxn/zeitwerk#file-structure)++Example of an old decorator:++`app/models/spree/order_decorator.rb`++```ruby+Spree::Order.class_eval do+ has_many :new_custom_model++ def some_method+ # ...+ end+end+```++the same decorator in the new notation:++`app/models/your_extension_name/order_decorator.rb`++```ruby+module YourExtensionName::OrderDecorator+ def self.prepended(base)+ base.has_many :new_custom_model+ end++ def some_method+ # ...+ end+end++::Spree::Order.prepend(YourExtensionName::OrderDecorator)+```++## Fixing Deface Overrides++Please remember to prepare versioned overrides for both Spree 3.x and 4.x, eg. [https://github.com/spree-contrib/spree\_static\_content/commit/e4b9e4900024235158d0ec1a48a100b4732348ef](https://github.com/spree-contrib/spree_static_content/commit/e4b9e4900024235158d0ec1a48a100b4732348ef)++Spree 4 uses Bootstrap 4 and many partials and HTML structure changed compared to Spree 3.x.++Also - **remember to add deface gem to gemspec** as deface itself was removed as a dependency of Spree. eg. [https://github.com/spree/spree\_auth\_devise/commit/d729689ca87d8586e541ffcc865ef1e0a5a79fe4](https://github.com/spree/spree_auth_devise/commit/d729689ca87d8586e541ffcc865ef1e0a5a79fe4)++## Migrate to Spree Dev Tools++Replace all development dependencies with:++```ruby+s.add_development_dependency 'spree_dev_tools'+```++Replace `spec_helper.rb` contents with:++[https://github.com/spree/spree/blob/777a284b4c70e69d32a05ffa61bbe3905d8f1297/cmd/lib/spree\_cmd/templates/extension/spec/spec\_helper.rb](https://github.com/spree/spree/blob/777a284b4c70e69d32a05ffa61bbe3905d8f1297/cmd/lib/spree_cmd/templates/extension/spec/spec_helper.rb)++Example migrations:++* [https://github.com/spree/spree\_gateway/pull/357](https://github.com/spree/spree_gateway/pull/357)+* [https://github.com/spree-contrib/spree-product-assembly/pull/200](https://github.com/spree-contrib/spree-product-assembly/pull/200)+* [https://github.com/spree/spree\_auth\_devise/pull/487](https://github.com/spree/spree_auth_devise/pull/487)+diff --git a/docs/developer/core-concepts/addresses.mdx b/docs/developer/core-concepts/addresses.mdxnew file mode 100644index 0000000000..7d5dfb578a--- /dev/null+++ b/docs/developer/core-concepts/addresses.mdx@@ -0,0 +1,72 @@+---+title: Addresses++---++The `Spree::Address` model is used to track address information, mainly for orders. Address information can also be tied to the `Spree.user_class` which by default is `Spree::User` ([More on Users](users)).++Addresses have the following attributes:++| Name | Description | Example Value |+|--------------------|---------------------------------------|---------------------|+| `firstname` | The first name for the person at this address. | John |+| `lastname` | The last name for the person at this address. | Doe |+| `address1` | The address's first line. | 123 Main St |+| `address2` | (Optional) The address's second line. | Apt 4 |+| `city` | The city where the address is. | Springfield |+| `zipcode` | The postal code. | 12345 |+| `phone` | The phone number. | (123) 456-7890 |+| `state_name` | The name for the state. | California |+| `alternative_phone`| (Optional) The alternative phone number. | (098) 765-4321 |+| `company` | (Optional) A company name. | Acme Corporation |+| `country_id` | The ID for the country. | 1 |+| `state_id` | (Optional) The ID for the state. | 2 |+| `user_id` | (Optional) The ID of the user this address is associated with. | 10 |+| `label` | (Optional) A label to identify the address. | Home |+++++<Note>+An address must always link to a `Spree::Country` object. It can optionally link to a `Spree::State` object, but only in the cases where the related country has no states listed. In that case, the state information is still required, and is kept within the `state_name` field on the address record. An easy way to get the state information for the address is to call `state_text` on that object.+</Note>++## Customers++`Spree::User` can have multiple addresses and can manage them on the Checkout and Account page (or via API). Each `Spree::Address` object has a `user_id` column which links to the User.++Additionally in the `Spree::User` there is `ship_address_id` and `bill_address_id` columns which indicates which addresses are the default ones for this User.++## Checkout++When a signed in User completes the Checkout Spree clones the selected Shipping and Billing Addresses and associates them with the Order. We do so that even if User modifies those addresses in the future their current state is preserved. Cloned addresses aren't associated to the User anymore. Originals will still be visible in their Address Books for future use.++## Zones++When an order's address is linked to a country or a state, that can ultimately affect different features of the order, including shipping availability and taxation. The way these effects work is through zones.++A zone is comprised of many different "zone members", which can either be a set of countries or a set of states.++Every order has a "tax zone", which indicates if a user should or shouldn't be taxed when placing an order. For more information, please see the [Taxation](taxation) guide.++In addition to tax zones, orders also have shipping methods. These are provided to the user based on their address information, and once selected lock in how an order is going to be shipped to that user. For more information, please see the [Shipments](shipments) guide.++## Countries++Countries within Spree are used as a container for states. Countries can be zone members, and also link to an address. The difference between one country and another on an address record can determine which tax rates and shipping methods are used for the order.++Country data is provided by [Carmen gem](https://github.com/carmen-ruby/carmen) which is a library for manipulating country data.++`Spree::Country` model includes these attributes:++| Name | Description | Example Value |+|--------------------|---------------------------------------|---------------------|+| `iso_name` | The ISO 3166-1 alpha-2 code for the country. | US |+| `iso` | The ISO 3166-1 alpha-3 code for the country. | USA |+| `iso_numeric` | The ISO 3166-1 numeric code for the country. | 840 |+| `name` | The name of the country. | United States |++## States++States, or regions, provinces, or districts are used to scope address data slightly more than country. States are useful for tax purposes, as different states in a country may impose different tax rates on different products. In addition to this, different states may cause different tax rates and shipping methods to be used for an order, similar to how countries affect it also.+diff --git a/docs/developer/core-concepts/adjustments.mdx b/docs/developer/core-concepts/adjustments.mdxnew file mode 100644index 0000000000..a77664c358--- /dev/null+++ b/docs/developer/core-concepts/adjustments.mdx@@ -0,0 +1,145 @@+---+title: Adjustments+---++## Overview++An `Adjustment` object tracks an adjustment to the price of an [Order](orders), an order's [Line Item](orders#line-items), or an order's [Shipments](shipments) within a Spree Commerce storefront.++Adjustments can be either positive or negative. Adjustments with a positive value are sometimes referred to as "charges" while adjustments with a negative value are sometimes referred to as "credits." These are just terms of convenience since there is only one `Spree::Adjustment` model in a storefront which handles this by allowing either positive or negative values.++Adjustments can either be considered included or additional. An "included" adjustment is an adjustment to the price of an item which is included in that price of an item. A good example of this is a GST/VAT tax. An "additional" adjustment is an adjustment to the price of the item on top of the original item price. A good example of that would be how sales tax is handled in countries like the United States.++Adjustments have the following attributes:++* `amount` The dollar amount of the adjustment.+* `label`: The label for the adjustment to indicate what the adjustment is for.+* `eligible`: Indicates if the adjustment is eligible for the thing it's adjusting.+* `mandatory`: Indicates if this adjustment is mandatory; i.e that this adjustment _must_ be applied regardless of its eligibility rules.+* `state`: Can either be `open` or `closed`. Once an adjustment is closed, it will not be automatically updated.+* `included`: Whether or not this adjustment affects the final price of the item it is applied to. Used only for tax adjustments which may themselves be included in the price.++Along with these attributes, an adjustment links to three polymorphic objects:++* A source+* An adjustable++The _source_ is the source of the adjustment. Typically a `Spree::TaxRate` object or a `Spree::PromotionAction` object.++The _adjustable_ is the object being adjusted, which is either an order, line item or shipment.++Adjustments can come from one of two locations within Spree's core:++* Tax Rates+* Promotions++An adjustment's `label` attribute can be used as a good indicator of where the adjustment is coming from.++## Adjustment Scopes++There are some helper methods to return the different types of adjustments:++```ruby+scope :shipping, -> { where(adjustable_type: 'Spree::Shipment') }+scope :is_included, -> { where(included: true) }+scope :additional, -> { where(included: false) }+```++* `open`: All open adjustments.+* `tax`: All adjustments which have a source that is a `Spree::TaxRate` object+* `price`: All adjustments which adjust a `Spree::LineItem` object.+* `shipping`: All adjustments which adjust a `Spree::Shipment` object.+* `promotion`: All adjustments where the source is a `Spree::PromotionAction` object.+* `optional`: All adjustments which are not `mandatory`.+* `return_authorization`: All adjustments where the source is a `Spree::ReturnAuthorization`.+* `eligible`: Adjustments which have been determined to be `eligible` for their adjustable. Useful for determining which adjustments are applying to the adjustable.+* `charge`: Adjustments which _increase_ the price of their adjustable.+* `credit`: Adjustments which _decrease_ the price of their adjustable.+* `included`: Adjustments which are included in the object's price. Typically tax adjustments.+* `additional`: Adjustments which modify the object's price. The default for all adjustments.++These scopes can be called on either the `Spree::Adjustment` class itself, or on an `adjustments` association. For example, calling any one of these three is valid:++```ruby+Spree::Adjustment.eligible+order.adjustments.eligible+line_item.adjustments.eligible+shipment.adjustments.eligible+```++## Adjustment Associations++As of Spree 2.2, you are able to retrieve the specific adjustments of an Order, a Line Item or a Shipment.++An order itself, much like line items and shipments, can have its own individual modifications. For instance, an order with over $100 of line items may have 10% off. To retrieve these adjustments on the order, call the `adjustments` association:++```ruby+order.adjustments+```++If you want to retrieve all the adjustments for all the line items, shipments and the order itself, call the `all_adjustments` method:++```ruby+order.all_adjustments+```++If you want to grab just the line item adjustments, call `line_item_adjustments`:++```ruby+order.line_item_adjustments+```++Similarly, if you want to grab the adjustments applied to shipments, call `shipment_adjustments`:++```ruby+order.shipment_adjustments+```++## Extending Adjustments++### Creating a New Adjuster++To create a new adjuster for Spree, create a new ruby object that inherits from `Spree::Adjustable::Adjuster::Base` and implements an `update` method:++```ruby+module Spree+ module Adjustable+ module Adjuster+ class MyAdjuster < Spree::Adjustable::Adjuster::Base+ def update+ ...+ #your ruby magic+ ...+ update_totals(some_total, my_other_total)+ end++ private++ # Note to persist your totals you need to update @totals+ # This is shown in a separate method for readability+ def update_totals(some_total, my_other_total)+ # if you want to keep track of your total,+ # you will need the column defined+ @totals[:total_you_want_to_track] += some_total+ @totals[:taxable_adjustment_total] += some_total+ @totals[:non_taxable_adjustment_total] += my_other_total+ end+ end+ end+ end+end+```++Next you need to add the class to spree `Rails.application.config.spree.adjusters` so it is included whenever adjustments are updated \(Promotion and Tax are included by default\):++```ruby+# NOTE: it is advisable that that Tax be implemented last so Tax is calculated correctly+app.config.spree.adjusters = [+ Spree::Adjustable::Adjuster::MyAdjuster,+ Spree::Adjustable::Adjuster::Promotion,+ Spree::Adjustable::Adjuster::Tax+ ]+```++That's it! Your custom adjuster is ready to go.+diff --git a/docs/developer/core-concepts/architecture.mdx b/docs/developer/core-concepts/architecture.mdxnew file mode 100644index 0000000000..3dc9d9c34c--- /dev/null+++ b/docs/developer/core-concepts/architecture.mdx@@ -0,0 +1,59 @@+---+title: Architecture+description: Learn about the Spree architecture+---++Spree is built on top of [Ruby on Rails framework](https://rubyonrails.org) and handful of other libraries. Spree itself is a modular platform consisting of several modules (Ruby gems).++As many Rails applications Spree requires a rational database to run. Spree supports both MySQL and PostgreSQL. You can also use SQLite.++### Core gems++<Info>+These gems are the core of Spree and they are the most important part of the Spree platform. They are the building blocks that make Spree possible.+</Info>++<AccordionGroup>+ <Accordion title="Core">+ The core module is the heart of Spree, containing the essential components and functionalities that power Spree stores. This includes the models, services, and the backend logic necessary to manage products, orders, payments, shipping, and more.+ </Accordion>+ <Accordion title="API">+ The API module provides a [RESTful](https://en.wikipedia.org/wiki/Representational_state_transfer) programmable interface to Spree, allowing developers to interact with the Spree store programmatically. This is useful for integrating Spree with other systems, building mobile applications, or customizing the frontend of a Spree store.++ API gem also includes Webhooks which are a way to let Spree know when something happens in the store. For example, when an order is placed, the API gem can send a webhook to a 3rd party service to let them know about the order.+ </Accordion>+</AccordionGroup>++### UI gems++<AccordionGroup>+ <Accordion title="Admin Panel">+ The Admin Panel module provides a comprehensive backend interface for managing a Spree store. It includes functionalities for product management, order processing, customer service, configuration settings, and more. This module is designed to give store administrators full control over the operations and settings of the store.+ </Accordion>+ <Accordion title="Storefront">+ The Storefront module is the customer-facing part of a Spree store. It includes the presentation layer for displaying products, handling customer carts, and processing checkout operations. This module is built with a focus on user experience, ensuring that customers have a smooth and enjoyable shopping experience.+ </Accordion>+</AccordionGroup>++### Optional gems++<AccordionGroup>+ <Accordion title="Emails">+ The Emails module handles all aspects of email generation and delivery in Spree. This includes order confirmation emails, shipping notifications, promotional emails, and any other email communications between a Spree store and its customers.++ You can opt-out of the default email functionality and use a 3rd party email service eg. Klaviyo or [Mailchimp](https://github.com/spree-contrib/spree_mailchimp_ecommerce).+ </Accordion>+ <Accordion title="Gateway">+ The Gateway module in Spree is responsible for handling payment processing. It integrates with various payment gateways and providers, allowing Spree stores to accept payments from customers through different methods and channels. This module ensures secure and efficient transaction processing, supporting a wide range of payment options to cater to diverse customer preferences.+ </Accordion>+ <Accordion title="Auth Devise">+ The Auth Devise module leverages the Devise gem for authentication in Spree. It provides a robust and flexible authentication solution for Spree stores, including features such as user registration, login, password recovery, and more. This module is essential for managing user access and ensuring secure user authentication processes within a Spree store.+ </Accordion>+</AccordionGroup>++### 3rd party Extensions++Extensions are Spree plugins that add new features or functionality to a Spree store. They are developed and maintained by the Spree community.++You can find a list of Spree extensions on the [Extensions list page](/extensions/extensions-list)+diff --git a/docs/developer/core-concepts/calculators.mdx b/docs/developer/core-concepts/calculators.mdxnew file mode 100644index 0000000000..5b24b529b1--- /dev/null+++ b/docs/developer/core-concepts/calculators.mdx@@ -0,0 +1,246 @@+---+title: Calculators+---++## Overview++Spree makes extensive use of the `Spree::Calculator` model and there are several subclasses provided to deal with various types of calculations \(flat rate, percentage discount, sales tax, VAT, etc.\) All calculators extend the `Spree::Calculator` class and must provide the following methods:++```ruby+def self.description+ # Human readable description of the calculator+end++def compute(object=nil)+ # Returns the value after performing the required calculation+end+```++Calculators link to a `calculable` object, which are typically one of `Spree::ShippingMethod`, `Spree::TaxRate`, or `Spree::Promotion::Actions::CreateAdjustment`. These three classes use the `Spree::Core::CalculatedAdjustment` module described below to provide an easy way to calculate adjustments for their objects.++## Available Calculators++The following are descriptions of the currently available calculators in Spree. If you would like to add your own, please see the [Creating a New Calculator](calculators#creating-a-new-calculator) section.++### Default Tax++For information about this calculator, please read the [Taxation](taxation) guide.++### Flat Percent Per Item Total++This calculator has one preference: `flat_percent` and can be set like this:++```ruby+calculator.preferred_flat_percent = 10+```++This calculator takes an order and calculates an amount using this calculation:++```ruby+[item total] x [flat percentage]+```++For example, if an order had an item total of $31 and the calculator was configured to have a flat percent amount of 10, the discount would be$3.10, because $31 x 10% =$3.10.++### Flat Rate++This calculator can be used to provide a flat rate discount.++This calculator has two preferences: `amount` and `currency`. These can be set like this:++```ruby+calculator.preferred_amount = 10+calculator.currency = "USD"+```++The currency for this calculator is used to check to see if a shipping method is available for an order. If an order's currency does not match the shipping method's currency, then that shipping method will not be displayed on the frontend.++This calculator can take any object and will return simply the preferred amount.++### Flexi Rate++This calculator is typically used for promotional discounts when you want a specific discount for the first product, and then subsequent discounts for other products, up to a certain amount.++This calculator takes three preferences:++* `first_item`: The discounted price of the first item\(s\).+* `additional_item`: The discounted price of subsequent items.+* `max_items`: The maximum number of items this discount applies to.++The calculator computes based on this:++```text+[first item discount] + (([items_count*] - 1) x [additional item discount])+```++* up to the `max_items`++Thus, if you have ten items in your shopping cart, your `first_item` preference is set to $10, your `additional_items` preference is set to $5, and your `max_items` preference is set to 4, the total discount would be$25:++* $10 for the first item+* $5 for each of the 3 subsequent items:$5 \* 3 = $15+* $0 for the remaining 6 items++### Per Item++The Per Item calculator computes a value for every item within an order. This is useful for providing a discount for a specific product, without it affecting others.++This calculator takes two preferences:++* `amount`: The amount per item to calculate.+* `currency`: The currency for this calculator.++This calculator depends on its `calculable` responding to a `promotion` method, which should return a `Spree::Promotion` \(or similar\) object. This object should then return a list of rules, which should respond to a `products` method. This is used to return a result of matching products.++The list of matching products is compared against the line items for the order being calculated. If any of the matching products are included in the order, they are eligible for this calculator. The calculation is this:++\[matching product quantity\] x \[amount\]++Every matching product within an order will add to the calculator's total. For example, assuming the calculator has an `amount` of 5 and there's an order with the following line items:++* Product A: $15.00 x 2 \(within matching products\)+* Product B: $10.00 x 1 \(within matching products\)+* Product C: $20.00 x 4 \(excluded from matching products\)++The calculation would be:++```text+= (2 x 5) + (1 x 5)+= 10 + 5+```++meaning the calculator will compute an amount of 15.++### Percent Per Item++The Percent Per Item calculator works in a near-identical fashion to the [Per Item Calculator](calculators#per-item), with the exception that rather than providing a flat-rate per item, it is a percentage.++Assuming a calculator amount of 10% and an order such as this:++* Product A: $15.00 x 2 \(within matching products\)+* Product B: $10.00 x 1 \(within matching products\)+* Product C: $20.00 x 4 \(excluded from matching products\)++The calculation would be:++```text+= ($15 x 2 x 10%) + ($10 x 10%)+= ($30 x 10%) + ($10 x 10%)+= $3 + $1+```++The calculator will calculate a discount of $4.++### Price Sack++The Price Sack calculator is useful for when you want to provide a discount for an order which is over a certain price. The calculator has four preferences:++* `minimal_amount`: The minimum amount for the line items total to trigger the calculator.+* `discount_amount`: The amount to discount from the order if the line items total is equal to or greater than the `minimal_amount`.+* `normal_amount`: The amount to discount from the order if the line items total is less than the `minimal_amount`.+* `currency`: The currency for this calculator. Defaults to the currency you have set for your application with `Spree::Config[:currency]`++Suppose you have a Price Sack calculator with a `minimal_amount` preference of $50, a `normal_amount` preference of $2, and a `discount_amount` of$5. An order with a line items total of $60 would result in a discount of$5 for the whole order. An order of $20 would result in a discount of$2.++## Creating a New Calculator++To create a new calculator for Spree, you need to do two things. The first is to inherit from the `Spree::Calculator` class and define `description` and `compute` methods on that class:++```ruby+class CustomCalculator < Spree::Calculator+ def self.description+ # Human readable description of the calculator+ end++ def compute(object=nil)+ # Returns the value after performing the required calculation+ end+end+```++If you are creating a new calculator for shipping methods, please be aware that you need to inherit from `Spree::ShippingCalculator` instead, and define a `compute_package` method:++```ruby+class CustomCalculator < Spree::ShippingCalculator+ def self.description+ # Human readable description of the calculator+ end++ def compute_package(package)+ # Returns the value after performing the required calculation+ end+end+```++The second thing is to register this calculator as a tax, shipping, or promotion adjustment calculator by calling code like this at the end of `config/initializers/spree.rb` inside your application \(`config` variable defined for brevity\):++```ruby+config = Rails.application.config+config.spree.calculators.tax_rates << CustomCalculator+config.spree.calculators.shipping_methods << CustomCalculator+config.spree.calculators.promotion_actions_create_adjustments << CustomCalculator+```++For example if your calculator is placed in `app/models/spree/calculator/shipping/my_own_calculator.rb` you should call:++```ruby+config = Rails.application.config+config.spree.calculators.shipping_methods << Spree::Calculator::Shipping::MyOwnCalculator+```++### Determining Availability++By default, all shipping method calculators are available at all times. If you wish to make this dependent on something from the order, you can re-define the `available?` method inside your calculator:++```ruby+class CustomCalculator < Spree::Calculator+ def available?(object)+ object.currency == "USD"+ end+end+```++## Calculated Adjustments++If you wish to use Spree's calculator functionality for your own application, you can include the `Spree::Core::CalculatedAdjustments` module into a model of your choosing.++```ruby+class Plan < ActiveRecord::Base+ include Spree::Core::CalculatedAdjustments+end+```++To have calculators available for this class, you will need to register them:++```ruby+config.spree.calculators.plans << CustomCalculator+```++Then you can access these calculators by calling this method:++```ruby+Plan.calculators+```++Using this method, you can then display the calculators as you please. Each object for this new class will need to have a calculator associated so that adjustments can be calculated on them.++This module provides a `has_one` association to a `calculator` object, as well as some convenience helpers for creating and updating adjustments for objects. Assuming that an object has a calculator associated with it first, creating an adjustment is simple:++```ruby+plan.create_adjustment("#{plan.name}", <target object>, <calculable object>)+```++To update this adjustment:++```ruby+plan.update_adjustment(<adjustment object>, <calculable object>)+```++To work out what the calculator would compute an amount to be:++```ruby+plan.compute_amount(<calculable object>)+```++`create_adjustment`, `update_adjustment` and `compute_amount` will call `compute` on the `Calculator` object. This `calculable` amount is whatever object your `CustomCalculator` class supports.+diff --git a/docs/developer/core-concepts/inventory.mdx b/docs/developer/core-concepts/inventory.mdxnew file mode 100644index 0000000000..a321d86142--- /dev/null+++ b/docs/developer/core-concepts/inventory.mdx@@ -0,0 +1,138 @@+---+title: Inventory+---++## Overview++In Spree each Variant has a `StockItem`. This is the place where the inventory for that variant is stored. Variant can have multiple `StockItems` if they are available in multiple `StockLocations`.++Back-ordered, sold, or shipped products are stored as individual `InventoryUnit` objects so they can have relevant information attached to them.++New products created in the system can be given a starting "on hand" inventory level. You can subsequently set new inventory levels and the correct things will happen, e.g. adding new on-hand inventory to an out-of-stock product that has some backorders will first fill the backorders then update the product with the remaining inventory count.++## Inventory Management++### Stock Locations++Stock Locations are the locations where your inventory is shipped from. Each `StockLocation` has many `stock_items` and `stock_movements`.++Stock Locations can be created in the admin panel \(Configuration → Stock Locations\) or via Platform API.++Stock Locations have several attributes that define their properties and behavior within the Spree system. Below is a table outlining these attributes:++| Attribute | Description | Example Value |+|-------------------|-----------------------------------------------------------------------------|---------------------|+| `name` | The public name of the stock location. This is used on Storefront and Storefront API | Warehouse 1 |+| `admin_name` | The name used internally for the stock location. This is not shown on the Storefront. | WH1 Domestic |+| `address1` | The primary address line for the stock location. | 5th avenue |+| `address2` | The secondary address line for the stock location. | Suite 100 |+| `city` | The city where the stock location is based. | New York |+| `state_id` | The ID of the state where the stock location is based. This references the `State` model. | 1 |+| `country_id` | The ID of the country where the stock location is based. This references the `Country` model. | 1 |+| `zipcode` | The postal code for the stock location. | 10001 |+| `phone` | The contact phone number for the stock location. | 555-1234 |+| `active` | A boolean indicating whether the stock location is active. Inactive stock locations will not be used in stock calculations or be available for selection during checkout. | `true` |+| `default` | A boolean indicating whether the stock location is the default one used for new inventory operations. | `false` |+| `backorderable_default` | A boolean indicating whether new stock items in this location are backorderable by default. | `false` |+| `propagate_all_variants` | A boolean indicating whether new stock items should be automatically created for all Store variants when a new stock location is added. | `false` |++Stock Locations can be easily used for tracking warehouses and other physical locations. They can be used to track separate sections of a warehouse (e.g. aisles, shelves, etc.) or to track different warehouses.++You can easily use them with your Point of Sale (POS) system to track inventory at different locations.++### Stock Items++Stock Items represent the inventory at a stock location for a specific variant. Stock item count on hand can be increased or decreased by creating stock movements.++| Attribute | Description | Example Value |+|-------------------|-----------------------------------------------------------------------------|---------------------|+| `stock_location_id` | References the stock location where the stock item belongs. | `1` |+| `variant_id` | References the variant associated with the stock item. | `32` |+| `count_on_hand` | The number of items available on hand. | `150` |+| `backorderable` | Indicates whether the stock item can be backordered. | `true` |++### Stock Transfers++Stock transfers allow you to move inventory in bulk from one stock location to another stock location. This is handy when you want to integrate with a POS system or other inventory management system. Or you can just rely on Spree being the source of truth for your inventory.++<Info>+Stock Transfers can be created in the Admin dashboard or via the Platform API.+</Info>++Here's the list of attributes for the Stock Transfer model:++| Attribute | Description | Example Value |+|--------------------------|-----------------------------------------------------------------------------|---------------------|+| `number` | The unique number identifier for the stock transfer, generated automatically. | `T123456789` |+| `reference` | An optional reference field for the stock transfer. | Transfer for Event |+| `source_location_id` | The ID of the stock location where the stock is transferred from. | `2` |+| `destination_location_id`| The ID of the stock location where the stock is transferred to. | `3` |++Stock transfers are crucial for managing inventory across multiple locations, ensuring that stock levels are accurate and up-to-date.++Each Stock Transfer will hold a list of Stock Movements.++### Stock Movements++Stock Movements track the movement of the inventory:++* when you move inventory between stock locations (via Stock Transfer)+* when you add inventory to a stock location+* when you remove inventory from a stock location+* when customers purchase products+* when customers return products++Here's the list of attributes for the Stock Movement model:++| Attribute | Description | Example Value |+|-------------------|-----------------------------------------------------------------------------|---------------------|+| `stock_item_id` | References the stock item that the movement belongs to. | `45` |+| `quantity` | The quantity by which the stock item's count on hand is changed. Positive values indicate stock being added, while negative values indicate stock being removed. | `-10` |+| `originator_type` | The type of the originator of the stock movement. This is a polymorphic association. | `Spree::Shipment` |+| `originator_id` | The ID of the originator of the stock movement. This is used in conjunction with `originator_type`. | `2` |++Stock Movements are crucial for maintaining accurate inventory levels and for historical tracking of inventory adjustments.++## Inventory Units++As we mentioned above, back-ordered, sold, or shipped products are stored as individual `InventoryUnit` objects so they can have relevant information attached to them.++We create `InventoryUnit` objects when:++* a product is sold (they are added to the Shipment)+* a product is returned++Here's a list of attributes for the Inventory Unit model:++| Attribute | Description | Example Value |+|-------------------|-----------------------------------------------------------------------------|---------------------|+| `variant_id` | References the variant associated with the inventory unit. | `32` |+| `order_id` | References the order associated with the inventory unit. | `123` |+| `shipment_id` | References the shipment associated with the inventory unit. | `77` |+| `state` | The state of the inventory unit | `on_hand` |++Inventory Units states are:++* `on_hand` - the inventory unit is on hand+* `backordered` - the inventory unit is backordered+* `shipped` - the inventory unit is shipped++<Note>+As we noted before, when you add new Stock Items to a Variant (eg. via Admin Panel or Platform API), the first Inventory Units to fulfill are the backordered ones.+</Note>++## Disabling inventory tracking++What if you don't need to track inventory? You can disable it for the entire application in `config/initializers/spree.rb` file which was generated during installation. Add the following line:++```ruby+Spree::Config[:track_inventory_levels] = false+```++You can also disable tracking inventory on a Variant level, by simply updating Variant `track_inventory` column to `false`, eg.++```ruby+variant.update(track_inventory: false)+```++This can also be done via the Admin Panel or Platform API.diff --git a/docs/developer/core-concepts/orders.mdx b/docs/developer/core-concepts/orders.mdxnew file mode 100644index 0000000000..0da428fb41--- /dev/null+++ b/docs/developer/core-concepts/orders.mdx@@ -0,0 +1,173 @@+---+title: Orders+---++## Overview++The `Order` model is one of the key models in Spree. It provides a central place around which to collect information about a customer order - including line items, adjustments, payments, addresses, return authorizations, and shipments.++### Order Attributes++| Attribute | Description |+|-------------------------|--------------------------------------------------------------------------------------------------|+| `number` | The unique identifier for this order. It begins with the letter R and ends in a 9-digit number. This number is shown to the users, and can be used to find the order by calling `Spree::Order.find_by(number: number)`. |+| `item_total` | The sum of all the line items for this order. |+| `adjustment_total` | The sum of all adjustments on this order. |+| `total` | The result of the sum of the `item_total` and the `adjustment_total`. |+| `payment_total` | The total value of all finalized payments. |+| `shipment_total` | The total value of all shipments' costs. |+| `additional_tax_total` | The sum of all shipments' and line items' `additional_tax`. |+| `included_tax_total` | The sum of all shipments' and line items' `included_tax`. |+| `promo_total` | The sum of all shipments', line items' and promotions' `promo_total`. |+| `state` | The current state of the order. To read more about the states an order goes through, read [The Order State Machine](orders#the-order-state-machine) section of this guide. |+| `email` | The email address for the user who placed this order. Stored in case this order is for a guest user. |+| `user_id` | The ID for the corresponding user record for this order. Stored only if the order is placed by a signed-in user. |+| `completed_at` | The timestamp of when the order was completed. |+| `bill_address_id` | The ID for the related `Address` object with billing address information. |+| `ship_address_id` | The ID for the related `Address` object with shipping address information. |+| `shipping_method_id` | The ID for the related `ShippingMethod` object. |+| `created_by_id` | The ID of object that created this order. |+| `shipment_state` | The current shipment state of the order. It takes into account all shipments. Described below in [Order Shipment states section](orders#order-shipment-states). |+| `payment_state` | The current payment state of the order. It takes into account all payments. Described below in [Order Payment states section](orders#order-payment-states). |+| `special_instructions` | Any special instructions for the store to do with this order. Will only appear if `Spree::Config[:shipping_instructions]` is set to `true`. |+| `currency` | The currency for this order, eg. `USD` |+| `last_ip_address` | The last IP address used to update this order in the frontend. |+| `channel` | The channel specified when importing orders from other stores. e.g. amazon. |+| `item_count` | The total value of line items' quantity. |+| `approver_id` | The ID of user that approved this order. |+| `confirmation_delivered`| Boolean value indicating that confirmation email was delivered. |+| `token` | The token stored corresponding to token stored in cookies. |+| `canceler_id` | The ID of user that canceled this order. |+| `store_id` | The ID of `Store` in which this order was created. |++## Order methods++Here is a list of methods you may find useful:++| Method | Description |+|-----------------------------|-----------------------------------------------------------------------------------------------|+| `outstanding_balance` | The outstanding balance for the order, calculated by taking the `total` and subtracting `payment_total`. |+| `display_item_total` | A "pretty" version of `item_total`. If `item_total` was `10.0`, `display_item_total` would be `$10.00`. |+| `display_adjustment_total` | Same as above, except for `adjustment_total`. |+| `display_total` | Same as above, except for `total`. |+| `display_outstanding_balance` | Same as above, except for `outstanding_balance`. |++To see all available methods, please check the [Order model source code](https://github.com/spree/spree/blob/main/core/app/models/spree/order.rb).++## The Order State Machine++Each Order flows through a state machine, beginning at a `cart` state and ending up at a `complete` state.++<Note>+This is the default order flow and can be adjusted or overhauled completely.++More on this topic at [Customizing Checkout page](../customization/checkout).+</Note>++The default states are as follows:++<Steps>+ <Step title="cart">+ Initial state, you can treat it as a draft order+ </Step>+ <Step title="address">+ Buyer started the checkout process and is on the address step+ </Step>+ <Step title="delivery">+ Buyer has added Shipping and Billing addresses, now he or she needs to select a delivery option+ </Step>+ <Step title="payment">+ Buyer selected delivery option, now he or she needs to add a payment option++ <Note>+ Only available if `Order#payment_required?` returns `true`. For most orders it will be `true`, but if the order is paid entirely with [Store Credit](store-credit) it will be `false`.+ </Note>+ </Step>+ <Step title="confirm">+ Buyer added payment option, now he or she needs to confirm the order++ <Note>+ Only available if `Order#confirmation_required?` returns `true`+ </Note>+ </Step>+ <Step title="complete">+ Order was placed. It will set the `completed_at` date to the current time.+ </Step>+</Steps>++Assuming that an order meets the criteria for the next state, you will be able to transition it to the next state by calling `next` on that object, eg.++```ruby+order = Spree::Order.find_by(number: 'R123456')+order.next+```++If this returns `false`, then the order does _not_ meet the criteria. To work out why it cannot transition, check the result of an `errors` method call.++### Order Shipment states++Alongside the global Order state there's also `shipment_state` column which indicates the state of all shipments. Order can have multiple shipments.++| State | Description |+|-----------|-------------|+| `shipped` | all Shipments are in the `shipped` state |+| `partial` | at least one Shipment has a state of `shipped` and there is another Shipment with a state other than `shipped` or there are [InventoryUnits](inventory) associated with the order that have a state of `sold` but are not associated with a Shipment |+| `ready` | all Shipments are in the `ready` state |+| `backorder` | there is backordered inventory associated with an order |+| `pending` | all Shipments are in the `pending` state |++For more on this please go to [Shipment States page](shipments).++### Order Payment states++Alongside the global Order state there's also `payment_state` column which indicates the state of all payments. Order can have multiple payments.++| State | Description |+|--------------|-----------------------------------------------------|+| `paid` | `payment_total` is equal to `total` |+| `balance_due`| `payment_total` is less than `total` |+| `credit_owed`| `payment_total` is greater than `total` |+| `failed` | most recent payment is in the `failed` state |+| `void` | order is canceled and `payment_total` is equal to `zero` |++For more on this please go to [Payment States page](payments).++## Line Items++Line items are used to keep track of items within the context of an order. These records provide a link between orders, and [Variants](products#variants).++<Warning>+When a variant is added to an order, the price of that item is tracked along with the line item to preserve that data. If the variant's price were to change, then the line item would still have a record of the price at the time of ordering.+</Warning>++## Addresses++An order can link to two `Address` objects. The shipping address indicates where the order's product\(s\) should be shipped to. This address is used to determine which shipping methods are available for an order.++The billing address indicates where the user who's paying for the order is located. This can alter the tax rate for the order, which in turn can change how much the final order total can be.++For more information about addresses, please read the [Addresses](/developer/core-concepts/addresses) guide.++## Adjustments++Adjustments are used to affect an order's final cost, either by decreasing it \([Promotions](promotions)\) or by increasing it \([Shipping](shipments), [Taxes](taxation)\).++For more information about adjustments, please see the [Adjustments](adjustments) guide.++## Payments++Payment records are used to track payment information about an order. Each Order can hold multiple payments, eg. one for each credit card or debit card and one for the store credit.++For more information, please read the [Payments](payments) guide.++## Return Authorizations++An order can have many `ReturnAuthorization` objects. These records keeps track of which items have been authorized for return and how the user will be compensated -- either via exchanging the item\(s\) or a reimbursement.++## Updating an Order++If you change any aspect of an `Order` object within code and you wish to update the order's totals -- including associated adjustments and shipments -- call the `update_with_updater!` method on that object, which calls out to the [OrderUpdater](https://github.com/spree/spree/blob/main/core/app/models/spree/order_updater.rb) class.++For example, if you create or modify an existing payment for the order which would change the order's `payment_state` to a different value, calling `update_with_updater!` will cause the `payment_state` to be recalculated for that order.++Another example is if a `LineItem` within the order had its price changed. Calling `update_with_updater!` will cause the totals for the order to be updated, the adjustments for the order to be recalculated, and then a final total to be established.diff --git a/docs/developer/core-concepts/payments.mdx b/docs/developer/core-concepts/payments.mdxnew file mode 100644index 0000000000..4da0baef38--- /dev/null+++ b/docs/developer/core-concepts/payments.mdx@@ -0,0 +1,247 @@+---+title: Payments+---++## Overview++Spree has a highly flexible payments model which allows multiple payment methods to be available during the checkout. The logic for processing payments is decoupled from orders, making it easy to define custom payment methods with their own processing logic.++Payment methods typically represent a payment gateway. Gateways will process card payments, online bank transfers, buy-now-pay-later, wallet payments, and other types of payments. Spree also comes with a Check option for offline processing.++The `Payment` model in Spree tracks payments against [Orders](orders). Payments relate to a `source` which indicates how the payment was made, and a `PaymentMethod`, indicating the processor used for this payment.++When a payment is created, it is given a unique, 8-character identifier. This is used when sending the payment details to the payment processor. Without this identifier, some payment gateways mistakenly reported duplicate payments.++## Payment States++A payment can go through many different states:++<Steps>+ <Step title="checkout">+ Checkout has not been completed+ </Step>+ <Step title="processing">+ The payment is being processed (temporary – intended to prevent double submission)+ </Step>+ <Step title="pending">+ The payment has been processed but is not yet complete (ex. authorized but not captured)+ </Step>+ <Step title="failed">+ The payment was rejected (ex. credit card was declined)+ </Step>+ <Step title="void">+ The payment should not be counted against the order+ </Step>+ <Step title="completed">+ The payment is completed. Only payments in this state count against the order total+ </Step>+</Steps>++## Payment Attributes++Here's the list of attributes for the `Spree::Payment` model:++| Attribute | Description | Example Value |+|-------------------|-----------------------------------------------------------------------------|---------------------|+| `number` | A unique identifier for the payment. | `P123456789` |+| `source_type` | The type of source used for the payment. | `Spree::CreditCard` |+| `source_id` | The ID of the source used for the payment. | `1` |+| `amount` | The amount of the payment. | `99.99` |+| `payment_method_id`| The ID of the payment method used. | `2` |+| `state` | The current state of the payment (e.g., processing, completed, failed). | `completed` |+| `response_code` | The response code returned by the payment processor. | `AUTH_123456` |+| `avs_response` | The address verification system response code. | `D` |++## Payment Methods++Payment methods represent the different options a customer has for making a payment. Most sites will accept credit card payments through a payment gateway, but there are other options. Spree also comes with built-in support for a Check payment, which can be used to represent any offline payment.++There are also third-party extensions that provide support for some other interesting options such as [Spree Braintree Vzero](https://github.com/spree-contrib/spree_braintree_vzero) for Braintree & PayPal payment methods.++A `PaymentMethod` can have the following attributes:++| Attribute | Description | Example |+|--------------|-----------------------------------------------------------------------------------------------|------------------------|+| `type` | The subclass of `Spree::PaymentMethod` this payment method represents. Uses rails single table inheritance feature. | `Spree::PaymentMethod::Check` |+| `name` | The visible name for this payment method | `Check` |+| `description`| The description for this payment method | `Pay by check.` |+| `active` | Whether or not this payment method is active. Set it `false` to hide it in frontend. | `true` |+| `display_on` | Determines where the payment method can be visible. Values can be `front` (Storefr) for Storefront, `back` for Admin Panel only or `both` for both. | `both` |+| `position` | The position of the payment method in lists. Lower numbers appear first. | `1` |++<Info>+You can decide which Payment Method will appear on which Store. This allows you to create different experiences for your customers in different countries.+</Info>++## Payment Processing++Payment processing in Spree supports many different gateways, but also attempts to comply with the API provided by the [active\_merchant](https://github.com/shopify/active_merchant) gem where possible.++### Gateway Options++For every gateway action, a list of gateway options are passed through.++| Gateway Option | Description |+|--------------------|-----------------------------------------------------------------------------------------------|+| `email` and `customer` | The email address related to the order |+| `ip` | The last IP address for the order |+| `order_id` | The Order's `number` attribute, plus the `identifier` for each payment, generated when the payment is first created |+| `shipping` | The total shipping cost for the order, in cents |+| `tax` | The total tax cost for the order, in cents |+| `subtotal` | The item total for the order, in cents |+| `currency` | The 3-character currency code for the order |+| `discount` | The promotional discount applied to the order |+| `billing_address` | A hash containing billing address information |+| `shipping_address` | A hash containing shipping address information |++The billing address and shipping address data is as follows:++| Attribute | Description |+|-------------|-----------------------------------------------------------------------------------------------|+| `name` | The combined `first_name` and `last_name` from the address |+| `address1` | The first line of the address information |+| `address2` | The second line of address information |+| `city` | The city of the address |+| `state` | An abbreviated version of the state name or, failing that, the state name itself, from the related `State` object. If that fails, the `state_name` attribute from the address. |+| `country` | The ISO name for the country. For example, United States of America is "US", Australia is "AU". |+| `phone` | The phone number associated with the address |++### Credit card data++Spree stores only necessary non-sensitive credit card information as a `Spree::CreditClass` record with the following attributes:++| Attribute | Description | Example Value |+|---------------------|-----------------------------------------------------------------------------------------------|------------------------|+| `month` | The month the credit card expires. Stored as an integer (1-12). | `6` |+| `year` | The year the credit card expires. Stored as a four-digit integer (e.g., 2024). | `2024` |+| `cc_type` | The type of credit card (e.g., Visa, MasterCard). | `Visa` |+| `last_digits` | The last four digits of the credit card number. | `1234` |+| `name` | The name of the credit card holder as it appears on the card. | John Doe |+| `gateway_customer_profile_id` | The customer profile identifier from the payment gateway. Useful for recurring transactions.| `cust_123456789` |+| `gateway_payment_profile_id` | The payment profile identifier from the payment gateway. | `paym_987654321` |++<Note>+We don't store the full credit card number, only the last 4 digits and the card type. This is a security precauation to protect the cardholder's privacy. For any post-purchase operations we authenticate the card using the `gateway_customer_profile_id` and `gateway_payment_profile_id`.+</Note>++### Processing Walkthrough++When an order is completed in spree, each `Payment` object associated with the order has the `process!` method called on it \(unless `payment_required?` for the order returns `false`\), in order to attempt to automatically fulfill the payment required for the order. If the payment method requires a source (eg. `Spree::CreditCard`), and the payment has a source associated with it, then Spree will attempt to process the payment. Otherwise, the payment will need to be processed manually.++If the `PaymentMethod` object is configured to auto-capture payments, then the `Payment#purchase!` method will be called, which will call `PaymentMethod#purchase` like this:++```ruby+payment_method.purchase(<amount>, <source>, <gateway options>)+```++If the payment is _not_ configured to auto-capture payments, the `Payment#authorize!` method will be called, with the same arguments as the `purchase` method above:++```ruby+payment_method.authorize(<amount>, <source>, <gateway options>)+```++How the payment is actually put through depends on the `PaymentMethod` sub-class' implementation of the `purchase` and `authorize` methods.++The returned object from both the `purchase` and `authorize` methods on the payment method objects must be an [ActiveMerchant::Billing::Response](https://github.com/activemerchant/active_merchant/blob/master/lib/active_merchant/billing/response.rb) object. This response object is then stored \(in YAML\) in the `spree_log_entries` table. Log entries can be retrieved with a call to the `log_entries` association on any `Payment` object, eg.++```ruby+payment.log_entries+```++If the `purchase!` route is taken and is successful, the payment is marked as `completed`. If it fails, it is marked as `failed`. If the `authorize` method is successful, the payment is transitioned to the `pending` state so that it can be manually captured later by calling the `capture!` method. If it is unsuccessful, it is also transitioned to the `failed` state.++ Once a payment has been saved, it also updates the order. This may trigger the \`payment\_state\` to change, which would reflect the current payment state of the order. The possible states are: \* \`balance\_due\`: Indicates that payment is required for this order \* \`failed\`: Indicates that the last payment for the order failed \* \`credit\_owed\`: This order has been paid for in excess of its total \* \`paid\`: This order has been paid for in full.++ You may want to keep tabs on the number of orders with a \`payment\_state\` of \`failed\`. A sudden increase in the number of such orders could indicate a problem with your credit card gateway and most likely indicates a serious problem affecting customer satisfaction. You should check the latest \`log\_entries\` for the most recent payments in the store if this is happening.++### Log Entries++Responses from payment gateways within Spree are typically [ActiveMerchant::Billing::Response](https://github.com/activemerchant/active_merchant/blob/master/lib/active_merchant/billing/response.rb) objects. When Spree handles a response from a payment gateway, it will serialize the object as YAML and store it in the database as a log entry for a payment. These responses can be useful for debugging why a payment has failed.++You can get a list of these log entries by calling the `log_entries` on any `Spree::Payment` object. To get the `Active::Merchant::Billing::Response` out of these `Spree::LogEntry` objects, call the `details` method, eg.++```ruby+payment.log_entries.first.details+```++## Supported Gateways++Access to a number of payment gateways is handled with the usage of the [Spree Gateway](https://github.com/spree/spree_gateway) extension. This extension currently supports the following gateways:++* Authorize.net+* Apple Pay \(via Stripe\)+* BanWire+* Bambora \(previously Beanstream\)+* Braintree+* CyberSource+* ePay+* eWay+* maxipago+* MasterCard Payment Gateway Service \(formerly MiGS\)+* Moneris+* PayJunction+* Payflow+* Paymill+* Pin Payments+* QuickPay+* sage Pay+* SecurePay+* Spreedly+* Stripe \(with Stripe Elements\)+* USAePay+* Worldpay \(previously Cardsave\)++With the `spree_gateway` gem included in your application's `Gemfile`, these gateways will be selectable in the admin backend for payment methods.++<Info>+ These are just some of the gateways which are supported by the Active Merchant gem. You can see a [list of all the Active Merchant gateways on that project's GitHub page](https://github.com/activemerchant/active\_merchant\#supported-payment-gateways).+</Info>++## Adding your custom Payment Method++In order to make your own custom Payment Method show up on the backend list of available payment methods, you need to add it to the spree config list of payment methods first.++Firstly create a new model inheriting from `Spree::PaymentMethod` in your `app/models` directory:++```ruby+class FancyPaymentMethod < Spree::PaymentMethod+end+```++Next, add your custom gateway to the list of available payment methods in `config/initializers/spree.rb`:++```ruby+Rails.application.config.after_initialize do+ Rails.application.config.spree.payment_methods << FancyPaymentMethod+end+```++<Info>+[Spree Braintree Vzero](https://github.com/spree-contrib/spree_braintree_vzero) is a good example of a standalone custom gateway.+</Info>++## Payment Method visibility++We've mentioned before that a `PaymentMethod` can have a `display_on` attribute. This attribute can have the following values: `front`, `back`, or `both`. For more granular control which Payment Methods should be available in which Store, you can override the `available_for_store?` method in your `PaymentMethod` subclass.++```ruby+class FancyPaymentMethod < Spree::PaymentMethod+ def available_for_store?(store)+ store.supported_currencies.include?('EUR')+ end+end+```++Above code will make the payment method available only for stores that support the EUR currency.++If you want more control you can specify `available_for_order?` method to control Payment Method visibility for specific Order, eg.++```ruby+class FancyPaymentMethod < Spree::PaymentMethod+ def available_for_order?(order)+ order.total > 100 && order.currency == 'USD'+ end+end+```++This code will make the payment method available only for orders with a total greater than 100 and currency USD.\ No newline at end of filediff --git a/docs/developer/core-concepts/products.mdx b/docs/developer/core-concepts/products.mdxnew file mode 100644index 0000000000..b3d6ca4b56--- /dev/null+++ b/docs/developer/core-concepts/products.mdx@@ -0,0 +1,281 @@+---+title: Products+---++## Overview++`Product` records track unique products within your store. These differ from [Variants](products#variants), which track the unique variations of a product. For instance, a product that's a T-shirt would have variants denoting its different colors and sizes. Together, Products and Variants describe what is for sale.++<Info>+Note that as of version 4.6, certain product fields are translatable (read more about this in [Internationalization](../customization/i18n#resource-translations)).+</Info>++Products have the following attributes:++| Attribute | Description | Translatable |+|-------------------|-------------------------------------------------------------------------------------------------------|--------------|+| `name` | Short name for the product | Yes |+| `description` | The most elegant, poetic turn of phrase for describing your product's benefits and features | Yes |+| `slug` | SEO slug based on the product name that is placed into the URL for the product. We use a library called [friendly_id](https://github.com/norman/friendly_id) to generate them | Yes |+| `status` | The status of the product. Can be `draft`, `active`, `archived`. Defaults to `draft`. | No |+| `available_on` | The first date the product becomes available for sale online in your shop | No |+| `discontinue_on` | Date when the product will become unavailable for sale online in your shop | No |+| `deleted_at` | The date the product is marked as deleted. We don't remove products entirely, only soft deleting them using a library called | No |+| `meta_title` | Optional title used for search engines instead of `name` | Yes |+| `meta_description`| A description targeted at search engines for search engine optimization (SEO) | Yes |+| `meta_keywords` | Several words and short phrases separated by commas, also targeted at search engines | Yes |++To understand how variants come to be, you must first understand option types and option values.++## Option Types and Option Values++Option types denote the different options for a variant.++A typical option type would be a `size`, with that option type's values being something such as `Small`, `Medium` and `Large`.++Another typical option type could be a `color`, such as `Red`, `Green`, or `Blue`.++A product can be assigned many option types, but must be assigned at least one if you wish to create variants for that product++<Info>+The `name` and `presentation` fields for option types are translatable as of version 4.6.+</Info>++## Variants++`Variant` records track the individual variants of a `Product`. Variants are of two types: master variants and normal variants.++Variant records can track some individual properties regarding a variant, such as height, width, depth, and cost price. These properties are unique to each variant, and so are different from [Product Properties](products#product-properties), which apply to all variants of that product.++| Attribute | Description | Example Value |+|--------------------|-----------------------------------------------------------------------------------------------|------------------------|+| `sku` | Unique identifier for each variant | `123TSHRT-M-G` |+| `barcode` | Barcode code | `` |+| `barcode` | A unique code that represents a variant, often used for scanning purposes. | `123456789` |+| `weight` | The weight of the variant | 2 |+| `height` | The height of the variant | 150 |+| `width` | The width of the variant | 150 |+| `depth` | The depth of the variant | 100 |+| `is_master` | Indicates if the variant is a master variant | `false` |+| `track_inventory` | Indicates if the inventory is tracked for this variant | `true` |+| `cost_price` | The cost price of the variant | 5.00 |+| `cost_currency` | The currency of the cost price | `USD` |+| `discontinue_on` | Date when the variant will become unavailable for sale | 2023-12-31 18:00 |++### Master Variants++Every single product has a master variant, which tracks basic information such as a count on hand, a price and a <Tooltip tip="Stock Keeping Unit - In inventory management, a stock keeping unit (abbreviated as SKU) is the unit of measure in which the stocks of a material are managed.">SKU</Tooltip>.++Whenever a product is created, a master variant for that product will be created too.++<Info>+Logic behind is implemented in the `after_initialize` callback of the `Spree::Product` model in a [ensure_master](https://github.com/spree/spree/blob/d3927a3f646f0b4e72b137bf72606c885ec59829/core/app/models/spree/product.rb#L132) method.+</Info>++Master variants are automatically created along with a product and exist for the sole purpose of having a consistent API when associating variants and [line items](orders#line-items). If there were no master variant, then line items would need to track a polymorphic association which would either be a product or a variant.++### Regular Variants++Variants which are not the master variant are unique based on a [option type and option value](products#option-types-and-option-values) combinations.++For instance, you may be selling a product which is a Baseball Jersey, which comes in the sizes "Small", "Medium" and "Large", as well as in the colors of "Red", "Green". For this combination of sizes and colors, you would be able to create 9 unique variants:++| SKU | Size | Color |+|-----------|-------|-------|+| SKU-S-R | Small | Red |+| SKU-S-G | Small | Green |+| SKU-M-R | Medium| Red |+| SKU-M-G | Medium| Green |+| SKU-L-R | Large | Red |+| SKU-L-G | Large | Green |++### Default Variant++This all can sound complex and confusing, so we'll simplify things for you.++To get the default Variant for a product, you can call:++```ruby+product.default_variant+```++How this works?++* If a product has multiple Variants it will return the first non-master Variant based on their sort position set in the Admin Panel or Platform API.+* If there are no non-master Variants it will return the Master Variant++So you can easily rely on this method to get the default Variant for a product.++## Images++Images can be associated to the Product (via master variant) or to the individual Variants.++Product images can be fetched via:++```ruby+product.images+```++To get all images for product and all it's variants, call `variant_images` on the product:++```ruby+product.variant_images+```++To fetch individual variant images, call `images` on the variant:++```ruby+product.default_variant.images+```++Image order is determined by the `position` attribute, which is an integer. By default, images are ordered from left to right.++<Info>+Under the hood we use [Rails Active Storage](https://guides.rubyonrails.org/active_storage_overview.html) to handle image storage and manipulation.++More information about images can be found in the [Images Customization](../customization/images) section.+</Info>++## Product Properties++Product properties track individual attributes for a product that don't apply to all products. These are typically additional information about the item. For instance, a T-Shirt may have properties representing information about the kind of material used, as well as the type of fit the shirt is.++A `Property` should not be confused with an [`OptionType`](products#option-types-and-option-values), which is used when defining [Variants](products#variants) for a product.++You can retrieve the value for a property on a `Product` object by calling the `property` method on it and passing through that property's name:++```ruby+product.property("material")+=> "100% Cotton"+```++You can set a property on a product by calling the `set_property` method:++```ruby+product.set_property("material", "100% cotton")+```++If this property doesn't already exist, a new `Property` instance with this name will be created on the fly.++<Info>+As of version 4.6, product property `value` fields are translatable.+</Info>++## Prices++`Price` objects track a price for a particular currency and variant combination. For instance, a [Variant](products#variants) may be available for $15 (`15 USD`) and €7 (`7 Euro`).++`Price` object contains 3 important attributes:++| Attribute | Description | Example Value |+|-------------------|-----------------------------------------------------------------------------------------------|-----------------------|+| `amount` | The current selling price of the variant in the specified currency. | `99.90` |+| `compare_at_amount` | The recommended retail price of the variant in the specified currency. This can be used to display crossed out prices in the storefront. | `129.90` |+| `currency` | The ISO code for the currency in which the `amount` and `compare_at_amount` are denominated. | `USD` |++<Warning>+If a product doesn't have a price in the selected currency it won't show up in the Storefront and Storefront API by default.+</Warning>++To fetch a list of currencies that given product is available in, call `prices` to get a list of related `Price` objects:++```ruby+product.prices+=> [#<Spree::Price id: 2 ...]+```++To find a list of currencies that Variant is available in, call `prices` to get a list of related `Price` objects:++```ruby+product.default_variant.prices+=> [#<Spree::Price id: 2 ...]+```++To find Product price in a selected currency via [ISO symbol](https://www.iban.com/currency-codes):++```ruby+product.price_in('EUR')+=> #<Spree::Price id: 232, variant_id: 232, amount: 0.8499e2, currency: "EUR", deleted_at: nil, created_at: "2021-08-16 19:41:55.888522000 +0000", updated_at: "2021-08-16 19:41:55.888522000 +0000", compare_at_amount: nil, preferences: nil>+```++<Note>+If there's no price set for requested currency this will return a new Price object with the currency set to the requested currency. It will not be a persisted object.+</Note>++To find Variant's price in a selected currency:++```ruby+product.default_variant.price_in('EUR')+=> #<Spree::Price id: 232, variant_id: 232, amount: 0.8499e2, currency: "EUR", deleted_at: nil, created_at: "2021-08-16 19:41:55.888522000 +0000", updated_at: "2021-08-16 19:41:55.888522000 +0000", compare_at_amount: nil, preferences: nil>+```++There are also other helpful methods available such as:++<AccordionGroup>+ <Accordion title="Getting amount (number)">++ ```ruby+ product.default_variant.amount_in('EUR')+ => 0.8499e2+ ```++ </Accordion>+ <Accordion title="Getting amount (string)">++ ```ruby+ product.default_variant.amount_in('EUR').to_s+ => "84.99"+ ```++ </Accordion>+ <Accordion title="Displaying price with currency symbol">++ ```ruby+ product.price_in('EUR').display_amount.to_s+ => "€84.99"+ ```++ </Accordion>+</AccordionGroup>++<Info>+Spree behind the scenes uses [Ruby Money gem](https://github.com/RubyMoney/money) with some [additional](https://github.com/spree/spree/blob/master/core/app/models/concerns/spree/display\_money.rb) [tweaks](https://github.com/spree/spree/blob/master/core/lib/spree/money.rb).+</Info>++## Prototypes++A prototype is a useful way to share common `OptionType` and `Property` combinations amongst many different products. They work as a product template to speed up the creation of new products.++For instance, if you're creating a lot of clothing products, you may wish to maintain the "Size" and "Color" option types, as well as a "Fitting Type" property.++## Taxons and Taxonomies++Taxonomies provide a simple, yet robust way of categorizing products by enabling store administrators to define as many separate structures as needed.++When working with Taxonomies there are two key terms to understand:++* `Taxonomy` – a hierarchical list which is made up of individual Taxons. Each taxonomy relates to one `Taxon`, which is its root node.+* `Taxon` – a single child node which exists at a given point within a `Taxonomy`. Each `Taxon` can contain many (or no) sub / child taxons. Store administrators can define as many Taxonomies as required, and link a product to multiple Taxons from each Taxonomy.++By default, both Taxons and Taxonomies are ordered by their `position` attribute.++<Note>+Taxons use the [Nested set model](http://en.wikipedia.org/wiki/Nested\_set\_model) for their hierarchy. The `lft` and `rgt` columns in the `spree_taxons` table represent the locations within the hierarchy of the item. This logic is handled by the [awesome nested set](https://github.com/collectiveidea/awesome\_nested\_set) gem.+</Note>++Taxons link to products through an intermediary model called `Classification`. This model exists so that when a product is deleted, all of the links from that product to its taxons are deleted automatically. A similar action takes place when a taxon is deleted; all of the links to products are deleted automatically.++<Note>+Storefront uses `spree.nested_taxons_path` helper method to generate full taxon URLs, which will use the taxon's permalink, eg.++```ruby+taxon = Spree::Taxon.find_by(permalink: 'clothes/dresses')+spree.nested_taxons_path(taxon)+```++which will output `/t/categories/clothes/dresses`.+</Note>++<Info>+As of version 4.6, the taxon `name` and `description` fields are translatable.+</Info>diff --git a/docs/developer/core-concepts/promotions.mdx b/docs/developer/core-concepts/promotions.mdxnew file mode 100644index 0000000000..3944a1f675--- /dev/null+++ b/docs/developer/core-concepts/promotions.mdx@@ -0,0 +1,97 @@+---+title: Promotions+---++## Overview++Promotions within Spree are used to provide discounts to orders, offer free shipping or to add potential additional items at no extra cost (eg. samples).++Promotions are one of the most complex areas within Spree, as there are a large number of moving parts to consider. Although this guide will explain Promotions from a developer's perspective, if you are new to this area you can learn a lot from the Admin > Promotions tab where you can set up new Promotions, edit rules & actions, etc.++Promotions can be activated in three different ways:++* When a user adds a product to their cart (automatic promotions, eg. free shipping with a threshold)+* When a user enters a coupon code during the checkout process+* When a user visits a page within the Spree store (path-based promotions, eg. a promotion that offers a discount on a specific page)++Promotions for these individual ways are activated through their corresponding [PromotionHandler class](https://github.com/spree/spree/tree/main/core/app/models/spree/promotion_handler), once they've been checked for eligibility.++Promotions relate to two other main components: `actions` and `rules`. When a promotion is activated, the actions for the promotion are performed, passing in the payload from the `fire_event` call that triggered the activator becoming active. Rules are used to determine if a promotion meets certain criteria in order to be applicable.++Here is a table showcasing the attributes of the `Spree::Promotion` model along with a description for each attribute and example values:++| Attribute | Description | Example Value |+|--------------------------|-------------------------------------------------------|------------------------|+| `name` | The name of the promotion | Summer Sale |+| `description` | A brief description of the promotion | Discounts for summer |+| `expires_at` | The expiration date and time of the promotion | 2025-09-01 23:59:59 |+| `starts_at` | The start date and time of the promotion | 2025-06-01 00:00:00 |+| `code` | A code that users can enter to apply the promotion | `SUMMER2023` |+| `usage_limit` | The total number of times the promotion can be used | 500 |+| `match_policy` | The policy for how promotion rules are matched | `all` |+| `path` | The specific path that activates the promotion | `/summer-sale` |+| `per_code_usage_limit` | The number of times a single code can be used | 1 |++<Info>+ Path-based promotions will only work when the `Spree::PromotionHandler::Page` class is used, as in `Spree::ContentController` from [spree_rails_frontend](https://github.com/spree/spree_rails_frontend) gem+</Info>++## Actions++There are four actions that come with Spree:++<AccordionGroup>+ <Accordion title="Creating an Adjustment">+ <p>When a <code>CreateAdjustment</code> action is undertaken, an adjustment is automatically applied to the order, unless the promotion has already applied an adjustment to the order.</p>+ <p>Once the adjustment has been applied to the order, its eligibility is re-checked every time the order is saved, by way of the <code>Promotion#eligible?</code> method, which uses <code>Promotion#eligible_rules</code> to determine if the promotion is still eligible based on its rules. For how this process works, please see the <a href="promotions#rules">rules section</a> below.</p>+ <p>An adjustment to order from a promotion depends on the calculators. For more information about calculators, please see the <a href="calculators">Calculators guide</a>.</p>+ </Accordion>+ <Accordion title="Creating an Item Adjustment">+ <p>When a <code>CreateItemAdjustments</code> action is undertaken, an adjustment is automatically applied to each item within the order unless the action has already been performed on that line item.</p>+ <p>The eligibility of the item for this promotion is re-checked whenever the item is updated. Its eligibility is based on the rules of the promotion.</p>+ <p>An adjustment to order from a promotion depends on the calculators. For more information about calculators, please see the <a href="calculators">Calculators guide</a>.</p>+ </Accordion>+ <Accordion title="Free Shipping">+ <p>When a <code>FreeShipping</code> action is undertaken, all shipments within the order have their prices negated. Just like with prior actions, the eligibility of this promotion is checked again whenever a shipment changes.</p>+ </Accordion>+ <Accordion title="Create Line Items">+ <p>When a <code>CreateLineItem</code> action is undertaken, a series of line items are automatically added to the order, which may alter the order's price. The promotion with an action to add a line item can also have another action to add an adjustment to the order to nullify the cost of adding the product to the order.</p>+ </Accordion>+</AccordionGroup>++## Rules++Here's a list of all the rules that come with Spree:++<AccordionGroup>+ <Accordion title="FirstOrder">+ The user's order is their first.+ </Accordion>+ <Accordion title="ItemTotal">+ The order's total is greater than (or equal to) a given value.+ </Accordion>+ <Accordion title="Product">+ An order contains a specific product.+ </Accordion>+ <Accordion title="User">+ The order is by a specific user. Only customers who have an account can use this rule.+ </Accordion>+ <Accordion title="UserLoggedIn">+ The user is logged in.+ </Accordion>+ <Accordion title="One Use Per User">+ Can be used only once per customer. Only customers who have an account can use this rule.+ </Accordion>+ <Accordion title="Taxon(s)">+ Order includes product(s) associated with Taxons that are selected for this rule.+ </Accordion>+ <Accordion title="Country">+ Checks if Order's ship address country matches the selected country, eg. US-only Orders+ </Accordion>+</AccordionGroup>++Rules are used by Spree to determine if a promotion is applicable to an order and can be matched in one of two ways: all of the rules must match, or one rule must match. This is determined by the `match_policy` attribute on the `Promotion` object. As you will see in the Admin, you can set the match\_policy to be "any" or "all" of the rules associated with the Promotion. When set to "any" the Promotion will be considered eligible if any one of the rules applies, when set to "all" it will be eligible only if all the rules apply.++## Extending Promotions++Please follow our [extending Promotions guide](/developer/extending-spree/promotions) to learn how to create custom promotion rules and actions.\ No newline at end of filediff --git a/docs/developer/core-concepts/shipments.mdx b/docs/developer/core-concepts/shipments.mdxnew file mode 100644index 0000000000..e0c15eef7a--- /dev/null+++ b/docs/developer/core-concepts/shipments.mdx@@ -0,0 +1,387 @@+---+title: Shipments+---++## Overview++This guide explains how Spree represents shipping options and how it calculates expected costs, and shows how you can configure the system with your own shipping methods. After reading it you should know:++* how shipments and shipping are implemented in Spree+* how to specify your shipping structure+* how split shipments work+* how to configure products for special shipping treatment+* how to capture shipping instructions++Spree uses a very flexible and effective system to calculate shipping, accommodating the full range of shipment pricing: from simple flat rate to complex product-type- and weight-dependent calculations.++The Shipment model is used to track how items are delivered to the buyer.++Shipments have the following attributes:++| Attribute | Description | Example Value |+|--------------------|-----------------------------------------------------------------------------------------------|------------------------------|+| `number` | The unique identifier for this shipment. It begins with the letter H and ends in an 11-digit number. This number is shown to the users, and can be used to find the order by calling `Spree::Shipment.find_by(number: number)`. | H12345678901 |+| `tracking` | The identifier given for the shipping provider \(i.e. FedEx, UPS, etc\). | 1Z999AA10123456784 |+| `shipped_at` | The time when the shipment was shipped. | 2021-07-21T14:36:00.000Z |+| `state` | The current state of the shipment. | `shipped` |+| `stock_location_id`| The ID of the Stock Location where the items for this shipment will be sourced from. | 3 |++A shipment can go through many different states, as illustrated below.++An explanation of the different states:++<Steps>+ <Step title="pending">+ The shipment has backordered inventory units and/or the order is not paid for.+ </Step>+ <Step title="ready">+ The shipment has _no_ backordered inventory units and the order is paid for.+ </Step>+ <Step title="shipped">+ The shipment is on its way to the buyer.+ </Step>+ <Step title="canceled">+ When an order is cancelled, all of its shipments will also be cancelled. When this happens, all items in the shipment will be restocked. If an order is "resumed", then the shipment will also be resumed.+ </Step>+</Steps>++Explaining each piece of the shipment world inside of Spree separately and how each piece fits together can be a cumbersome task. Fortunately, using a few simple examples makes it much easier to grasp. In that spirit, the examples are shown first in this guide.++## Examples++### Simple Setup++Consider you sell T-shirts to the US and Europe and ship from a single location, and you work with 2 deliverers:++* USPS Ground \(to US\)+* FedEx \(to EU\)++and their pricing is as follow:++* USPS charges $5 for one T-shirt and $2 for each additional one+* FedEx charges $10 each, regardless of the quantity++To achieve this setup you need the following configuration:++* Shipping Categories: All your products are the same, so you only need to define one default shipping category. Each of your products would then need to be assigned to this shipping category.+* 1 Stock Location: You are shipping all items from the same location, so you can use the default.+* 2 Shipping Methods \(Configuration->Shipping Methods\) as follows:++| Name | Zone | Calculator |+| ---: | ---: | ---: |+| USPS Ground | US | Flexi Rate\($5,$2\) |+| FedEx | EU\_VAT | FlatRate-per-item\($10\) |++### Advanced Setup++Consider you sell products to a single zone \(US\) and you ship from 2 locations \(Stock Locations\):++* New York+* Los Angeles++and you work with 3 deliverers \(Shipping Methods\):++* FedEx+* DHL+* US postal service++and your products can be classified into 3 Shipping Categories:++* Light+* Regular+* Heavy++and their pricing is as follow:++FedEx charges:++* $10 for all light items regardless of how many you have+* $2 per regular item+* $20 for the first heavy item and $15 for each additional one++DHL charges:++* $5 per item if it's light or regular+* $50 per item if it's heavy++USPS charges:++* $8 per item if it's light or regular+* $20 per item if it's heavy++To achieve this setup you need the following configuration:++* 4 Shipping Categories: Default, Light, Regular and Heavy+* 3 Shipping Methods \(Configuration->Shipping Methods\): FedEx, DHL, USPS+* 2 Stock Locations \(Configuration->Stock Locations\): New York, Los Angeles++| S. Category / S. Method | DHL | FedEx | USPS |+| ---: | ---: | ---: | ---: |+| Light | Per Item \($5\) | Flat Rate \($10\) | Per Item \($8\) |+| Regular | Per Item \($5\) | Per Item \($2\) | Per Item \($8\) |+| Heavy | Per Item \($50\) | Flexi Rate\($20,$15\) | Per Item \($20\) |++## Design & Functionality++To properly leverage Spree's shipping system's flexibility you must understand a few key concepts:++* Shipping Methods+* Zones+* Shipping Categories+* Calculators \(through Shipping Rates\)++### Shipping Methods++Shipping methods are the actual services used to send the product. For example:++* UPS Ground+* UPS One Day+* FedEx 2Day+* FedEx Overnight+* DHL International++Each shipping method is only applicable to a specific `Zone`. For example, you wouldn't be able to get a package delivered internationally using a domestic-only shipping method. You can't ship from Dallas, USA to Rio de Janeiro, Brazil using UPS Ground \(a US-only carrier\).++If you are using shipping categories, these can be used to qualify or disqualify a given shipping method.++ Shipping methods can now have multiple shipping categories assigned to them. This allows the shipping methods available to an order to be determined by the shipping categories of the items in a shipment.++### Zones++Zones serve as a mechanism for grouping geographic areas together into a single entity. You can read all about how to configure and use Zones in the [Zones Guide](/developer/core-concepts/addresses#zones).++The Shipping Address entered during checkout will define the zone the customer is in and limit the Shipping Methods available to him.++### Shipping Categories++Shipping Categories are useful if you sell products whose shipping pricing vary depending on the type of product \(TVs and Mugs, for instance\).++ For simple setups, where shipping for all products is priced the same \(ie. T-shirt-only shop\), all products would be assigned to the default shipping category for the store.++Some examples of Shipping Categories would be:++* Light \(for lightweight items like stickers\)+* Regular+* Heavy \(for items over a certain weight\)++Shipping Categories are created in the admin interface \(`Configuration` -> `Shipping Categories`\) and then assigned to products \(`Products` -> `Edit`\).++During checkout, the shipping categories of the products in your order will determine which calculator will be used to price its shipping for each Shipping Method.++### Calculators++A Calculator is the component responsible for calculating the shipping price for each available Shipping Method.++Spree ships with 5 default Calculators:++* Flat rate \(per order\)+* Flat rate \(per item/product\)+* Flat percent+* Flexible rate+* Price sack++Flexible rate is defined as a flat rate for the first product, plus a different flat rate for each additional product.++You can define your own calculator if you have more complex needs. In that case, check out the [Calculators Guide](calculators).++## UI++### What the Customer Sees++In the standard system, there is no mention of shipping until the checkout phase.++After entering a shipping address, the system displays the available shipping options and their costs for each shipment in the order. Only the shipping options whose zones include the _shipping_ address are presented.++The customer must choose a shipping method for each shipment before proceeding to the next stage. At the confirmation step, the shipping cost will be shown and included in the order's total.++ You can enable collection of extra \_shipping instructions\_ by setting the option \`Spree::Config.shipping\_instructions\` to \`true\`. This is set to \`false\` by default. See \[Shipping Instructions\]\(\#shipping-instructions\) below.++### What the Order's Administrator Sees++`Shipment` objects are created during checkout for an order. Initially each records just the shipping method and the order it applies to. The administrator can update the record with the actual shipping cost and a tracking code, and may also \(once only\) confirm the dispatch. This confirmation causes a shipping date to be set as the time of confirmation.++## Advanced Shipping Methods++Spree comes with a set of calculators that should fit most of the shipping situations that may arise. If the calculators that come with Spree are not enough for your needs, you might want to use an extension - if one exists to meet your needs - or create a custom one.++### Extensions++There are a few Spree extensions which provide additional shipping methods, including special support for fees imposed by common carriers, or support for bulk orders. See the [Spree Extension Registry](https://github.com/spree-contrib) for the latest information.++### Writing Your Own++For more detailed information, check out the section on [Calculators](calculators).++Your calculator should accept an array of `LineItem` objects and return a cost. It can look at any reachable data, but typically uses the address, the order and the information from variants which are contained in the line\_items.++## Product Configuration++Store administrators can assign products to specific ShippingCategories or include extra information in variants to enable the calculator to determine results.++Each product has a `ShippingCategory`, which adds product-specific information to the calculations beyond the standard information from the shipment. Standard information includes:++* Destination address+* Variants and quantities+* Weight and dimension information, if given, for a variant++`ShippingCategory` is basically a wrapper for a string. One use is to code up specific rates, eg. "Fixed $20" or "Fixed $40", from which a calculator could extract imposed prices \(and not go through its other calculations\).++### Variant Configuration++Variants can be specified with weight and dimension information. Some shipping method calculators will use this information if it is present.++## Filtering Shipping Methods On Criteria Other Than the Zone++Ordinarily, it is the zone of the shipping address that determines which shipping methods are displayed to a customer at checkout. Here is how the availability of a shipping method is determined:++```ruby+class Spree::Stock::Estimator+ def shipping_methods(package)+ shipping_methods = package.shipping_methods+ shipping_methods.delete_if { |ship_method| !ship_method.calculator.available?(package.contents) }+ shipping_methods.delete_if { |ship_method| !ship_method.include?(order.ship_address) }+ shipping_methods.delete_if { |ship_method| !(ship_method.calculator.preferences[:currency].nil? || ship_method.calculator.preferences[:currency] == currency) }+ shipping_methods+ end+end+```++Unless overridden, the calculator's `available?` method returns `true` by default. It is, therefore, the zone of the destination address that filters out the shipping methods in most cases. However, in some circumstances it may be necessary to filter out additional shipping methods.++Consider the case of the USPS First Class domestic shipping service, which is not offered if the weight of the package is greater than 13oz. Even though the USPS API does not return the option for First Class in this instance, First Class will appear as an option in the checkout view with an unfortunate value of 0, since it has been set as a Shipping Method.++To ensure that First Class shipping is not available for orders that weigh more than 13oz, the calculator's `available?` method must be overridden as follows:++```ruby+class Calculator::Usps::FirstClassMailParcels < Calculator::Usps::Base+ def self.description+ "USPS First-Class Mail Parcel"+ end++ def available?(order)+ multiplier = 1.3+ weight = order.line_items.inject(0) do |weight, line_item|+ weight + (line_item.variant.weight ? (line_item.quantity * line_item.variant.weight * multiplier) : 0)+ end+ #if weight in ounces > 13, then First Class Mail is not available for the order+ weight > 13 ? false : true+ end+end+```++## Split Shipments++### Introduction++Split shipments are a feature for more complex Spree applications that require sophisticated shipping and warehouse logic. This includes detailed inventory management and allows for shipping from multiple locations.++### Creating Proposed Shipments++This section steps through the basics of what is involved in determining shipments for an order. There are a lot of pieces that make up this process. They are explained in detail in the [Components of Split Shipments](shipments#components-of-split-shipments) section of this guide.++The process of determining shipments for an order is triggered by calling `create_proposed_shipments` on an `Order` object while transitioning to the `delivery` state during checkout. This process will first delete any existing shipments for an order and then determine the possible shipments available for that order.++`create_proposed_shipments` will initially call `Spree::Stock::Coordinator.new(@order).packages`. This will return an array of packages. In order to determine which items belong in which package when they are being built, Spree uses an object called a `Splitter`, described in more detail [below](shipments#the-packer).++After obtaining the array of available packages, they are converted to shipments on the order object. Shipping rates are determined and inventory units are created during this process as well.++At this point, the checkout process can continue to the delivery step.++## Components of Split Shipments++This section describes the four main components that power split shipments: [The Coordinator](shipments#the-coordinator), [The Packer](shipments#the-packer), [The Prioritizer](shipments#the-prioritizer), and [The Estimator](shipments#the-estimator).++### The Coordinator++The `Spree::Stock::Coordinator` is the starting point for determining shipments when calling `create_proposed_shipments` on an order. Its job is to go through each `StockLocation` available and determine what can be shipped from that location.++The `Spree::Stock::Coordinator` will ultimately return an array of packages which can then be easily converted into shipments for an order by calling `to_shipment` on them.++### The Packer++A `Spree::Stock::Packer` object is an important part of the `create_proposed_shipments` process. Its job is to determine possible packages for a given StockLocation and order. It uses rules defined in classes known as `Splitters` to determine what packages can be shipped from a `StockLocation`.++For example, we may have two splitters for a stock location. One splitter has a rule that any order weighing more than 50lbs should be shipped in a separate package from items weighing less. Our other splitter is a catch-all for any item weighing less than 50lbs. So, given one item in an order weighing 60lbs and two items weighing less, the Packer would use the rules defined in our splitters to come up with two separate packages: one containing the single 60lb item, the other containing our other two items.++#### Default Splitters++Spree comes with two default splitters which are run in sequence. This means that the first splitter takes the packages array from the order, and each subsequent splitter takes the output of the splitter that came before it.++Let's take a look at what the default splitters do:++<AccordionGroup>+ <Accordion title="Shipping Category Splitter">+ Splits an order into packages based on items' shipping categories. This means that each package will only have items that all belong to the same shipping category.+ </Accordion>+ <Accordion title="Weight Splitter">+ Splits an order into packages based on a weight threshold. This means that each package has a mass weight. If a new item is added to the order and it causes a package to go over the weight threshold, a new package will be created so that all packages weigh less than the threshold. You can set the weight threshold by changing <code>Spree::Stock::Splitter::Weight.threshold</code> (defaults to <code>150</code>) in an initializer.+ </Accordion>+</AccordionGroup>++#### Custom Splitters++Note that splitters can be customized, and creating your own can be done with relative ease. By inheriting from `Spree::Stock::Splitter::Base`, you can create your own splitter.++For an example of a simple splitter, take a look at Spree's [weight based splitter](https://github.com/spree/spree/blob/235e470b242225d7c75c7c4c4c033ee3d739bb36/core/app/models/spree/stock/splitter/weight.rb). This splitter pulls items with a weight greater than 150 into their own shipment.++After creating your splitter, you need to add it to the array of splitters Spree uses. To do this, add the following to your application's spree initializer `spree.rb` file:++```ruby+Rails.application.config.after_initialize do+ Rails.application.config.spree.stock_splitters << Spree::Stock::Splitter::CustomSplitter+end+```++You can also completely override the splitters used in Spree, rearrange them, etc. To do this, add the following to your `spree.rb` file:++```ruby+Rails.application.config.after_initialize do+ Rails.application.config.spree.stock_splitters = [+ Spree::Stock::Splitter::CustomSplitter,+ Spree::Stock::Splitter::ShippingCategory+ ]+end+```++Or if you don't want to split packages just set the option above to an empty array. e.g. a store with the following configuration in spree.rb won't have any package splitted.++```ruby+Rails.application.config.spree.stock_splitters = []+```++If you want to add different splitters for each `StockLocation`, you need to decorate the `Spree::Stock::Coordinator` class and override the `splitters` method.++### The Prioritizer++A `Spree::Stock::Prioritizer` object will decide which `StockLocation` should ship which package from an order. The prioritizer will attempt to come up with the best shipping situation available to the user.++By default, the prioritizer will first select packages where the items are on hand. Then it will try to find packages where items are backordered. During this process, the `Spree::Stock::Adjuster` is also used to ensure each package has the correct number of items.++The prioritizer is also a customization point. If you want to customize which packages should take priority for the order during this process, you can override the `sort_packages` method in `Spree::Stock::Prioritizer`.++#### Customizing the Adjuster++The `Adjuster` visits each package in an order and ensures the correct number of items are in each package. To customize this functionality, you need to do two things:++1. Subclass the [Spree::Stock::Adjuster](https://github.com/spree/spree/blob/master/core/app/models/spree/stock/adjuster.rb) class and override the the `adjust` method to get the desired functionality.+2. Decorate the `Spree::Stock::Coordinator` and override the `prioritize_packages` method, passing in your custom adjuster class to the `Prioritizer` initializer. For example, if our adjuster was called `Spree::Stock::CustomAdjuster`, we would do the following in `app/my_store/spree/stock/coordinator_decorator.rb`:++```ruby+module Spree+ module Stock+ module CoordinatorDecorator do+ def prioritize_packages(packages)+ prioritizer = Prioritizer.new(order, packages, ::Spree::Stock::CustomAdjuster)+ prioritizer.prioritized_packages+ end+ end++ Coordinator.prepend(CoordinatorDecorator)+ end+end+```++### The Estimator++The `Spree::Stock::Estimator` loops through the packages created by the packer in order to calculate and attach shipping rates to them. This information is then returned to the user so they can select shipments for their order and complete the checkout process.+diff --git a/docs/developer/core-concepts/stores.mdx b/docs/developer/core-concepts/stores.mdxnew file mode 100644index 0000000000..1d866f0fc9--- /dev/null+++ b/docs/developer/core-concepts/stores.mdx@@ -0,0 +1,127 @@+---+title: Stores+---++## Overview++The `Spree::Store` model is the center of the Spree ecosystem. Each Spree installation can have multiple Stores. Each Store operates on a different domain or subdomain, eg.++* Store A, `us.example.com`+* Store B, `eu.example.com`+* Store C, `another-brand.com`++<Frame type="glass" caption="Spree multi-store setup">++</Frame>++### Store attributes++| Attribute | Description | Example Value |+|--------------------------|-----------------------------------------------------------------------------|---------------|+| `name` | The name of the store, typically displayed in the browser title bar and throughout the site. | Spree Demo Site |+| `url` | The URL or domain associated with the store. | shop.example.com |+| `meta_description` | A brief description of the store for SEO purposes. | An exclusive selection of high-quality products. |+| `meta_keywords` | Relevant keywords associated with the store for SEO. | fashion, electronics, books |+| `seo_title` | A custom SEO title for the store. | Shop the Best Deals Online - Spree Store |+| `mail_from_address` | The email address used for sending emails from the store. | [email protected] |+| `default_currency` | The default currency for prices within the store. | `USD` |+| `code` | A unique code to identify the store. | `spree-001` |+| `default` | Indicates if the store is the default store. | `true` |+| `supported_currencies` | A list of currencies supported by the store, separated by commas. | `USD, EUR, GBP` |+| `supported_locales` | A list of locales supported by the store, separated by commas. | `en, fr, de` |+| `customer_support_email` | The email address for customer support inquiries. | [email protected] |+| `facebook` | The store's Facebook page URL. | spree |+| `twitter` | The store's Twitter handle. | @spreecommerce |+| `instagram` | The store's Instagram profile URL. | https://www.instagram.com/spree |+| `default_locale` | The default locale/language for the store. | `en` |+| `description` | A detailed description of the store. | Your one-stop shop for everything you need. |+| `address` | The physical address of the store. | 123 Example St, San Francisco, CA |+| `contact_phone` | The contact phone number for the store. | `+1 234-567-8900` |+| `new_order_notifications_email` | The email address to send notifications of new orders. | [email protected] |++## Current Store++Spree will try to determine the current store based on the current URL. If the URL does not match any of the stores in the database, Spree will fall back to the default store.++All Spree controllers or any other controllers that include [Spree::Core::ControllerHelpers::Store](https://github.com/spree/spree/blob/master/core/lib/spree/core/controller\_helpers/store.rb) have access to the `current_store` method which returns the `Store` matching the current URL.++All parts of Spree (API v1, API v2, Storefront, Admin Panel) have this implemented. This method is also available in views and JSON serializers.++<Info>+Under the hood `current_store` calls [Spree::Stores::FindCurrent.new(url: url).execute](https://github.com/spree/spree/blob/master/core/app/finders/spree/stores/find\_current.rb).++This logic can be easily overwritten by setting++```ruby+Spree::Dependencies..current_store_finder = 'MyStoreFinderClass'+```++in `config/initializers/spree.rb` file+</Info>++## Default Store++If the system cannot find any Store that matches the current URL it will fall back to the Default Store.++You can set the default Store in `Admin Panel -> Configurations -> Store` or via Rails console:++```ruby+Spree::Store.find(2).update(default: true)+```++To get the default store in your code or rails console type:++```ruby+Spree::Store.default+```++## Localization and Currency++Each Store can have multiple locales and currencies. This configuration is stored in Store model attributes:++| Attribute | Description | Example(s) |+|-----------------------|---------------------------------------------------------------------------------------------------------------|-----------------------------|+| `default_currency` | This is the default currency that will be pre-selected when visiting the store the first time. | `USD` |+| `supported_currencies`| If there is more than one supported currency, visitors will be able to choose which currency they browse in. | `USD`, `CAD`, `EUR` |+| `default_locale` | This is the default locale/language which will be pre-selected when visiting the store the first time. | `en` |+| `supported_locales` | If there is more than one supported locale, visitors can choose which locale they browse in. Locales are available upon installing [Spree I18n](https://github.com/spree-contrib/spree_i18n). | `en`, `fr`, `de` |++### Translations++As of version 4.6, the `Store` resource allows for translating many of its fields. Translations are enabled when selecting more than one locale in `supported_locales`. The following fields are translatable:++* `name`+* `meta_description`+* `meta_keywords`+* `seo_title`+* `facebook`+* `twitter`+* `instagram`+* `customer_support_email`+* `description`+* `address`+* `contact_phone`+* `new_order_notifications_email`++Read more about how resource translations work in [Internationalization](../customization/i18n#resource-translations).++## Checkout configuration++Each Store can be configured to ship to only selected countries. This is achieved via the `checkout_zone_id` attribute which holds the ID of the selected [Zone record](shipments#zones).++Available Shipping Methods on the Checkout are determined based on the [Zone and Shipping Methods configuration](shipments).++This will also have an effect on what [Shipping / Billing Addresses](/developer/core-concepts/addresses) user can add/ select during Checkout. Only Addresses from Countries or States available in the selected Zone can be used and will be visible in the User's Address Book.++## Store resources++Each Store can have its own resources. For example, a Store can have its own Products, Taxonomies, Promotions, etc.++| Resource | Relationship |+| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |+| [**Order**](orders) | One Order belongs to one Store |+| [**Product**](products) | One Product can be associated with many Store(s), you can pick and choose in which Store(s) each Product will be available |+| [**Payment Method**](payments) | One Payment Method can be associated with many Store(s), you can select in which Stores given Payment Method will be available on Checkout |+| [**Taxonomy**](products#taxons-and-taxonomies) | One Taxonomy belongs to one Store |+| [**Promotion**](promotions) | One Promotion can be associated with multiple Stores |+| **Store Credit** | One Store Credit belongs to and can be used in one Store |\ No newline at end of filediff --git a/docs/developer/core-concepts/taxes.mdx b/docs/developer/core-concepts/taxes.mdxnew file mode 100644index 0000000000..b91ad9fff2--- /dev/null+++ b/docs/developer/core-concepts/taxes.mdx@@ -0,0 +1,140 @@+---+title: Taxes+---++## Overview++Spree represents taxes for an order by using `tax_categories` and `tax_rates`.++Products within Spree can be linked to Tax Categories, which are then used to influence the taxation rate for the products when they are purchased. One Tax Category can be set to being the default for the entire system, which means that if a product doesn't have a related tax category, then this default tax category would be used.++Here's the list of Tax Category attributes:++| Attribute | Description | Example Value |+|-------------------|--------------------------------------------------------------|-------------------------------|+| `name` | The name of the tax category. | Clothing |+| `is_default` | Indicates if this is the default tax category. | `true` |+| `tax_code` | The tax code associated with the tax category. | `1257L` |++<Note>+ Tax code is a unique identifier for the tax category. It's used to identify the tax category in the backend. This value can originate from the tax provider (eg. Stripe, Avalara) or be generated by Spree.+</Note>++A `tax_category` can have many `tax_rates`, which indicate the rate at which the products belonging to a specific tax category will be taxed at.++`Spree::TaxRate` object includes these attributes:++| Attribute | Description | Example Value |+|----------------------|-----------------------------------------------------------------------------|---------------------|+| `amount` | The tax rate amount as a decimal. This will be presented as a percentage. | `0.08` |+| `zone_id` | The ID of the zone this tax rate applies to. | `1` |+| `tax_category_id` | The ID of the tax category this tax rate is associated with. | `2` |+| `included_in_price` | Indicates if the tax is included in the price (true) or added on top (false). | `false` |+| `name` | The name of the tax rate. | California Sales Tax |+| `show_rate_in_label` | Indicates if the tax rate (8%) should be shown in the label. | `true` |++A tax rate links to a particular Zone \(see [Addresses](/developer/core-concepts/addresses) for more information about zones\). When an order is placed in a specific zone, any of the products for that order which have a tax zone that matches the order's tax zone will be taxed.++The standard sales tax policies commonly found in the USA can be modeled as well as Value Added Tax \(VAT\) which is commonly used in Europe. These are not the only types of tax rules that you can model in Spree. Once you obtain a sufficient understanding of the basic concepts you should be able to model the tax rules of your country or jurisdiction.++<Note>+Taxation within the United States can get exceptionally complex, with different states, countries and even cities having different taxation rates. If you are shipping interstate within the United States, we would strongly advise you to use the [Spree Avatax](https://github.com/spree-contrib/spree_avatax_official) or [Spree TaxJar](https://github.com/spree-contrib/spree_taxjar) extension so that you get correct tax rates.+</Note>++## Basic Examples++Let's say you need to charge 5% tax for all items that ship to New York and 6% on only clothing items that ship to Pennsylvania. This will mean you need to construct two different zones: one zone containing just the state of New York and another zone consisting of the single state of Pennsylvania.++Here's another hypothetical scenario. You would like to charge 10% tax on all electronic items and 5% tax on everything else. This tax should apply to all countries in the European Union \(EU\). In this case you would construct just a single zone consisting of all the countries in the EU. The fact that you want to charge two different rates depending on the type of good does not mean you need two zones.++ Please see the [Addresses guide](/developer/core-concepts/addresses) for more information on constructing a zone.++## Default Tax Zone++Spree also has the concept of a default tax zone. When a user is adding items to their cart we do not yet know where the order will be shipped to, and so it's assumed that the cart is within the default tax zone until later. In some cases we may want to estimate the tax for the order by assuming the order falls within a particular tax zone.++Why might we want to do this? The primary use case for this is for countries where there is already tax included in the price. In the EU, for example, most products have a Value Added Tax \(VAT\) included in the price. There are cases where it may be desirable to show the portion of the product price that includes tax. In order to calculate this tax amount we need to know the zone \(and corresponding Tax Rate\) that was assumed in the price.++We may also reduce the order total by the tax amount if the order is being shipped outside the tax jurisdiction. Again, this requires us to know the zone assumed in making the original tax calculation so that the tax amount can be backed out.++## Shipping vs. Billing Address++Most tax jurisdictions base the tax on the shipping address of where the order is being shipped to. So in these cases the shipping address is used when determining the tax zone. Spree does, however, allow you to use the billing address to determine the zone.++To determine tax based on billing address instead of shipping address you will need to set the `Spree::Config[:tax_using_ship_address]` preference to `false`.++ `Spree::Zone.match` is a method used to determine the most applicable zone for taxation. In the case of multiple matches, the closer match will be used, with State zone matches having priority over Country zone matches.++## Calculators++In order to charge tax in Spree you also need a `Spree::Calculator`. In most cases you should be able to use Spree's [DefaultTax calculator](https://github.com/spree/spree/blob/main/core/app/models/spree/calculator/default_tax.rb). It is suitable for both sales tax and price-inclusive tax scenarios. For more information, please read the [Calculators guide](calculators).++<Note>+ The `DefaultTax` calculator uses the item total \(exclusive of shipping\) when computing sales tax.+</Note>++## Tax Types++There are two basic types of tax that a store owner might need to contend with. In the United States \(and some other countries\) store owners sometimes need to charge what is known as "sales tax." In the European Union \(EU\) and other countries stores owners need to deal with "tax inclusive" pricing which is often called Value Added Tax \(VAT\).++Most taxes can be considered one of these two types. For instance, in Australia customers pay a Goods and Services Tax \(GST\). This is basically equivalent to VAT in Europe.++In some cases you may need to charge one type of tax for orders falling within one zone and another type of tax for orders falling within a different zone. There are even some rare situations where you may need to charge both types of tax in the same zone. Spree supports all of these scenarios.++### Sales Tax++Sales tax is the default tax type for any tax rate in Spree.++Let's take an example of a sales tax situation for the United States. Imagine that we have a zone that covers all of North America and that the zone is used for a tax rate which applies a 5% tax on products with the tax category of "Clothing".++If the customer purchases a single clothing item for $17.99 and they live in the United States \(which is within the North America zone we defined\) they are eligible to pay sales tax.++The sales tax calculation is $17.99 x 5% for a total tax of $0.8995, which is rounded up to two decimal places, to $0.90. This tax amount is then applied to the order as an adjustment.++ See the \[Adjustments Guide\]\(/developer/core-concepts/adjustments.html\) if you need more information on adjustments.++If the quantity of the item is changed to 2, then the tax amount doubles: \($17.99 x 2\) x 0.05 is $1.799, which is again rounded up to two decimal places, applying a tax adjustment of $1.80.++Let's now assume that we have another product that's a coffee mug, which doesn't have the "Clothing" tax category applied to it. Let's also assume this product costs $13.99, and there's no default tax category set up for the system. Under these circumstances, the coffee mug will not be taxed when it's added to the order.++Finally, if the taxable address \(either the shipping or billing, depending on the `Spree::Config[:tax_using_ship_address]` setting\) is changed for the order to outside this taxable zone, then the tax adjustment on the order will be removed. If the address is changed back, the tax rate will be applied once more.++### Tax Included++Many jurisdictions have what is commonly referred to as a Value Added Tax \(VAT.\) In these cases the tax is typically applied to the price. This means that prices for items are "inclusive of tax" and no additional tax needs to be applied during checkout.++In the case of tax inclusive pricing the store owner can enter all prices inclusive of tax if their home country is the default zone. If there is no default zone set, any taxes that are included in the price will be added to the net prices on the fly depending on the current order's tax zone.++If the current order's tax zone is outside the default zone, prices will be shown and used with only the included taxes for that zone applied. If there is no VAT for that zone \(for example when the current order's shipping address is outside the EU\), the net price will be shown and used.++ Keep in mind that each order records the price a customer paid \(including the tax\) as part of the line item record. This means you don't have to worry about changing prices or tax rates affecting older orders.++When tax is included in the price there is no order adjustment needed \(unlike the sales tax case\). Stores are, however, typically interested in showing the amount of tax the user paid. These totals are for informational purposes only and do not affect the order total.++Let's start by looking at an example where there is a 5% included on all products and it's included in the price. We'll further assume that this tax should only apply to orders within the United Kingdom \(UK\).++In the case where the order address is within the UK and we purchase a single clothing item for £17.99 we see an order total of £17.99. The tax rate adjustment applied is £17.99 x 5%, which is £0.8995, and that is rounded up to two decimal places, becoming £0.90.++Now let's increase the quantity on the item from 1 to 2. The order total changes to £35.98 with a tax total of £1.799, which is again rounded up to now being £1.80.++Next we'll add a different clothing item costing £19.99 to our order. Since both items are clothing and taxed at the same rate, they can be reduced to a single total, which means there's a single adjustment still applied to the order, calculated like this: \(£17.99 + £19.99\) x 0.05 = £1.899, rounded up to two decimal places: £1.90.++Now let's assume an additional tax rate of 10% on a "Consumer Electronics" tax category. When we add a product with this tax category to our order with a price of £16.99, there will be a second adjustment added to the order, with a calculated total of £16.99 x 10%, which is £1.699. Rounded up, it's £1.70.++Finally, if the order's address is changed to being outside this tax zone, then there will be two negative adjustments applied to remove these tax rates from the order.++### Additional Examples++#### Differing VATs for different product categories depending on the customer's zone++As of January 1st, 2015, digital products sold within the EU must have the VAT of the receiving country applied. Physical products must have the seller's VAT applied. In order to set this up, please proceed as follows:++1. Create zones for all EU countries and a zone for all EU countries except your home zone.+2. Mark your home zone as the default zone so you can conveniently enter gross prices.+3. Create a tax category "Digital products", and a tax category "Physical products".+4. Add tax rates that are "included in tax" for the tax category "Physical goods" for all EU countries.+5. Add two tax rates for the tax category "Physical products": 1. One for your home country, with your home country's VAT 2. One for the rest of the EU, also with your home country's VAT++If you change the tax zone of the current order \(by changing the relevant address\), prices will now be shown and used including the correct VAT for the current order.++ All of the examples in this guide are meant to be used for illustrative purposes. They are not meant to be used as definitive interpretations of tax law. You should consult your accountant or attorney for guidance on how much tax to collect and under what circumstances.\ No newline at end of filediff --git a/docs/developer/core-concepts/users.mdx b/docs/developer/core-concepts/users.mdxnew file mode 100644index 0000000000..7be67b74c9--- /dev/null+++ b/docs/developer/core-concepts/users.mdx@@ -0,0 +1,91 @@+---+title: Users+---++In your Spree application you will usually have 2 types of users:++* Customers - who are the users who will be purchasing products+* Admins - who are the users who will be managing the Spree store++Customers can have:++* **[Addresses](/developer/core-concepts/addresses)**, both billing and shipping+* **[Orders](orders)** - a list of products that the user has purchased+* **Credit Cards** - used on the checkout page to pay for the order+* **Store Credits** - assigned by the store owners, to be used to purchase products+* **Wishlists** - a list of products that the user has marked as a wishlist++## User model++The default user class is `Spree::User` (which is provided by the [Auth Devise](https://github.com/spree/spree_auth_devise) extension).++You should however reference Users with an universal `Spree.user_class` to avoid any potential issues, eg.++```ruby+Spree.user_class.find_by(email: "[email protected]")+```++<Info>+You can use your own User class. More on this in the [Customize Authentication guide](/developer/customization/authentication).+</Info>++## User attributes++Here's the list of attributes for the default `Spree::User` model:++| Attribute | Description | Example Value |+|-------------------|-----------------------------------------------------------------------------|---------------------|+| `email` | The email address of the user. | `[email protected]` |+| `ship_address_id` | References the default shipping address associated with the user. | `2` |+| `bill_address_id` | References the default billing address associated with the user. | `3` |++There will be lots more attributes provided by [Devise](https://github.com/plataformatec/devise) gem, but these are the most important ones for the user.++## User roles++Each User can have different roles attached, eg. `admin` (which will grant them access to the Spree admin).++To attach a role to a user, you can use this code:++```ruby+user = Spree::User.find_by(email: "[email protected]")+role = Spree::Role.find_or_create_by(name: 'admin')++user.spree_roles << role+```++## User methods++`Spree::User` includes several [ActiveRecord concerns](https://api.rubyonrails.org/v7.1.3.2/classes/ActiveSupport/Concern.html), which provide additional methods for the user model.++Some handy methods are listed below:++```ruby Returns the last incomplete order for the given store.+user.last_incomplete_spree_order(store)+```++```ruby Returns the total amount available store credits for the user in the given store.+user.available_store_credits(store)+```++```ruby Returns the default Wishlist for the given Store.+user.default_wishlist_for_store(store)+```++```ruby Returns a list of all active payment sources, e.g., credit cards that can be used on the checkout.+user.payment_sources+```++## User Permissions++Spree under the hood uses library called [CanCanCan](https://github.com/CanCanCommunity/cancancan) to handle authorization.++More on permissions can be found in the [Customize Permissions guide](/developer/customization/permissions). We recommend you check this guide after reading all other Core Concepts.++## Current user++In all Spree controllers or any controller inheriting from `Spree::BaseController`, you can access the current user with `spree_current_user` method.++```ruby+spree_current_user+```diff --git a/docs/developer/customization/admin-panel.mdx b/docs/developer/customization/admin-panel.mdxnew file mode 100644index 0000000000..196cf83519--- /dev/null+++ b/docs/developer/customization/admin-panel.mdx@@ -0,0 +1,80 @@+# Admin Panel++Starting with Spree 4.7, we've introduced a new way of customizing the admin panel, that enables extensions to modify the admin panel UI without depending on the Deface gem. For Spree 4.6 and earlier, please see how to use [deface\_overrides\_tutorial.md](../advanced/deface\_overrides\_tutorial.md "mention") overrides.++### Customizing the main menu++When extending Spree with custom features, it's common to add new options to the menu on the left-hand side.++The menu is built with [`Spree::Admin::MainMenu::Section`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/main\_menu/section.rb) and [`Spree::Admin::MainMenu::Item`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/main\_menu/item.rb) objects.++Additionally, there are two builder classes [`Spree::Admin::MainMenu::SectionBuilder`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/main\_menu/section\_builder.rb) and [`Spree::Admin::MainMenu::ItemBuilder`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/main\_menu/item\_builder.rb) that make it easier to build more complex sections.++The menu is available under `Rails.application.config.spree_backend.main_menu` and can be modified by both extensions as well as the Rails application code.++#### Example: adding an additional section to the admin panel:++```ruby+Rails.application.config.after_initialize do+ Rails.application.config.spree_backend.main_menu.add(+ Spree::Admin::MainMenu::SectionBuilder.new('subscriptions', 'inbox-fill.svg').+ with_admin_ability_check(Spree::Subscription).+ with_items(+ Spree::Admin::MainMenu::ItemBuilder.new('active', Spree::Core::Engine.routes.url_helpers.admin_active_subsciptions_path).build,+ Spree::Admin::MainMenu::ItemBuilder.new('expired', Spree::Core::Engine.routes.url_helpers.admin_expired_subsciptions_path).build+ ).+ build+ )+end+```++For a more extensive example, take a look at how the [default menu is built](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/main\_menu/default\_configuration\_builder.rb).++### Customizing tabs++In some cases you may need to add a new tab to a page for editing Orders, Products or Users.++++These tabs are built with [`Spree::Admin::Tabs::Tab`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/tabs/tab.rb). You can also use [`Spree::Admin::Tabs::TabBuilder`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/tabs/tab\_builder.rb) class to construct new Tab objects. The tabs are attached to `Rails.application.config.spree_backend.tabs` and can be modified via an initializer.++#### Example: adding an additional tab to the product edit admin page++```ruby+Rails.application.config.after_initialize do+ Rails.application.config.spree_backend.tabs[:product].add(+ Spree::Admin::Tabs::TabBuilder.new('discounts', ->(resource) { admin_product_discounts_path(product) }).+ with_icon_key('view.svg').+ with_active_check.+ build+ )+end+```++### Customizing actions++A common case for extensions is to add a new action button in the admin panel.++Action buttons are built with [`Spree::Admin::Actions::Action`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/actions/action.rb) or with a dedicated [`Spree::Admin::Actions::ActionBuilder`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/actions/action\_builder.rb) class. The action buttons are attached to `Rails.application.config.spree_backend.actions` and can be modified with an initializer.++**Example: adding a new button to the order page**++```ruby+Rails.application.config.after_initialize do+ Rails.application.config.spree_backend.actions[:order].add(+ Spree::Admin::Actions::ActionBuilder.new('generate_export', admin_export_orders_path).+ with_icon_key('list.svg').+ with_style(Spree::Admin::Actions::ActionStyle::PRIMARY).+ with_method(:post).+ build+ )+end+```++### Customizing existing views and partials++If you need a more extensive customization of any of the admin panel pages, you can just copy their .erb file from the `spree_backend` gem to your `app/views/` directory and modify it there. This allows you to fully override default views provided by the `spree_backend` gem.++<Note>+ Note: This approach is not recommended for Spree extensions, as it may conflict with other extensions that modify the same view.+</Note>\ No newline at end of filediff --git a/docs/developer/customization/api_v2.mdx b/docs/developer/customization/api_v2.mdxnew file mode 100644index 0000000000..cc6d94b9d9--- /dev/null+++ b/docs/developer/customization/api_v2.mdx@@ -0,0 +1,74 @@+---+title: API v2+section: customization+order: 6+description: >-+ This page covers adding new Storefront API endpoints and customization of+ existing ones+---++# Storefront API++## Customizing existing API endpoints++### Customizing JSON response++Spree uses J[SON API serializers](https://github.com/jsonapi-serializer/jsonapi-serializer) to represent data returned by API endpoints.++You can easily swap OOTB Spree serializers with your own thanks to [Spree Dependencies](dependencies).++#### Adding custom attributes++<Note>+Generally it's recommended to use [Properties](/core-concepts/products#product-properties) and [OptionTypes/Option Values](/core-concepts/products#option-types-and-option-values) for custom attributes and not to modify the Spree database schema+</Note>++Let's say you want to customize the Storefront API's [Product serializer](https://github.com/spree/spree/blob/master/api/app/serializers/spree/v2/storefront/product\_serializer.rb) to include you custom database column `my_newcustom_attribute` that you've added to the `spree_products` database table.++Let's start with creating a new serializer file in your project's `app/serializers` directory, that is `app/serializers/my_product_serializer.rb`:++```ruby+class MyProductSerializer < Spree::V2::Storefront::ProductSerializer+ attribute :my_new_custom_attribute+end+```++Now let's tell Spree to use this new serializer, in `config/initializers/spree.rb` please set:++```ruby+Spree::Api::Dependencies.storefront_product_serializer = 'MyProductSerializer'+```++Restart the webserver and hit the [Products API ](https://api.spreecommerce.org/docs/api-v2/b3A6MzE0Mjc2Mg-list-of-products)to notice that the payload now includes your new attribute. alongside the standard output.++#### Adding a new association++Let's say you've created a new model called `Video` that belongs to `Product` (_Product has multiple Videos_).++Let's create a new serializer `app/serializers/video_serializer.rb`:++```ruby+class VideoSerializer < Spree::Api::V2::BaseSerializer+ set_type: :video++ attributes :url+end+```++Now in your `app/serializers/my_product_serializer.rb`++```ruby+class MyProductSerializer < Spree::V2::Storefront::ProductSerializer+ attribute :my_new_custom_attribute++ has_many :videos, serializer: :video+end+```++Hitting the Products API you will notice that in the [relationships](https://jsonapi.org/format/#document-resource-object-relationships) key there will be a new key called `videos`++To include Video response in the Product API add `?includes=videos` in the API URL, eg.++```http+GET https://localhost:3000/api/v2/storefront/products?include=videos+```diff --git a/docs/developer/customization/authentication.mdx b/docs/developer/customization/authentication.mdxnew file mode 100644index 0000000000..e78a374982--- /dev/null+++ b/docs/developer/customization/authentication.mdx@@ -0,0 +1,158 @@+---+title: Authentication+description: Learn how to use a custom authentication setup with Spree+---++This guide covers using a custom authentication setup with Spree, such as one provided by your own application. This is ideal in situations where you want to handle the sign-in or sign-up flow of your application uniquely, outside the realms of what would be possible with Spree or you have an existing authentication with user accounts present.++This guide assumes that you have a pre-existing model inside your application that represents the users of your application already. This model could be provided by gems such as [Devise](https://github.com/plataformatec/devise). This guide also assumes that the application that this `User` model exists in is already a Spree application.++<Note>+This model **does not** need to be called `User`, but for the purposes of this guide the model we will be referring to **will** be called `User`. If your model is called something else, do some mental substitution wherever you see `User`.+</Note>++To use your own authentication system with Spree, please follow these steps:++<AccordionGroup>+ <Accordion title="1. Change the Spree.user_class">+ To begin using your custom `User` class, you must first edit Spree's initializer located at `config/initializers/spree.rb` by changing this line:++ ```ruby+ Spree.user_class = 'Spree::User'+ ```++ To this:++ ```ruby+ Spree.user_class = 'User'+ ```+ </Accordion>++ <Accordion title="2. Generate Spree Authentication Helpers">+ Next, you need to run the custom user generator for Spree which will create two files. The first is a migration that will add the necessary Spree fields to your users table, and the second is an extension \(that lives at `lib/spree/authentication_helpers.rb`\) to the `Spree::Core::AuthenticationHelpers` module inside of Spree.++ Run this generator with this command:++ ```bash+ bundle exec rails g spree:custom_user User+ ```++ This will tell the generator that you want to use the `User` class as the class that represents users in Spree. Run the new migration by running this:++ ```bash+ bundle exec rails db:migrate+ ```++ Next you will need to define some methods to tell Spree where to find your application's authentication routes.+ </Accordion>+ <Accordion title="3. Customize Spree Authentication Helpers">+ There are some authentication helpers of Spree's that you will need to possibly override. The file at `lib/spree/authentication_helpers.rb` contains the following code to help you do that:++ ```ruby+ module Spree+ module AuthenticationHelpers+ def self.included(receiver)+ receiver.send :helper_method, :spree_login_path+ receiver.send :helper_method, :spree_signup_path+ receiver.send :helper_method, :spree_logout_path+ receiver.send :helper_method, :spree_current_user+ end++ def spree_current_user+ current_user+ end++ def spree_login_path+ main_app.login_path+ end++ def spree_signup_path+ main_app.signup_path+ end++ def spree_logout_path+ main_app.logout_path+ end+ end+ end+ ```++ In your `ApplicationController` add these lines:++ ```ruby+ include Spree::AuthenticationHelpers+ include Spree::Core::ControllerHelpers::Auth+ include Spree::Core::ControllerHelpers::Order+ include Spree::Core::ControllerHelpers::Store+ include Spree::Core::ControllerHelpers::Currency+ include Spree::Core::ControllerHelpers::Locale++ helper 'spree/base', 'spree/locale', 'spree/currency', 'spree/store'+ ```++ Each of the methods defined in this module return values that are the most common in Rails applications today, but you may need to customize them. In order, they are:++ * `spree_current_user` Used to tell Spree what the current user of a request is.+ * `spree_login_path` The location of the login/sign in form in your application.+ * `spree_signup_path` The location of the sign up form in your application.+ * `spree_logout_path` The location of the logout feature of your application.++ URLs inside the `spree_login_path`, `spree_signup_path` and `spree_logout_path` methods **must** have `main_app` prefixed if they are inside your application. This is because Spree will otherwise attempt to route to a `login_path`, `signup_path` or `logout_path` inside of itself, which does not exist. By prefixing with `main_app`, you tell it to look at the application's routes.++ You will need to define the `login_path`, `signup_path` and `logout_path` routes yourself, by using code like this inside your application's `config/routes.rb` if you're using Devise:++ ```ruby+ devise_for :users+ devise_scope :user do+ get '/login', to: "devise/sessions#new"+ get '/signup', to: "devise/registrations#new"+ delete '/logout', to: "devise/sessions#destroy"+ end+ ```++ Of course, this code will be different if you're not using Devise. Simply **do not** use the `devise_scope` method and change the controllers and actions for these routes.++ You can also customize the `spree_login_path`, `spree_signup_path` and `spree_logout_path` methods inside `lib/spree/authentication_helpers.rb` to use the routing helper methods already provided by the authentication setup you have, if you wish.++ Any modifications made to `lib/spree/authentication_helpers.rb` while the server is running will require a restart, as with any other modification to other files in `lib`.+ </Accordion>+ <Accordion title="4. Include Spree::UserMethods in your User model">+ In your User Model you have to add:++ ```ruby+ include Spree::UserMethods+ include Spree::UserAddress+ include Spree::UserPaymentSource+ ```++ The first of these methods are the ones added for the `has_and_belongs_to_many` association called `spree_roles`. This association will retrieve all the roles that a user has for Spree.++ The second of these is the `spree_orders` association. This will return all orders associated with the user in Spree. There's also a `last_incomplete_spree_order` method which will return the last incomplete spree order for the user. This is used internal to Spree to persist order data across a user's login sessions.++ The third and fourth associations are for address information for a user. When a user places an order, the address information for that order will be linked to that user so that it is available for subsequent orders.++ The next method is one called `has_spree_role?` which can be used to check if a user has a specific role. This method is used internally to Spree to check if the user is authorized to perform specific actions, such as accessing the admin section. Admin users of your system should be assigned the Spree admin role, like this:++ ```ruby+ user = User.find_by(email: '[email protected]')+ user.spree_roles << Spree::Role.where(name: 'admin').first_or_create+ ```++ To test that this has worked, use the `has_spree_role?` method, like this:++ ```ruby+ user.has_spree_role?('admin')+ ```++ If this returns `true`, then the user has admin permissions within Spree.+ </Accordion>+ <Accordion title="5. Remove Auth Devise gem">+ The `spree_auth_devise` gem is not needed when using an existing application authentication unless the goal is to have two separate authentication methods.++ You can remove the `spree_auth_devise` gem by running this command:++ ```bash+ bundle remove spree_auth_devise+ ```+ </Accordion>+</AccordionGroup>diff --git a/docs/developer/customization/checkout.mdx b/docs/developer/customization/checkout.mdxnew file mode 100644index 0000000000..a32784f181--- /dev/null+++ b/docs/developer/customization/checkout.mdx@@ -0,0 +1,173 @@+---+title: Checkout Flow+section: customization+order: 5+---++# Checkout++The Spree checkout process has been designed for maximum flexibility. It's been redesigned several times now, each iteration has benefited from the feedback of real-world deployment experience. It is relatively simple to customize the checkout process to suit your needs. Secure transmission of customer information is possible via SSL and credit card information is never stored in the database.++The customization of the flow of the checkout can be done by using Spree's `checkout_flow` DSL, described in the [Checkout Flow DSL](checkout#the-checkout-flow-dsl) section below.++## Default Checkout Steps++The Spree checkout process consists of the following steps. With the exception of the Registration step, each of these steps corresponds to a state of the [Order object](/core-concepts/orders):++* Registration \(Optional - only if using [spree\_auth\_devise](https://github.com/spree/spree_auth_devise) extension, can be toggled through the `Spree::Auth::Config[:registration_step]` configuration setting\)+* Address Information+* Delivery Options \(Shipping Method\)+* Payment+* Confirmation++The following sections will provide a walk-through of checkout from a user's perspective, and offer some information on how to configure the default behavior of the various steps.++### Registration++Prior to beginning the checkout process, the customer will be prompted to create a new account or to log in to their existing account. By default, there is also a "guest checkout" option that allows users to specify only their email address if they do not wish to create an account.++Technically, the registration step is not an actual state in the `Spree::Order` state machine. The `spree_auth_devise` gem \(an extension that comes with Spree by default\) adds the `check_registration` before filter to all actions of `Spree::CheckoutController` \(except for obvious reasons the `registration` and `update_registration` actions\), which redirects to a registration page unless one of the following is true:++* `Spree::Auth::Config[:registration_step]` preference is not `true`+* user is already logged in+* the current order has an email address associated with it++The method is defined like this:++```ruby+def check_registration+ return unless Spree::Auth::Config[:registration_step]+ return if spree_current_user or current_order.email+ store_location+ redirect_to spree.checkout_registration_path+end+```++The configuration of the guest checkout option is done via [Preferences](/core-concepts/preferences). Spree will allow guest checkout by default. Use the `allow_guest_checkout` preference to change the default setting.++### Address Information++This step allows the customer to add both their billing and shipping information. Customers can click the "use billing address" option to use the same address for both. Selecting this option will have the effect of hiding the shipping address fields using JavaScript. If users have disabled JavaScript, the section will not disappear but it will copy over the address information once submitted. If you would like to automatically copy the address information via JavaScript on the client side, that is an exercise left to the developer. We have found the server side approach to be simpler and easier to maintain.++The address fields include a select box for choosing state/province. The list of states will be populated via JavaScript and will contain all of the states listed in the database for the currently selected country. If there are no states configured for a particular country, or if the user has JavaScript disabled, the select box will be replaced by a text field instead.++ The default "seed" data for Spree only includes the U.S. states. It's easy enough to add states or provinces for other countries but beyond the scope of the Spree project to maintain such a list.++ The state field can be disabled entirely by using the \`Spree::Config\[:address\_requires\_state\]\` preference. You can also allow for an "alternate phone" field by using the \`Spree::Config\[:alternative\_shipping\_phone\]\` and \`Spree::Config\[:alternative\_shipping\]\` fields.++The list of countries that appear in the country select box can also be configured. Spree will list all countries by default, but you can configure exactly which countries you would like to appear. The list can be limited to a specific set of countries by [setting the Store's checkout zone](/core-concepts/stores#checkout-configuration). Spree assumes that the list of billing and shipping countries will be the same. You can always change this logic via an extension if this does not suit your needs.++### Delivery Options++During this step, the user may choose a delivery method. Spree assumes the list of shipping methods to be dependent on the shipping address. This is one of the reasons why it is difficult to support single page checkout for customers who have disabled JavaScript.++### Payment++This step is where the customer provides payment information. This step is intentionally placed last in order to minimize security issues with credit card information. Credit card information is never stored in the database so it would be impossible to have a subsequent step and still be able to submit the information to the payment gateway. Spree submits the information to the gateway before saving the model so that the sensitive information can be discarded before saving the checkout information.++Spree stores only the last four digits of the credit card number along with the expiration information. The full credit card number and verification code are never stored in the Spree database.++Several gateways such as ActiveMerchant and Beanstream provide a secure method for storing a "payment profile" in your database. This approach typically involves the use of a "token" which can be used for subsequent purchases but only with your merchant account. If you are using a secure payment profile it would then be possible to show a final "confirmation" step after payment information is entered.++If you do not want to use a gateway with payment profiles then you will need to customize the checkout process so that your final step submits the credit card information. You can then perform authorization before the order is saved. This is perfectly secure because the credit card information is not ever saved. It's transmitted to the gateway and then discarded like normal.++ Spree discards the credit card number after this step is processed. If you do not have a gateway with payment profiles enabled then your card information will be lost before it's time to authorize the card.++For more information about payments, please see the [Payments guide](/core-concepts/payments).++### Confirmation++This is the final opportunity for the customer to review their order before submitting it to be processed. Users have the opportunity to return to any step in the process using either the back button or by clicking on the appropriate step in the "progress breadcrumb."++This step is disabled by default \(except for payment methods that support payment profiles\), but can be enabled by overriding the `confirmation_required?` method in `Spree::Order`.++## Checkout Architecture++The following is a detailed summary of the checkout architecture. A complete understanding of this architecture will allow you to be able to customize the checkout process to handle just about any scenario you can think of. Feel free to skip this section and come back to it later if you require a deeper understanding of the design in order to customize your checkout.++### The Order Model and State Machine++The `Spree::Order` state machine is the foundation of the checkout process. Spree makes use of the [state\_machines](https://github.com/state-machines/state_machines) gem in the `Spree::Order` model as well as in several other places \(such as `Spree::Shipment` and `Spree::InventoryUnit`.\)++The default checkout flow for the `Spree::Order` model is defined in `app/models/spree/order/checkout.rb` of spree\_core.++An `Spree::Order` object has an initial state of 'cart'. From there any number of events transition the `Spree::Order` to different states. Spree does not have a separate model or database table for the shopping cart. What the user considers a "shopping cart" is actually an in-progress `Spree::Order`. An order is considered in-progress, or incomplete when its `completed_at` attribute is `nil`. Incomplete orders can be easily filtered during reporting and it's also simple enough to write a quick script to periodically purge incomplete orders from the system. The end result is a simplified data model along with the ability for store owners to search and report on incomplete/abandoned orders.++ For more information on the state machines gem please see the \[README\]\(https://github.com/state-machines/state\_machines\)++## Checkout Customization++It is possible to override the default checkout workflow to meet your store's needs.++### Adding Logic Before or After a Particular Step++The [state\_machines](https://github.com/state-machines/state_machines) gem allows you to implement callbacks before or after transitioning to a particular step. These callbacks work similarly to [Active Record Callbacks](http://guides.rubyonrails.org/active_record_callbacks.html) in that you can specify a method or block of code to be executed prior to or after a transition. If the method executed in a before\_transition returns false, then the transition will not execute.++So, for example, if you wanted to verify that the user provides a valid zip code before transitioning to the delivery step, you would first implement a `valid_zip_code?` method, and then tell the state machine to run this method before that transition, placing this code in a file called `app/models/spree/order_decorator.rb`:++```ruby+Spree::Order.state_machine.before_transition to: :delivery, do: :valid_zip_code?+```++This callback would prevent transitioning to the `delivery` step if `valid_zip_code?` returns false.++## The Checkout Flow DSL++Spree comes with a new checkout DSL that allows you succinctly define the different steps of your checkout. This new DSL allows you to customize _just_ the checkout flow, while maintaining the unrelated admin states, such as "canceled" and "resumed", that an order can transition to. Ultimately, it provides a shorter syntax compared with overriding the entire state machine for the `Spree::Order` class.++The default checkout flow for Spree is defined like this, adequately demonstrating the abilities of this new system:++```ruby+checkout_flow do+ go_to_state :address+ go_to_state :delivery+ go_to_state :payment, if: ->(order) {+ order.update_totals+ order.payment_required?+ }+ go_to_state :confirm, if: ->(order) { order.confirmation_required? }+ go_to_state :complete+ remove_transition from: :delivery, to: :confirm+```++we can pass a block on each checkout step definition and work some logic to figure if the step is required dynamically. e.g. the confirm step might only be necessary for payment gateways that support payment profiles.++These conditional states present a situation where an order could transition from delivery to one of payment, confirm or complete. In the default checkout, we never want to transition from delivery to confirm, and therefore have removed it using the `remove_transition` method of the Checkout DSL. The resulting transitions between states look like the image below:++These two helper methods are provided on `Spree::Order` instances for your convenience:++* `checkout_steps`: returns a list of all the potential states of the checkout.+* `has_step?`: Used to check if the current order fulfills the requirements for a specific state.++If you want a list of all the currently available states for the checkout, use the `checkout_steps` method, which will return the steps in an array.++### Modifying the checkout flow++To add or remove steps to the checkout flow, you can use the `insert_checkout_step` and `remove_checkout_step` helpers respectively.++The `insert_checkout_step` takes a `before` or `after` option to determine where to insert the step:++```ruby+insert_checkout_step :new_step, before: :address+# or+insert_checkout_step :new_step, after: :address+```++The `remove_checkout_step` will remove just one checkout step at a time:++```ruby+remove_checkout_step :address+remove_checkout_step :delivery+```++What will happen here is that when a user goes to checkout, they will be asked to \(potentially\) fill in their payment details and then \(potentially\) confirm the order. This is the default behavior of the payment and the confirm steps within the checkout. If they are not required to provide payment or confirmation for this order then checking out this order will result in its immediate completion.++To completely re-define the flow of the checkout, use the `checkout_flow` helper:++```ruby+checkout_flow do+ go_to_state :payment+ go_to_state :complete+end+```+diff --git a/docs/developer/customization/deface_overrides_tutorial.mdx b/docs/developer/customization/deface_overrides_tutorial.mdxnew file mode 100644index 0000000000..817468294c--- /dev/null+++ b/docs/developer/customization/deface_overrides_tutorial.mdx@@ -0,0 +1,256 @@+---+title: Deface Overrides+section: advanced+---++# Deface++<Warning>+Using Deface is no longer recommended+</Warning>++## What is Deface?++Deface is a standalone Rails library that enables you to customize Erb templates without needing to directly edit the underlying view file. Deface allows you to use standard CSS3 style selectors to target any element \(including Ruby blocks\), and perform an action against all the matching elements.++## Improving Our Extension Using Deface++### The Goal++Our goal is to add a field to the product edit admin page that allows the `sale_price` to be added or updated. We could do this by overriding the view Spree provides, but there are potential problems with this technique. If Spree updates the view in a new release we won't get the updated view as we are already overriding it. We would need to update our view with the new content from Spree and then add our customizations back in to stay fully up to date.++Let's do this instead using Deface, which we just learned about. Using Deface will allow us to keep our view customizations in one spot, `app/overrides`, and make sure we are always using the latest implementation of the view provided by Spree.++### The Implementation++We want to override the product edit admin page, so the view we want to modify in this case is the product form partial. This file's path will be `spree/admin/products/_form.html.erb`.++First, let's create the overrides directory with the following command:++```bash+mkdir app/overrides+```++So we want to override `spree/admin/products/_form.html.erb`. Here is the part of the file we are going to add content to \(you can also view the [full file](https://github.com/spree/spree/blob/master/backend/app/views/spree/admin/products/_form.html.erb)\):++```text+<div class="right four columns omega" data-hook="admin_product_form_right">+ <%= f.field_container :price do %>+ <%= f.label :price, raw(Spree.t(:master_price) + required_span_tag) %>+ <%= f.text_field :price, value: number_to_currency(@product.price, unit: '')%>+ <%= f.error_message_on :price %>+ <% end %>+</div>+```++We want our override to insert another field container after the price field container. We can do this by creating a new file `app/overrides/add_sale_price_to_product_edit.rb` and adding the following content:++```ruby+Deface::Override.new(virtual_path: 'spree/admin/products/_form',+ name: 'add_sale_price_to_product_edit',+ insert_after: "erb[loud]:contains('text_field :price')",+ text: "+ <%%= f.field_container :sale_price do %>+ <%%= f.label :sale_price, raw(Spree.t(:sale_price) + content_tag(:span, ' *')) %>+ <%%= f.text_field :sale_price, value:+ number_to_currency(@product.sale_price, unit: '') %>+ <%%= f.error_message_on :sale_price %>+ <%% end %>+ ")+```++We also need to delegate `sale_price` to the master variant in order to get the updated product edit form working.++We can do this by creating a new file `app/models/spree/product_decorator.rb` and adding the following content to it:++```ruby+module Spree+ Product.class_eval do+ delegate :sale_price, :sale_price=, to: :master+ end+end+```++Now, when we head to `http://localhost:3000/admin/products` and edit a product, we should be able to set a sale price for the product and be able to view it on our sale page, `http://localhost:3000/sale`. Note that you will likely need to restart our example Spree application \(created in the [Getting Started tutorial](../getting-started/installation)\).++### Available actions++Deface applies an **action** to element\(s\) matching the supplied CSS selector. These actions are passed when defining a new override are supplied as the key while the CSS selector for the target element\(s\) is the value, for example:++```ruby+remove: "p.junk"++insert_after: "div#wow p.header"++insert_bottom: "ul#giant-list"+```++Deface currently supports the following actions:++* :remove - Removes all elements that match the supplied selector+* :replace - Replaces all elements that match the supplied selector, with the content supplied+* :replace\_contents - Replaces the contents of all elements that match the supplied selector+* :surround - Surrounds all elements that match the supplied selector, expects replacement markup to contain <%%= render\_original %> placeholder+* :surround\_contents - Surrounds the contents of all elements that match the supplied selector, expects replacement markup to contain <%%= render\_original %> placeholder+* :insert\_after - Inserts after all elements that match the supplied selector+* :insert\_before - Inserts before all elements that match the supplied selector+* :insert\_top - Inserts inside all elements that match the supplied selector, as the first child+* :insert\_bottom - Inserts inside all elements that match the supplied selector, as the last child+* :set\_attributes - Sets attributes on all elements that match the supplied selector, replacing existing attribute value if present or adding if not. Expects :attributes option to be passed.+* :add\_to\_attributes - Appends value to attributes on all elements that match the supplied selector, adds attribute if not present. Expects :attributes option to be passed.+* :remove\_from\_attributes - Removes value from attributes on all elements that match the supplied selector. Expects :attributes option to be passed.++ Not all actions are applicable to all elements. For example, \`:insert\_top\` and \`:insert\_bottom\` expects a parent element with children.++### Supplying content++Deface supports three options for supplying content to be used by an override:++* :text - String containing markup+* :partial - Relative path to a partial+* :template - Relative path to a template++ As Deface operates on the Erb source the content supplied to an override can include Erb, it is not limited to just HTML. You also have access to all variables accessible in the original Erb context.++### Targeting elements++While Deface allows you to use a large subset of CSS3 style selectors \(as provided by Nokogiri\), the majority of Spree's views have been updated to include a custom HTML attribute \(data-hook\), which is designed to provide consistent targets for your overrides to use.++As Spree views are changed over coming versions, the original HTML elements maybe edited or be removed. We will endeavour to ensure that data-hook / id combination will remain consistent within any single view file \(where possible\), thus making your overrides more robust and upgrade proof.++For example, spree/products/show.html.erb looks as follows:++```text+<div data-hook="product_show" itemscope itemtype="http://schema.org/Product">+ <%% body_id = 'product-details' %>+ <div class="columns six alpha" data-hook="product_left_part">+ <div class="row" data-hook="product_left_part_wrap">+ <div id="product-images" data-hook="product_images">+ <div id="main-image" data-hook>+ <%%= render 'image' %>+ </div>++ <div id="thumbnails" data-hook>+ <%%= render 'thumbnails', product: product %>+ </div>+ </div>++ <div data-hook="product_properties">+ <%%= render 'properties' %>+ </div>++ </div>+ </div>++ <div class="columns ten omega" data-hook="product_right_part">+ <div class="row" data-hook="product_right_part_wrap">++ <div id="product-description" data-hook="product_description">++ <h1 class="product-title" itemprop="name"><%%= accurate_title %></h1>++ <div itemprop="description" data-hook="description">+ <%%= product_description(product) rescue Spree.t(:product_has_no_description) %>+ </div>++ <div id="cart-form" data-hook="cart_form">+ <%%= render 'cart_form' %>+ </div>+ </div>++ <%%= render 'taxons' %>+ </div>+ </div>+</div>+```++As you can see from the example above the `data-hook` can be present in a number of ways:++* On elements with **no** `id` attribute the `data-hook` attribute++ contains a value similar to what would be included in the `id`++ attribute.++* On elements with an `id` attribute the `data-hook` attribute does++ **not** normally contain a value.++* Occasionally on elements with an `id` attribute the `data-hook` will++ contain a value different from the elements id. This is generally to++ support migration from the old 0.60.x style of hooks, where the old++ hook names were converted into `data-hook` versions.++The suggested way to target an element is to use the `data-hook` attribute wherever possible. Here are a few examples based on **products/show.html.erb** above:++```ruby+replace: "[data-hook='product_show']"++insert_top: "#thumbnails[data-hook]"++remove: "[data-hook='cart_form']"+```++You can also use a combination of both styles of selectors in a single override to ensure maximum protection against changes:++```ruby+ insert_top: "[data-hook='thumbnails'], #thumbnails[data-hook]"+```++### Targeting ruby blocks++Deface evaluates all the selectors passed against the original erb view contents \(and importantly not against the finished / generated HTML\). In order for Deface to make ruby blocks contained in a view parseable they are converted into a pseudo markup as follows.++Given the following Erb file:++```text+<%% if products.empty? %>+ <%%= Spree.t(:no_products_found) %>+<%% elsif params.key?(:keywords) %>+ <h3><%%= Spree.t(:products) %></h3>+<%% end %>+```++Would be seen by Deface as:++```markup+<!-- <html>+ <erb[silent]> if products.empty? </erb>+ <erb[loud]> Spree.t(:no_products_found) </erb>+ <erb[silent]> elsif params.key?(:keywords) </erb>++ <h3><erb[loud]> Spree.t(:products) </erb></h3>++ <erb[silent]> end </erb>+</html> -->+```++So you can target ruby code blocks with the same standard CSS3 style selectors, for example:++```ruby+replace: "erb[loud]:contains('t(:products)')"++insert_before: "erb[silent]:contains('elsif')"+```++### View upgrade protection++To ensure upgrading between versions of Spree is as painless as possible, Deface supports an `:original` option that can contain a string of the original content that's being replaced. When Deface is applying the override it will ensure that the current source matches the value supplied and will output to the Rails application log if they are different.++These warnings are a good indicator that you need to review the source and ensure your replacement is adequately replacing all the functionality provided by Spree. This will help reduce unexpected issues after upgrades.++Once you've reviewed the new source you can update the `:original` value to new source to clear the warning.++ Deface removes all whitespace from both the actual and \`:original\` source values before comparing, to reduce false warnings caused by basic whitespace differences.++### Organizing Overrides++The suggested method for organizing your overrides is to create a separate file for each override inside the **app/overrides** directory, naming each file the same as the **:name** specified within.++### More information on Deface++For more information and sample overrides please refer to its [README](https://github.com/spree/deface) file on GitHub.+diff --git a/docs/developer/customization/dependencies.mdx b/docs/developer/customization/dependencies.mdxnew file mode 100644index 0000000000..7e65e3f040--- /dev/null+++ b/docs/developer/customization/dependencies.mdx@@ -0,0 +1,87 @@+---+title: Dependency system+section: customization+order: 3+---++# Dependencies++## Overview++With Dependencies, you can easily replace parts of Spree internals with your custom classes. You can replace [Services](https://github.com/spree/spree/tree/master/core/app/services/spree), Abilities, and [Serializers](https://github.com/spree/spree/tree/master/api/app/serializers/spree/v2). More will come in the future.++## Controller level customization++To replace [serializers](https://github.com/jsonapi-serializer/jsonapi-serializer) or Services in a specific API endpoint you can create a simple decorator:++Create a `app/controllers/my_store/spree/cart_controller_decorator.rb`++```ruby+ module MyStore+ module Spree+ module CartControllerDecorator+ def resource_serializer+ MyNewAwesomeCartSerializer+ end++ def add_item_service+ MyNewAwesomeAddItemToCart+ end+ end+ end+ end+ Spree::Api::V2::Storefront::CartController.prepend MyStore::Spree::CartControllerDecorator+```++This will change the serializer in this API endpoint to `MyNewAwesomeCartSerializer` and also it will swap the default `add_item_service` to `MyNewAwesomeAddItemToCart`.++Different API endpoints can have different dependency injection points. You can review their [source code](https://github.com/spree/spree/tree/master/api/app/controllers/spree/api/v2) to see what you can configure.++## API level customization++Storefront and Platform APIs have separate Dependencies injection points so you can easily customize one without touching the other.++In your Spree initializer (`config/initializers/spree.rb`) please add:++```ruby+Spree::Api::Dependencies.storefront_cart_serializer = 'MyNewAwesomeCartSerializer'+Spree::Api::Dependencies.storefront_cart_add_item_service = 'MyNewAwesomeAddItemToCart'+```++This will swap the default Cart serializer and Add Item to Cart service for your custom ones within all Storefront API endpoints that use those classes.++Values set in the initializer have to be strings, eg. \`'MyNewAwesomeAddItemToCart'\`++## Application (global) customization++You can also inject classes globally into the entire Spree stack. Be careful about this though as this touches every aspect of the application (both APIs, Admin Panel, and default Rails frontend if you're using it).++```ruby+Spree::Dependencies.cart_add_item_service = 'MyNewAwesomeAddItemToCart'+```++or++```ruby+Spree.dependencies do |dependencies|+ dependencies.cart_add_item_service = 'MyNewAwesomeAddItemToCart'+end+```++You can mix and match both global and API-level customizations:++```ruby+Spree::Dependencies.cart_add_item_service = 'MyNewAwesomeAddItemToCart'+Spree::Api::Dependencies.storefront_cart_add_item_service = 'AnotherAddItemToCart'+```++The second line will have precedence over the first one, and the Storefront API will use `AnotherAddItemToCart` and the rest of the application will use `MyNewAwesomeAddItemToCart`++Values set in the initializer have to be strings, eg. `'MyNewAwesomeAddItemToCart'`++## Default values++By default values can be easily checked by looking at the source code of Dependencies classes:++* [Application (global) dependencies](https://github.com/spree/spree/blob/main/core/lib/spree/core/dependencies.rb)+* [API level dependencies](https://github.com/spree/spree/blob/main/api/lib/spree/api/dependencies.rb)diff --git a/docs/developer/customization/emails.mdx b/docs/developer/customization/emails.mdxnew file mode 100644index 0000000000..13432f3779--- /dev/null+++ b/docs/developer/customization/emails.mdx@@ -0,0 +1,23 @@+---+title: Emails+---++<Note>+Emails are now part of `spree_emails` gem. If you use `spree_starter` you already have it installed.+</Note>++## Overview++Spree uses [postmark templates](https://github.com/wildbit/postmark-templates), as a base for all transactional emails.++## Email previews++Spree offers an emails preview generator for development purposes. To generate them, use the command:++```bash+bundle exec rails g spree:emails:install+```++After that, start the rails server locally and go to: `localhost:3000/rails/mailers`++(it requires a seeded development database in order to work properly)diff --git a/docs/developer/customization/i18n.mdx b/docs/developer/customization/i18n.mdxnew file mode 100644index 0000000000..025c043ac4--- /dev/null+++ b/docs/developer/customization/i18n.mdx@@ -0,0 +1,142 @@+---+title: Internationalization+section: customization+order: 8+description: >-+ This guide covers how Spree uses Rails' internationalization features, and how+ you can leverage and extend these features in your Spree contributions and+ extensions.+---++# Internationalization++## Default Locale++Each [**Store**](/core-concepts/stores) has their own `default_locale` attribute. Alongside that, you can also set `supported_locales` which will enable multi-language capabilities for that Store.++For locales, we use symbols such as `en`,`es-MX` etc - full list of supported locales is available in the [Spree I18n GitHub repository](https://github.com/spree-contrib/spree\_i18n/tree/master/config/locales).++## Default Currency++Each [**Store**](/core-concepts/stores) has their own `default_currency` attribute. Alongside that, you can also set `supported_currencies` which will enable multi-currency capabilities for that Store.++For currencies, we use [ISO 4217](https://en.wikipedia.org/wiki/ISO\_4217) symbols, eg. `USD` , `CAD`, `EUR`++## Resource Translations++As of Spree 4.6, resources with user-facing content fields now have built in support for translations. Translation functionality is handled by the [Mobility gem](https://github.com/shioyama/mobility). Spree allows you to translate the following resources:++| Resource | Translatable Fields |+| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| Product | name, description, slug, meta\_description, meta\_keywords, meta\_title |+| Taxon | name, description, permalink |+| Taxonomy | name |+| Option Type | name, presentation |+| Option Value | name, presentation |+| Property | name, presentation, filter\_param |+| Product Property | value, filter\_param |+| Store | name, meta\_description, meta\_keywords, seo\_title, facebook, twitter, instagram, customer\_support\_email, description, address, contact\_phone, new\_order\_notifications\_email |++Our translatable resources are configured with Mobility’s [Table Backend](https://github.com/shioyama/mobility#table-backend-like-globalize) storage strategy. The way this works is that each translatable resource has a corresponding translations table in the database, in which translation values are stored - for example, product translations are stored in `spree_product_translations`.++As of 4.6, data for translatable fields exists solely in the the translation tables so that there is a single source of truth. In the database, the translatable fields on the resource itself will always null. Even if there is only data for a single language, the data for those fields will be stored in the corresponding translations table. In the code, the data will still be accessible via attribute accessors like `.name` and `.description` in the code.\+\+Read more about how to work with translations by reading [Mobility's usage docs](https://github.com/shioyama/mobility#usage).++### Resource Translations Implementation++Each translatable resource includes the `TranslatableResource` module, which sets the default scope for the resource to `i18n`. This makes it so that when querying the translatable resource on a translatable field, Mobility will know to search in the translation tables. Read more about querying translatable fields and the i18n scope in the [Mobility docs](https://github.com/shioyama/mobility#querying).++Due to some shortcomings of the Mobility gem, not all Active Record Query Interface methods work with translations. This includes:++* selecting `distinct` when ordering by a translated field raises an error. To work around this, explicitly select the translated field that you are ordering by. For example, instead of `Spree::Product.order(:name).distinct` do `Spree::Product.select(:name).order(:name).distinct`+* calling `first_or_create` or `first_or_initialize` on a clause that checks for a translated field does not work correctly with Mobility. For example, the following line of code will not perform as expected: `Spree::Product.where(name: ‘Denim Shirt').first_or_create!` Instead, you’ll need to rewrite it as an if statement that calls either `first` or `create` like so:++```+if Spree::Product.where(name: 'Denim Shirt').any?+ Spree::Product.where(name: 'Denim Shirt').first+else+ Spree::Product.create!(name: 'Denim Shirt')+end+```++* Joining on a resource with translations and then filtering by a translated field on the resource that you joined does not work correctly. For example, the following statement will not select the correct products: `Spree::Product.joins(:taxons).where(taxons: {name: "30% Off"})`. Instead, you can make use of the `join_translation_table` method in in the `TranslatableResourceScopes` Module. The above query can be rewritten like this:++```+Spree::Product.joins(:taxons)+ .joins_translation_table(Spree::Taxon)+ .where(Spree::Taxon.translation_table_alias => {name: "30% Off"})+```++### Spree 4.5 and lower++If you are using Spree version 4.5 or lower and are currently unable to upgrade, you need to install [Spree Globalize extension](https://github.com/spree-contrib/spree\_globalize) to enable translations. This extension uses [Globalize](https://github.com/globalize/globalize) library under the hood.++This gem will allow you to translate:++* Products+* Promotions+* Option Types+* Taxonomies+* Taxons+* Properties+* Shipping Methods++## The spree\_i18n project++Spree now stores all of the translation information in a separate GitHub project known as [Spree I18n](https://github.com/spree/spree\_i18n). This is a stand alone project with a large number of volunteer committers who maintain the locale files. This is basically the same approach followed by the Rails project which keeps their localizations in [rails-i18n](https://github.com/svenfuchs/rails-i18n).++The project is actually a Spree extension. This extension contains translations files. To translate models (provide translations for Products, Taxons, etc) you will need to install also [Spree Globalize](https://github.com/spree-contrib/spree\_globalize).++### Translation Files++Each language is stored in a YAML file located in `config/locales`. Each YAML file contains one top level key which is the language code for the translations contained within that file. The following is a snippet showing the basic layout of a locale file:++```yaml+pt-BR:+ spree:+ say_no: "Não"+ say_yes: "Sim"+```++All translations for Spree are "namespaced" within the `spree` key so that they don't conflict with translations from other parts of the parent application.++Please submit Pull Requests or issues directly to [Spree I18n](https://github.com/spree/spree\_i18n) for missing translations.++### Localization Files++Spree maintains its localization information in a YAML file using a naming convention similar to that of the Rails project. Each of the localization filenames contains a prefix representing the language code of the locale. For example, the Russian translation is contained in `config/locales/ru.yml`.++Spree has over 43 locale files and counting. See the \[GitHub Repository]\(https://github.com/spree/spree\_i18n/tree/master/config/locales) for a complete list.++### Required Files++Each locale that you wish to support will require both a Rails and Spree translation. The required Spree translation files are available automatically when you install the `spree_i18n` gem.++You don't need to copy any files from `spree_i18n` or `rails-i18n` for their translations to be available within your application. They are made available automatically, because both `spree_i18n` and `rails-i18n` are railties.++## Translating Views++<Note>+This section is only applicable for optional`spree_frontend` and `spree_backend` gems+</Note>++When reviewing the source of any view in Spree you'll notice that all text is rendered by passing a string to a helper method similar to:++```+<%= Spree.t(:price) %>+```++The _Spree.t()_ helper method looks up the currently configured locale and retrieves the translated value from the relevant locale YAML file. Assuming a default locale, this translation would be fetched from the en translations collated from the application, `spree_i18n` and `rails-i18n`. Its relative key within those translation files would need to be this:++```yaml+en:+ spree:+ price: Price+```++## Localizing Extensions++Spree extensions can contain their own `config/locales` directory where developers can include YAML files for each language they wish to support.++We strongly urge all extension developers to ensure all customer facing text is rendered via the `Spree.t()` helper method even if they only include a single default language locale file (as other users can simply include the required YAML file and translations in their site extension).diff --git a/docs/developer/customization/images.mdx b/docs/developer/customization/images.mdxnew file mode 100644index 0000000000..4a9515e0d0--- /dev/null+++ b/docs/developer/customization/images.mdx@@ -0,0 +1,50 @@+---+title: Images+---++## Overview++This guide explains how to change Product Images dimensions and different storage options for [ActiveStorage](https://edgeguides.rubyonrails.org/active_storage_overview.html) which is the default attachment storage system in Spree.++### Image dimensions++To change the default image dimensions or add new ones you need to create a decorator file `app/models/my_store/spree/image_decorator.rb`:++```ruby+module MyStore+ module Spree+ module ImageDecorator+ module ClassMethods+ def styles+ {+ mini: '48x48>',+ small: '100x100>',+ product: '240x240>',+ large: '600x600>',+ }+ end+ end++ def self.prepended(base)+ base.inheritance_column = nil+ base.singleton_class.prepend ClassMethods+ end+ end+ end+end++::Spree::Image.prepend ::MyStore::Spree::ImageDecorator+```++You can also create image variations on the fly in your templates, eg.++```text+<%= image_tag(main_app.url_for(@product.images.first.attachment.variant(resize: '150x150'))) %>+```++### Using Amazon S3 as storage system++Please refer to the official [Active Storage documentation](https://guides.rubyonrails.org/active_storage_overview.html#amazon-s3-service)++You can also use [Microsoft Azure Storage](https://guides.rubyonrails.org/active_storage_overview.html#microsoft-azure-storage-service) or [Google Cloud Storage](https://guides.rubyonrails.org/active_storage_overview.html#google-cloud-storage-service)+diff --git a/docs/developer/customization/logic.mdx b/docs/developer/customization/logic.mdxnew file mode 100644index 0000000000..c5c3283707--- /dev/null+++ b/docs/developer/customization/logic.mdx@@ -0,0 +1,127 @@+---+title: Business Logic+section: customization+order: 4+---++# Business Logic++## Overview++It is highly recommended to use [Dependencies](dependencies) and [Extensions](../extensions/extensions) first rather than to apply patches to Spree Core. Still if you don't find those to be efficient you can pretty much overwrite any part of Spree following this guide.++## Extending Classes++All of Spree's business logic \(models, controllers, helpers, etc\) can easily be extended or overridden to meet your exact requirements using standard Ruby idioms.++Standard practice for including such changes in your application or extension is to create a file within the relevant **app/models/spree** or **app/controllers/spree** directory with the original class name with **\_decorator** appended.++## Extending Models++Adding a custom method to the [Product](https://github.com/spree/spree/blob/master/core/app/models/spree/product.rb) model: `app/models/my_store/spree/product_decorator.rb`++```ruby+module MyStore+ module Spree+ module ProductDecorator+ def self.prepended(base)+ base.before_validation :strip_whitespaces+ end++ def some_method+ ...+ end++ protected++ def strip_whitespaces+ ...+ end+ end+ end+end++::Spree::Product.prepend MyStore::Spree::ProductDecorator if ::Spree::Product.included_modules.exclude?(MyStore::Spree::ProductDecorator)+```++#### Adding new associations to existing models++Assume you want to add a new model called `Video` associated to `Spree::Product`. Let's start with creating a database migration:++```text+bundle exec rails g migration CreateVideos url:string product:references+bundle exec rails db:migrate+```++Add new model to `app/models/videos.rb`:++```ruby+class Video < ApplicationRecord+ belongs_to :product, class_name: 'Spree::Product'+end+```++Finally add the association in `ProductDecorator` in `app/models/my_store/spree/product_decorator.rb`:++```ruby+module MyStore+ module Spree+ module ProductDecorator+ def self.prepended(base)+ base.has_many :videos, class_name: 'Video', foreign_key: 'product_id', dependent: :destroy+ end+ end+ end+end++::Spree::Product.prepend MyStore::Spree::ProductDecorator if ::Spree::Product.included_modules.exclude?(MyStore::Spree::ProductDecorator)+```++## Extending Controllers++Adding a custom action to the [ProductsController](https://github.com/spree/spree/blob/master/frontend/app/controllers/spree/products_controller.rb): `app/controllers/my_store/spree/products_controller_decorator.rb`++```ruby+module MyStore+ module Spree+ module ProductsControllerDecorator+ def some_action+ ...+ end+ end+ end+end++::Spree::ProductsController.prepend MyStore::Spree::ProductsControllerDecorator if ::Spree::ProductsController.included_modules.exclude?(MyStore::Spree::ProductsControllerDecorator)+```++The exact same format can be used to redefine an existing method.++### Accessing Product Data++If you extend the Products controller with a new method, you may very well want to access product data in that method. You can do so by using the `:load_data before_action`.++```ruby+module MyStore+ module Spree+ module ProductsControllerDecorator+ def self.prepended(base)+ base.before_action :load_data, only: :some_action+ end++ def some_action+ ...+ end+ end+ end+end++::Spree::ProductsController.prepend MyStore::Spree::ProductsControllerDecorator if ::Spree::ProductsController.included_modules.exclude?(MyStore::Spree::ProductsControllerDecorator)+```++`:load_data` will use `params[:id]` to lookup the product by its permalink.++## Replacing Models or Controllers++If your customizations are so large that you overwrite the majority of a given Model or Controller we recommend to drop the `_decorator` pattern and overwrite the Model or Controller completely in your project. This will make future Spree upgrades easier.+diff --git a/docs/developer/customization/permissions.mdx b/docs/developer/customization/permissions.mdxnew file mode 100644index 0000000000..2bab1dd85f--- /dev/null+++ b/docs/developer/customization/permissions.mdx@@ -0,0 +1,105 @@+---+title: Permissions+---++## User and Roles++Spree by default comes with `admin` and `user` roles. You can create more roles in the Admin Panel UI or rails console / seed, eg.:++```ruby+Spree::Role.find_or_create_by(name: 'customer_service')+```++Same with assigning a role, you can do it in the Admin Panel or from the console:++```ruby+Spree.user_class.find_by(email: '[email protected]').spree_roles << Spree::Role.find_or_create_by(name: 'customer_service')+```++## Ability class++For authorization Spree uses [CanCanCan](https://github.com/CanCanCommunity/cancancan) library. The main ability class by default is [Spree::Ability](https://github.com/spree/spree/blob/master/core/app/models/spree/ability.rb).++## Adding custom permissions++Let's assume you would like to add a new Role `customer_service` with some limited access to Admin Panel \(only Orders section\).++Create a new file called `app/models/my_project/customer_service_ability.rb`++```ruby+module MyProject+ class CustomerServiceAbility+ include CanCan::Ability++ def initialize(user)+ if user.respond_to?(:has_spree_role?) && user.has_spree_role?('customer_service')+ can :manage, ::Spree::Order+ end+ end+ end+end+```++Please familiarize yourself with [CanCanCan](https://github.com/CanCanCommunity/cancancan) syntax to understand `can/cannot` methods more.++Now we need to inform Spree to use this ability, create another file `app/models/my_project/spree/ability_decorator.rb` with contents:++```ruby+module MyProject+ module Spree+ module AbilityDecorator+ def abilities_to_register+ [CustomerServiceAbility]+ end+ end+ end+end++::Spree::Ability.prepend(MyProject::Spree::AbilityDecorator)+```++## Replacing all permissions++As we've mentioned earlier, Spree uses the main Ability class. You can change that to use your own custom Ability class via [Dependencies](dependencies) in Spree initializer \(`config/initializers/spree.rb`\), eg.++```ruby+Spree::Dependencies.ability_class = 'MyProject::Ability'+```++Now, let's define that new class in `app/models/my_project/ability.rb`++```ruby+module MyProject+ class Ability < ::Spree::Ability+ def initialize(user)+ alias_cancan_delete_action++ user ||= Spree.user_class.new++ if user.respond_to?(:has_spree_role?) && user.has_spree_role?('admin')+ apply_admin_permissions(user)+ # add some more permissions here for the admin role+ else+ if user.respond_to?(:has_spree_role?) && user.has_spree_role?(:customer_service)+ apply_customer_service_permissions(user)+ end++ apply_user_permissions(user)+ end++ protect_admin_role+ end++ protected++ def apply_customer_service_permissions(user)+ can :manage, ::Spree::Order+ end+ end+end+```++After restarting the rails server you observe new permissions being recognized in the application.++Further permission changes should be automatically picked up in development and should not require application restarts.+diff --git a/docs/developer/customization/preferences.mdx b/docs/developer/customization/preferences.mdxnew file mode 100644index 0000000000..5c35621075--- /dev/null+++ b/docs/developer/customization/preferences.mdx@@ -0,0 +1,302 @@+# Preferences++## Overview++Spree Preferences support general application configuration and preferences per model instance. Spree comes with preferences for your application like `track_inventory_levels`. Additional preferences can be added by your application or included extensions.++To implement preferences for a model, simply add a new column called `preferences`. This is an example migration for the `spree_products` table:++```ruby+class AddPreferencesColumnToSpreeProducts < ActiveRecord::Migration[4.2]+ def change+ add_column :spree_products, :preferences, :text+ end+end+```++This will work because `Spree::Product` is a subclass of `Spree::Base`. If found, the `preferences` attribute gets serialized into a `Hash` and merged with the default values.++As another example, you might want to add preferences for users to manage their notification settings. Just make sure your `User` model inherits from `Spree::Base` then add the `preferences` column. You'll then be able to define preferences for `User`s without adding extra columns to the database table.++> If you're using `spree_auth_devise`, note that the provided `Spree::User` doesn't inherit from `Spree::Base`.++Extensions may add to the Spree General Settings or create their own namespaced preferences.++The first several sections of this guide describe preferences in a very general way. If you're just interested in making modifications to the existing preferences, you can skip ahead to the [Configuring Spree Preferences section](preferences#configuring-spree-preferences). If you would like a more in-depth understanding of the underlying concepts used by the preference system, please read on.++### Motivation++Preferences for models within an application are very common. Although the rule of thumb is to keep the number of preferences available to a minimum, sometimes it's necessary if you want users to have optional preferences like disabling e-mail notifications.++Both use cases are handled by Spree Preferences. They are easy to define, provide quick cached reads, persist across restarts and do not require additional columns to be added to your models' tables.++## General Settings++Spree comes with many application-wide preferences. They are defined in `core/app/models/spree/app_configuration.rb` and made available to your code through `Spree::Config`, e.g., `Spree::Config.track_inventory_levels`.++A limited set of the general settings are available in the admin interface of your store (`/admin/general_settings`).++You can add additional preferences under the `spree/app_configuration` namespace or create your own subclass of `Preferences::Configuration`.++```ruby+# These will be saved with key: spree/app_configuration/hot_salsa+Spree::AppConfiguration.class_eval do+ preference :hot_salsa, :boolean+ preference :dark_chocolate, :boolean, default: true+ preference :color, :string+ preference :favorite_number+ preference :language, :string, default: 'English'+end++# Spree::Config is an instance of Spree::AppConfiguration+Spree::Config.hot_salsa = false++# Create your own class+# These will be saved with key: kona/store_configuration/hot_coffee+Kona::StoreConfiguration < Preferences::Configuration+ preference :hot_coffee, :boolean+ preference :color, :string, default: 'black'+end++KONA::STORE_CONFIG = Kona::StoreConfiguration.new+puts KONA::STORE_CONFIG.hot_coffee+```++## Defining Preferences++You can define preferences for a model within the model itself:++```ruby+class User < ActiveRecord::Base+ preference :hot_salsa, :boolean+ preference :dark_chocolate, :boolean, default: true+ preference :color, :string+ preference :favorite_number, :integer+ preference :language, :string, default: "English"+end+```++In the above model, five preferences have been defined:++* `hot_salsa`+* `dark_chocolate`+* `color`+* `favorite_number`+* `language`++For each preference, a data type is provided. The types available are:++* `boolean`+* `string`+* `password`+* `integer`+* `text`+* `array`+* `hash`++An optional default value may be defined which will be used unless a value has been set for that specific instance.++## Accessing Preferences++Once preferences have been defined for a model, they can be accessed either using the shortcut methods that are generated for each preference or the generic methods that are not specific to a particular preference.++### Shortcut Methods++There are several shortcut methods that are generated. They are shown below.++Query methods:++```ruby+user.prefers_hot_salsa? # => false+user.prefers_dark_chocolate? # => false+```++Reader methods:++```ruby+user.preferred_color # => nil+user.preferred_language # => "English"+```++Writer methods:++```ruby+user.prefers_hot_salsa = false # => false+user.preferred_language = "English" # => "English"+```++Check if a preference is available:++```ruby+user.has_preference? :hot_salsa+```++### Generic Methods++Each shortcut method is essentially a wrapper for the various generic methods shown below:++Query method:++```ruby+user.prefers?(:hot_salsa) # => false+user.prefers?(:dark_chocolate) # => false+```++Reader methods:++```ruby+user.preferred(:color) # => nil+user.preferred(:language) # => "English"+```++```ruby+user.get_preference :color+user.get_preference :language+```++Writer method:++```ruby+user.set_preference(:hot_salsa, false) # => false+user.set_preference(:language, "English") # => "English"+```++### Accessing All Preferences++You can get a hash of all stored preferences by accessing the `preferences` helper:++```ruby+user.preferences # => {"language"=>"English", "color"=>nil}+```++This hash will contain the value for every preference that has been defined for the model instance, whether the value is the default or one that has been previously stored.++### Default and Type++You can access the default value for a preference:++```ruby+user.preferred_color_default # => 'blue'+```++Types are used to generate forms or display the preference. You can also get the type defined for a preference:++```ruby+user.preferred_color_type # => :string+```++## Configuring Spree Preferences++Up until now we've been discussing the general preference system that was adapted to Spree. This has given you a general idea of what types of preference features are theoretically supported. Now, let's start to look specifically at how Spree is using these preferences for configuration.++### Reading the Current Preferences++At the heart of Spree preferences lies the `Spree::Config` constant. This object provides general access to the configuration settings anywhere in the application.++These settings can be accessed from initializers, models, controllers, views, etc.++The `Spree::Config` constant returns an instance of `Spree::AppConfiguration` which is where the default values for all of the general Spree preferences are defined.++You can access these preferences directly in code. To see this in action, just fire up `rails console` and try the following:++```ruby+>> Spree::Config.admin_products_per_page+=> 10+```++The above examples show the default configuration values for these preferences. The defaults themselves are coded within the `Spree::AppConfiguration` class.++```ruby+class Spree::AppConfiguration < Configuration+ #... snip ...+ preference :allow_guest_checkout, :boolean, default: true+ #... snip ...+end+```++If you are using the default preferences without any modifications, then nothing will be stored in the database. If you set a value for the preference it will save it to `spree_preferences` or in our `preferences` column. It will use a memory cached version to maintain performance.++### Overriding the Default Preferences++The default Spree preferences in `Spree::AppConfiguration` can be changed using the `set` method of the `Spree::Config` module. For example to set the number of products shown on the products listing in the admin interface we could do the following:++```ruby+>> Spree::Config.admin_products_per_page = 20+=> 20+>> Spree::Config.admin_products_per_page+=> 20+```++Here we are changing a preference to something other than the default as specified in `Spree::AppConfiguration`. In this case the preference system will persist the new value in the `spree_preferences` table.++### Configuration Through the Spree Initializer++During the Spree installation process, an initializer file is created within your application's source code. The initializer is found under `config/initializers/spree.rb`:++```ruby+Rails.application.config.after_initialize do+ Spree.config do |config|+ # Example:+ # Uncomment to stop tracking inventory levels in the application+ # config.track_inventory_levels = false+ end+end+```++Note that if using Rails 7, you'll need to wrap the `Spree.config` block in an `Rails.application.config.after_initialize` block to avoid getting an error when booting up the app.++The `Spree.config` block acts as a shortcut to setting `Spree::Config` multiple times. If you have multiple default preferences you would like to override within your code you may override them here. Using the initializer for setting the defaults is a nice shortcut, and helps keep your preferences organized in a standard location.++For example, if you would like to tax using the shipping address you can accomplish this by doing the following:++```ruby+Spree.config do |config|+ config.tax_using_ship_address = true+end+```++Initializing preferences in `config/initializers/spree.rb` will overwrite any changes that were made through the admin user interface when you restart.++### Configuration Through the Admin Interface++The Spree admin interface has several different screens where various settings can be configured. For instance, the `admin/general_settings` URL in your Spree application can be used to configure the values for the site name and the site URL. This is basically equivalent to calling `Spree::Config.set(currency: "CDN", currency_thousands_separator: " ")` directly in your Ruby code.++## Site-Wide Preferences++You can define preferences that are site-wide and don't apply to a specific instance of a model by creating a configuration file that inherits from `Spree::Preferences::Configuration`.++```ruby+class Spree::MyApplicationConfiguration < Spree::Preferences::Configuration+ preference :theme, :string, default: "Default"+ preference :show_splash_page, :boolean+ preference :number_of_articles, :integer+end+```++In the above configuration file, three preferences have been defined:++* theme+* show\_splash\_page+* number\_of\_articles++It is recommended to create the configuration file in the `lib/` directory.++Extensions can also define site-wide preferences. For more information on using preferences like this with extensions, check out the [Extensions Tutorial](../extensions/extensions).++### Configuring Site-Wide Preferences++The recommended way to configure site-wide preferences is through an initializer. Let's take a look at configuring the preferences defined in the previous configuration example.++```ruby+module Spree+ MyApp::Config = Spree::MyApplicationConfiguration.new+end++MyApp::Config[:theme] = "blue_theme"+MyApp::Config[:show_spash_page] = true+MyApp::Config[:number_of_articles] = 5+```++The `MyApp` name used here is an example and should be replaced with your actual application's name, found in `config/application.rb`.++The above example will configure the preferences we defined earlier. Take note of the second line. In order to set and get preferences using `MyApp::Config`, we must first instantiate the configuration object.\ No newline at end of filediff --git a/docs/developer/customization/quickstart.mdx b/docs/developer/customization/quickstart.mdxnew file mode 100644index 0000000000..8a26467937--- /dev/null+++ b/docs/developer/customization/quickstart.mdx@@ -0,0 +1,58 @@+---+title: Quickstart+description: Learn how to customize every part of the Spree stack+---++Spree is a very flexible platform allowing you to customize every part of it, to suit your business needs.++There are several ways you can achieve this:++<AccordionGroup>+ <Accordion title="Admin Panel">+ There's a lot of Store settings you can change in the admin panel.++ Changing currency, shipping zones, languages - it's very easy to do.++ Go to `Admin > Configuration > General Settings`++ <img src="/images/spree_admin_store_settings.png" alt="Spree Admin Store Settings" />+ </Accordion>++ <Accordion title="Configuration">+ Configuration allows you to tweak Spree's behavior without having to modify the source code.++ Spree comes with a handful configuration options you can change:++ | Configuration Key | Description | Default Value |+ |------------------------------------|-------------------------------------------------------------------------------------------------------|---------------------|+ | `allow_checkout_on_gateway_error` | Continues the checkout process even if the payment gateway error failed. | `false` |+ | `address_requires_phone` | Determines whether a phone number is required for Addresses. | `true` |+ | `alternative_shipping_phone` | Determines if an alternative phone number should be present for the shipping address on the checkout page. | `false` |+ | `allow_guest_checkout` | Determines if guests can proceed to checkout without creating an account. | `true` |+ | `always_include_confirm_step` | Determines if the confirmation step is always included in the checkout process, regardless of the payment method. | `false` |+ | `auto_capture` | Depending on whether or not Spree is configured to "auto capture" the credit card, either a purchase or an authorize operation will be performed on the card (via the current credit card gateway). | `false` |+ | `auto_capture_on_dispatch` | Captures payment for each shipment in Shipment#after_ship callback, and makes Shipment.ready when payment authorized. | `false` |+ | `company` | Determines whether or not a field for "Company" displays on the address form. | `false` |+ | `credit_to_new_allocation` | Determines if a new allocation is created anytime store credit is added. If not set, it will update the store credit's amount in place. | `false` |+ | `disable_sku_validation` | Determines if the built-in SKU uniqueness validation is disabled. | `false` |+ | `disable_store_presence_validation` | Determines if Store presence validation for Products and Payment Methods is disabled. | `false` |+ | `expedited_exchanges` | Determines if an exchange shipment is kicked off upon return authorization save. Requires payment profiles to be supported on your gateway and a configured delayed job handler. | `false` |+ | `expedited_exchanges_days_window` | The number of days the customer has to return their item after the expedited exchange is shipped to avoid being charged. | `14` |+ | `restock_inventory` | Determines if inventory should be restocked when an order is canceled or returned | `true` |+ | `return_eligibility_number_of_days` | The number of days after purchase within which a return can be initiated. | `365` |+ | `send_core_emails` | Determines if core emails should be sent. This includes order confirmation and shipment tracking emails. | `true` |+ | `show_products_without_price` | Determines if products without a price are shown in the storefront and Storefront API | `false` |+ | `tax_using_ship_address` | Determines if tax information should be based on shipping address, rather than the billing address. | `true` |+ | `track_inventory_levels` | Determines if inventory levels should be tracked when products are purchased at checkout. This option causes new `InventoryUnit` objects to be created when a product is bought. | `true` |++ To change these you need to edit your `config/initializers/spree.rb` file.++ For example, to disable the `expedited_exchanges` feature, you would add the following line:++ ```ruby+ Spree.config do |config|+ config.expedited_exchanges = false+ end+ ```+ </Accordion>+</AccordionGroup>diff --git a/docs/developer/customization/storefront.mdx b/docs/developer/customization/storefront.mdxnew file mode 100644index 0000000000..3384bd1d5e--- /dev/null+++ b/docs/developer/customization/storefront.mdx@@ -0,0 +1,454 @@+# Storefront++<Note>+This section covers the Rails storefront which was extracted to [`spree_frontend`](https://github.com/spree/spree_rails_frontend) ruby gem.+</Note>++## Styling with SASS variables++Spree 4 under the hood uses [Bootstrap 4](https://getbootstrap.com/docs/4.6/getting-started/theming/) for easy theming with some additional Spree-specific [SASS variables](https://sass-lang.com/documentation/variables).++To make those changes live you need to update SCSS variable files located in your project at `app/assets/stylesheets/spree/frontend/variables/variables.scss`.++### Header++_**$header-background**_ - header background color variable with 2 examples: white and blue one. By default, this is set with a _**$primary-background**_ value but you can replace it with any other value in the variables.scss file.++_**$header-font-color**_- Header font color. By default set with _**$font-color**_ value but you can replace it with any other value in the variables.scss file.++### Footer++_**$footer-background**_ - a variable that overrides $primary-background and allows you to change the footer color. See a white and a blue example below.++_**$footer-font-color**_ - a variable that overrides _**$font-color**_ and allows you to change the footer font color. See black and blue font examples below.++### Meganav menu++_**$meganav-background**_ - a variable that allows you to change the mega nav menu background color. By default the meganav menu is set to a _**$primary-background**_ value but you can replace it with any other value in the variables.scss file.++_**$meganav-font-color**_ - a font color variable in the mega nav menu. By default the mega nav font color is set to a $font-color value but you can replace it with any other value in the variables.scss file.++### Background++_**$primary-background**_ - the main background color across the whole site. There are two examples below, of the white and the black backgrounds. Please note that you can also use an image as a background.++_**$secondary-background**_ - the second background color present across the whole site with examples attached below.++_**$font-color**_ - this variable affects all fonts on the $primary-background. Please see two examples below.++_**$secondary-font-color**_ - this affects all fonts on $secondary-background. By default, it is set with a $font-color value but you can replace it with any other value in the variables.scss file.++### Border color++_**$global-border-style**_ - this affects the border and separator color throughout the whole site++### Fonts++_**$font-family**_ - this sets the font family used across your site. By default, it is in Sans Serif but you can replace it with any other value in the variables.scss file. Check out [these font families](https://websitesetup.org/web-safe-fonts-html-css/) you might use.++### Input fields++_**$input-background**_ - this allows you to set a color for all input field backgrounds across the site. See two examples of a white and a yellow backround below.++_**$second-global-border**_ - this allows you to set a color for all input field borders across the whole site. See an example below with red input field borders.++### Primary color++#### Home page++_**$primary-color**_ variable changes++* The color of the **SHOP NOW** button on the main hero image+* The color of the **Summer 2019** text and **READ MORE** button+* The color of the **NEW COLLECTION** and **SUMMER SALE** headers inside the categories section++#### Search results++_**$primary-color**_ variable changes++* The color of the **No results** icon++#### Mega Menu++_**$primary-color**_ variable changes++* The color of **NEW COLLECTION** and **SUMMER SALE** headers inside the banners++#### PDP++_**$primary-color**_ variable changes++* The color of the **IN STOCK** text+* The color of the **ADD TO CART** button++#### Cart Page++_**$primary-color**_ variable changes++* The color of the **Trash** delete icon for removing items from the cart+* The color of the **CHECKOUT** button++#### Cart pop-up++_**$primary-color**_ variable changes++* The color of the **CHECKOUT** and **VIEW CART** buttons++#### Cart - empty++_**$primary-color**_ variable changes++* The color of the **CONTINUE SHOPPING** button+* The color of the **Empty cart** icon++#### Checkout - Registration Step++_**$primary-color**_ variable changes++* The color of the **LOG IN, SIGN UP** and **CONTINUE AS A GUEST** buttons++#### Checkout - Address step++_**$primary-color**_ variable changes++* The color of the **SAVE AND CONTINUE** button (this element remains the same across the whole checkout process)+* The color of the **Edit** icon++#### Checkout - Payment step++_**$primary-color**_ variable changes++* The color of the **APPLY** button++#### Checkout - Confirm step++_**$primary-color**_ variable changes++* The color of the **PLACE ORDER** button++#### Sign-in page++_**$primary-color**_ variable changes++The color of the **LOG IN** and **SIGN UP** buttons++#### Sign up page++_**$primary-color**_ variable changes++* The color of the **SIGN UP** and **LOG IN** buttons++#### My account page++_**$primary-color**_ variable changes++* The color of the **Edit** and **Trash** icons++#### Edit account page++_**$primary-color**_ variable changes++* The color of the **UPDATE** button++#### Pop-ups++_**$primary-color**_ variable changes++* The color of the **CANCEL** and **OK** buttons++### Secondary color++#### PLP++_**$secondary-color**_ variable changes++* The color of the chosen **color** border variant+* The color of the chosen **size** border variant+* The color of the chosen **length** border variant+* The color of the chosen **price** border variant++#### PDP++_**$secondary-color**_ variable changes++* The color of the chosen **color** border variant+* The color of the chosen **size** border variant+* The color of the chosen **length** border variant+* The color of the chosen **image** border++#### Pop-ups++_**$secondary-color**_ variable changes++* The color of the **Add to bag successfully** icon++Log-in and Sign-in page++_**$secondary-color**_ variable changes++* The color of the **Remember me** checkbox+* The color of the **input: focus**++#### Checkout++_**$secondary-color**_ variable changes++* The color of **individual steps** (box, name step, and guideline) - this element remains the same across the whole checkout process++#### Checkout - Address step++_**$secondary-color**_ variable changes++* The color of the **Use shipping address** checkbox++#### Checkout - Delivery step++_**$secondary-color**_ variable changes++* The color of delivery type radio buttons++#### Checkout - Payment step++_**$secondary-color**_ variable changes++* The color of payment type radio buttons+* The color of payment card radio buttons++#### Order confirmation page++_**$secondary-color**_ variable changes++* The color of the **successful checkmark** icon++### Grid breakpoints++[Grid breakpoint variable](https://github.com/spree/spree/blob/master/frontend/app/assets/stylesheets/spree/frontend/variables/bootstrap-overrides.scss) allows you to slightly change element sizes on various devices. These changes are mostly to images and their scale ratio. Feel free to learn more from the [Bootstrap manual](https://getbootstrap.com/docs/4.0/layout/grid/), though we don’t recommend changing these values unless you really need to.++### Rounding for components++_**$enable-rounded**_ - Enable rounding for components.++Possible values: **true** or **false**++**“True” example**++**“False” example**++### Shadows for components++_**$enable-shadows**_ - Enable shadow for components++Possible values: **true** or **false**++### Gradient for components++_**$enable-gradients**_ - Enable gradient for components++_**$enable-gradients**_ - Enable gradient for components++## Templates++### Importing++You can import all templates from spree frontend into your application using this command (in your application root directory):++```bash+rails g spree:frontend:copy_storefront+```++All of those views will be added to your `app/views` directory under `spree` folder. You can modify them as you wish.++## Assets++### Spree's Asset Pipeline++Spree applications include an `app/assets` directory. We've taken this one step further by subdividing each top level asset directory (images, JavaScript files, stylesheets) into `frontend` and `backend` directories. This is designed to keep assets from the frontend and backend from conflicting with each other.++A typical assets directory for a Spree application will look like:++```+app+|-- assets+ |-- images+ | |-- spree+ | |-- frontend+ | |-- backend+ |-- javascripts+ | |-- spree+ | |-- frontend+ | | |-- all.js+ | |-- backend+ | |-- all.js+ |-- stylesheets+ | |-- spree+ | |-- frontend+ | | |-- all.css+ | |-- backend+ | |-- all.css+```++Spree also generates four top level manifests (all.css & all.js, see above) that require all the core extension's and site specific stylesheets / JavaScript files.++### How core extensions (engines) manage assets++All core engines have been updated to provide four asset manifests that are responsible for bundling up all the JavaScript files and stylesheets required for that engine.++For example, Spree provides the following manifests:++```+vendor+|-- assets+ |-- javascripts+ | |-- spree+ | |-- frontend+ | | |-- all.js+ | |-- backend+ | |-- all.js+ |-- stylesheets+ | |-- spree+ | |-- frontend+ | | |-- all.css+ | |-- backend+ | |-- all.css+```++These manifests are included by default by the relevant all.css or all.js in the host Spree application. For example, `vendor/assets/javascripts/spree/backend/all.js` includes:++```javascript+//= require spree/backend++//= require_tree .+```++External JavaScript libraries, stylesheets and images have also been relocated into vendor/assets.++### Managing your application's assets++Assets that customize your Spree store should go inside the appropriate directories inside `vendor/assets/images/spree`, `vendor/assets/javascripts/spree`, or `vendor/assets/stylesheets/spree`. This is done so that these assets do not interfere with other parts of your application.++### Overriding Spree's assets++Overriding or replacing any of Spree's internal assets is even easier than before. It's recommended to attempt to replace as little as possible in a given JavaScript or stylesheet file to help ease future upgrade work required.++The methods listed below will work for both applications, extensions and themes with one noticeable difference: Extension & theme asset files will not be automatically included (see above for instructions on how to include asset files from your extensions / themes).++### Overriding individual CSS styles++Say for example you want to replace the following CSS snippet:++```css+/* spree/app/assets/stylesheets/spree/frontend/screen.css */++div#footer {+ clear: both;+}+```++You can now just create a new stylesheet inside `your_app/vendor/assets/stylesheets/spree/frontend/` and include the following CSS:++```css+/* vendor/assets/stylesheets/spree/frontend/foo.css */++div#footer {+ clear: none;+ border: 1px solid red;+}+```++The `frontend/all.css` manifest will automatically include `foo.css` and it will actually include both definitions with the one from `foo.css` being included last, hence it will be the rule applied.++### Overriding entire CSS files++To replace an entire stylesheet as provided by Spree you simply need to create a file with the same name and save it to the corresponding path within your application's or extension's `vendor/assets/stylesheets` directory.++For example, to replace `spree/frontend/all.css` you would save the replacement to `your_app/vendor/assets/stylesheets/spree/frontend/all.css`.++This same method can also be used to override stylesheets provided by third-party extensions.++### Overriding individual JavaScript functions++A similar approach can be used for JavaScript functions. For example, if you wanted to override the `show_variant_images` method:++```javascript+ // spree/app/assets/javascripts/spree/frontend/product.js++var show_variant_images = function(variant_id) {+ $('li.vtmb').hide();+ $('li.vtmb-' + variant_id).show();+ var currentThumb = $('#' ++ $("#main-image").data('selectedThumbId'));++ // if currently selected thumb does not belong to current variant,+ // nor to common images,+ // hide it and select the first available thumb instead.++ if(!currentThumb.hasClass('vtmb-' + variant_id) &&+ !currentThumb.hasClass('tmb-all')) {+ var thumb = $($('ul.thumbnails li:visible').eq(0));+ var newImg = thumb.find('a').attr('href');+ $('ul.thumbnails li').removeClass('selected');+ thumb.addClass('selected');+ $('#main-image img').attr('src', newImg);+ $("#main-image").data('selectedThumb', newImg);+ $("#main-image").data('selectedThumbId', thumb.attr('id'));+ }+}+```++Again, just create a new JavaScript file inside `your_app/vendor/assets/javascripts/spree/frontend` and include the new method definition:++```javascript+ // your_app/vendor/assets/javascripts/spree/frontend/foo.js++var show_variant_images = function(variant_id) {+ alert('hello world');+}+```++The resulting `frontend/all.js` would include both methods, with the latter being the one executed on request.++### Overriding entire JavaScript files++To replace an entire JavaScript file as provided by Spree you simply need to create a file with the same name and save it to the corresponding path within your application's or extension's `app/assets/javascripts` directory.++For example, to replace `spree/frontend/all.js` you would save the replacement to `your_app/vendor/assets/javascripts/spree/frontend/all.js`.++This same method can be used to override JavaScript files provided by third-party extensions.++## SEO recommendations++### Sitemap++We highly recommend adding a sitemap to your site. It might affect how Google bot crawls your store pages. There is an official extension called [Spree Sitemap](https://github.com/spree-contrib/spree\_sitemap) for that exact purpose.++1. Per region, language or currency+2. Click the **Edit** button (indicated with a pencil icon) for the right store+3. Enter a title, keywords, and description values for the store homepage+4. Click the **Update** button at the bottom of the page++To set the title, meta keywords, and description for each store **category page (PLP)**, in the admin panel:++1. Go to **Products > Taxonomies**+2. Go into the Categories list by pressing the **Edit** button (pencil icon)+3. Pick the category you’d like to edit by right-clicking (control + click on a Mac) a child in the tree to access the menu for adding, deleting or sorting a child.+4. Click the **Edit** link for that category+5. Replace the default values for title, meta keywords, and description with your own+6. Click the **Update** button at the bottom of the page++You’ll have to edit every category and subcategory to your liking in a similar fashion.++To set the title, meta keywords and description for each **product page (PDP)**, in the admin panel:++1. Go to **Products > Products**+2. In the product list pick the right one by pressing the **Edit** button (pencil icon)+3. While in the Details tab, scroll down and input your values for the title, meta keywords, and description+4. Click the **Update** button at the bottom of the page++### Social sharing and search preview++The new Spree UX has the following social sharing features implemented:++* Facebook sharing with [Open Graph tags](https://ogp.me/) to enable an attractive page preview+* Google visibility with structured data using [Schema.org](http://schema.org/) with [JSON-DL](https://json-ld.org/)++Feel free to [test the Open Graph tags implementation](https://developers.facebook.com/tools/debug/) and the also [test the Schema.org implementation](https://search.google.com/structured-data/testing-tool/u/0/) for your store.diff --git a/docs/developer/deployment/aws.mdx b/docs/developer/deployment/aws.mdxnew file mode 100644index 0000000000..9b5a750fe3--- /dev/null+++ b/docs/developer/deployment/aws.mdx@@ -0,0 +1,36 @@+---+title: Amazon Web Services (AWS)+section: deployment+order: 0+---++# AWS++Amazon Web Services offers reliable, scalable, and inexpensive cloud computing services. Free to join, pay only for what you use.++AWS is also one of the most popular choices for hosting a Spree application. There are several services you can use to host Spree on AWS, here we briefly touch upon those options.++## AWS Elastic Beanstalk++The easiest way to run Spree or any other Ruby on Rails application on AWS is through AWS Elastic Beanstalk which is comparable to Heroku PaaS \(Platform as a Service\).++This is the recommended approach if you're just starting up. Please follow [Beanstalk Deployment guide](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ruby-rails-tutorial.html) for more details.++## AWS ECS++Another option is [Elastic Container Service](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html) to host and deploy your Docker containers.++This is more advanced than Beanstalk and will require DevOps knowledge. For building Docker images we recommend you use [Spree Starter Dockerfile](https://github.com/spree/spree_starter/blob/main/Dockerfile.production).++## AWS EC2++[EC2](https://aws.amazon.com/ec2/) is the most basic offering, running single or multiple instances of servers. This is the bare bones variant, you need to set up the deployment all by yourself using tools like [Capistrano](https://capistranorb.com/).++## Recommended AWS services++* [AWS S3](https://aws.amazon.com/s3/) - object storage service to store and read your uploaded files such as Product images, etc. We **do not recommend** keeping your uploads on the same instance as the application.+* [AWS RDS](https://aws.amazon.com/rds/) - Amazon Relational Database Service \(Amazon RDS\) makes it easy to set up, operate, and scale a relational database in the cloud. Spree works great with multiple databases: [Amazon Aurora \(both MySQL and PostgreSQL variants\)](https://aws.amazon.com/rds/aurora/), [RDS PostgreSQL](https://aws.amazon.com/rds/postgresql/), [RDS MySQL](https://aws.amazon.com/rds/mysql/) and [RDS MariaDB](https://aws.amazon.com/rds/mariadb/)+* [AWS ElastiCache Redis](https://aws.amazon.com/elasticache/redis/?nc=sn&loc=2&dn=1) - we recommend setting up a Redis database for the [Active Job background queue](https://guides.rubyonrails.org/active_job_basics.html), which we use for sending out transactional emails+* [AWS ElastiCache Memcached](https://aws.amazon.com/elasticache/memcached/?nc=sn&loc=2&dn=1) - we recommend using [Memcached as cache storage](https://guides.rubyonrails.org/caching_with_rails.html) to increase the performance and scalability of your Spree application+* [AWS CloudFront](https://aws.amazon.com/cloudfront/) - fast content delivery network \(CDN\) to speed up your asset \(images/stylesheets/javascript\) delivery. This will greatly enhance your application responsiveness.+diff --git a/docs/developer/deployment/heroku.mdx b/docs/developer/deployment/heroku.mdxnew file mode 100644index 0000000000..ef1b5b8639--- /dev/null+++ b/docs/developer/deployment/heroku.mdx@@ -0,0 +1,58 @@+---+title: Heroku+section: deployment+order: 1+---++# Heroku++## Overview++Heroku is a Platform as a Service that makes deploying and hosting Spree applications super easy.++You should just follow [Heroku Rails 6 guide](https://devcenter.heroku.com/articles/getting-started-with-rails6).++We recommend you start and stick to Heroku if you do not have DevOps-skilled team members. [Spree Starter](https://github.com/spree/spree_starter) is pre-configured to work with Heroku out of the box.++## Dynos++[Heroku Dynos](https://www.heroku.com/dynos) are lightweight, isolated environments that provide compute and run your application.++There are 2 types of dynos:++* **Web** - for running the web interface of yuour Store \(Storefront, API, Admin Panel\)+* **Worker** - for running background jobs via [Active Job](https://guides.rubyonrails.org/active_job_basics.html) such as email send out, report generation, etc++### Recommended sizing++| Dynos | Staging environment | Production environment |+| :--- | :--- | :--- |+| **web** | 1 x Standard-2x | 1 x Performance-M or Performance-L |+| **worker** | 1 x Standard-1x | 1 x Standard-1x |++## Add-Ons++[Heroku Add-Ons](https://elements.heroku.com/addons) are tools and services for developing, extending, and operating your app.++### Recommended Add-Ons and plans++| Plan | Staging environment | Production environment |+| :--- | :--- | :--- |+| Bucketeer | Hobbyist | Micro |+| Edge | Hobby | Micro |+| Heroku Postgres | Hobby Basic | Standard-0 |+| Heroku Scheduler | N/A | N/A |+| Memcached Cloud | Free | 1 GB |+| Papertrail | Choklad | Fixa |+| Redis Cloud | Free | 250 MB |+| Scout APM | Free | Free \(small traffic\) or Eldora \(medium traffic\) |+| Sendgrid | Free | Bronze |+| Sentry | Free | Small |++## Other resources++* [https://devcenter.heroku.com/categories/reference](https://devcenter.heroku.com/categories/reference)+* [https://devcenter.heroku.com/articles/getting-started-with-rails6](https://devcenter.heroku.com/articles/getting-started-with-rails6)+* [https://devcenter.heroku.com/categories/monitoring-metrics](https://devcenter.heroku.com/categories/monitoring-metrics)+* [https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server](https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server)+diff --git a/docs/developer/deployment/performance.mdx b/docs/developer/deployment/performance.mdxnew file mode 100644index 0000000000..1d58123874--- /dev/null+++ b/docs/developer/deployment/performance.mdx@@ -0,0 +1,58 @@+---+description: >-+ This guide will cover all sorts of topics related to Spree application+ performance+---++# Performance++## Application++### API++#### OJ gem++We strongly recommend adding [OJ gem](https://github.com/ohler55/oj) to your application.++If you're using [Spree Starter](https://github.com/spree/spree_starter) this gem is already pre-installed and pre-configured. If you're not using Spree Starter you can easily add it yourself - please see this [git commit](https://github.com/spree/spree_starter/commit/e50973be8e8833f5d6eeaa0226f322746a860cd2).++#### Caching configuration++There are several configuration options you can put in `config/initializers/spree.rb` to adjust API caching configuration:++```ruby+Spree::Api::Config[:api_v2_cache_ttl] = 3600 # TTL for cached resources in seconds+```++This is the time when API objects will be available in cache storage. Objects such as Products also auto-expire when they are updated or one of their associated resources \(eg. Variants\) are updated also.++### Background jobs++Sending emails, parsing big amounts of data - it's not recommended to do it in the web process.++We recommend setting up ActiveJob adapter such as [Solid Queue](https://github.com/basecamp/solid_queue) or [Sidekiq](https://github.com/mperham/sidekiq/wiki/Active-Job). Spree Starter users don't need to do anything as it's already pre-configured for them (with Solid Queue).++### Testing locally++To enable caching in the development environment please type in your project directory:++```bash+bin/rails dev cache+```++After that, you will need to restart your webserver / or stop/start docker-compose.++## Infrastructure++### Cache storage engine++We recommend using a distributed cache storage engine such as [Solid Cache](https://github.com/rails/solid_cache), Memcached or Redis. Spree Starter uses Solid Cache by default as it+doesn't require any additional setup or services to be installed.++#### Memcached++Please see the configuration options [detailed in Rails Guides](https://guides.rubyonrails.org/caching_with_rails.html#activesupport-cache-memcachestore).++#### Redis++Please see the configuration options [detailed in Rails Guides](https://guides.rubyonrails.org/caching_with_rails.html#activesupport-cache-rediscachestore).\ No newline at end of filediff --git a/docs/developer/extending-spree/3rd-party-extensions.mdx b/docs/developer/extending-spree/3rd-party-extensions.mdxnew file mode 100644index 0000000000..70263323e5--- /dev/null+++ b/docs/developer/extending-spree/3rd-party-extensions.mdx@@ -0,0 +1,195 @@+---+title: 3rd Party Extensions+description: >-+ Extensions provide additional features and integrations for your Spree+ application. Here's a list of the most popular ones.+---+<AccordionGroup>+ <Accordion title="Content Management">+ <Card+ title="Blogs"+ href="https://github.com/MatthewKennedy/spree_blogs"+ >+ Move your existing Shopify blogs over to Spree bringing all your blog posts and URL's with you.+ </Card>+ </Accordion>++ <Accordion title="Customer Service">+ <Card+ title="Gladly"+ href="https://github.com/upsidelab/spree_gladly"+ >+ Allows you to connect your Spree store with [Gladly](https://www.gladly.com/) service. It allows Gladly agents to see basic information about Spree customers and their orders.+ </Card>+ </Accordion>++ <Accordion title="Internationalization">+ <Card+ title="Flow Commerce"+ href="https://github.com/mejuri-inc/flowcommerce_spree"+ >+ Integration with Flow Commerce API for cross border selling.+ </Card>+ </Accordion>+ <Accordion title="Order Management">+ <Card+ title="Print Invoice"+ href="https://github.com/spree-contrib/spree_print_invoice"+ >+ Create a PDF invoice for Spree orders.+ </Card>+ </Accordion>++ <Accordion title="Marketing">+ <Card+ title="Analytics Trackers"+ href="https://github.com/spree-contrib/spree_analytics_trackers"+ >+ Adds support for Analytics Trackers \(Google Analytics & Segment\).+ </Card>+ <Card+ title="MailChimp E-Commerce"+ href="https://github.com/spree-contrib/spree_mailchimp_ecommerce"+ >+ Full Spree Mailchimp E-Commerce integration.+ </Card>+ <Card+ title="Virtual Gift Card"+ href="https://github.com/ShopFelixGray/spree_virtual_gift_card"+ >+ A virtual gift card solution.+ </Card>+ </Accordion>++ <Accordion title="Marketplaces">+ <Card+ title="Multi Vendor"+ href="https://github.com/spree-contrib/spree_multi_vendor"+ >+ Official marketplace extension. Build your own multi-vendor marketplace in no time.+ </Card>+ <Card+ title="Mirakl"+ href="https://github.com/ShopFelixGray/spree_mirakl_api"+ >+ Spree integration for Mirakl API.+ </Card>+ </Accordion>++ <Accordion title="Payments">+ <Card+ title="Affirm"+ href="https://github.com/Affirm/spree_affirm"+ >+ Affirm payment method.+ </Card>+ <Card+ title="Amazon Pay"+ href="https://github.com/ShopFelixGray/spree_pay_with_amazon"+ >+ Add Pay with Amazon to your Spree Commerce solution.+ </Card>+ <Card+ title="Braintree vzero"+ href="https://github.com/spree-contrib/spree_braintree_vzero"+ >+ Official Spree Braintree + PayPal extension.+ </Card>+ <Card+ title="Mollie"+ href="https://github.com/mollie/spree-mollie-gateway"+ >+ official Mollie payment gateway for Spree Commerce. Accept all major payment methods, including iDEAL, Bancontact, Visa, Mastercard, AmEx, and many more.+ </Card>+ <Card+ title="Stripe Terminal"+ href="https://github.com/ShopFelixGray/spree_stripe_terminal"+ >+ Allows you to process payments with the stripe terminal via the backend of spree.+ </Card>+ </Accordion>++ <Accordion title="Products">+ <Card+ title="Volume Pricing"+ href="https://github.com/spree-contrib/spree_volume_pricing"+ >+ Spree extension which supports sales volume-based pricing \(quantity discounts\).+ </Card>+ <Card+ title="Products Q&A"+ href="https://github.com/TruemarkDev/spree_products_qa"+ >+ Q&A Sections for products. Logged in users can ask a question, and then admins are able to answer it. All answered \(and accepted\) questions are displayed on a product page.+ </Card>+ </Accordion>++ <Accordion title="Search">+ <Card+ title="SearchKick"+ href="https://github.com/spree-contrib/spree_searchkick"+ >+ Adds Elasticsearch integration to Spree, powered by [searchkick](https://github.com/ankane/searchkick) gem enabling full-text searching and advanced product filtering.+ </Card>+ </Accordion>++ <Accordion title="Shipping">+ <Card+ title="EasyPost"+ href="https://github.com/ShopFelixGray/spree_easypost"+ >+ This is an extension to integrate Easy Post into Spree.+ </Card>+ <Card+ title="ShipStation"+ href="https://github.com/MatthewKennedy/spree_shipstation"+ >+ Connect your Spree store with ShipStation, allowing ShipStation to pull shipments from your store, and when a shipment is sent, update the order with a tracking number and mark it as shipped.+ </Card>+ </Accordion>++ <Accordion title="Social">+ <Card+ title="Social Login"+ href="https://github.com/spree-contrib/spree_social"+ >+ Login or signup via Facebook, Twitter, Amazon and other.+ </Card>+ <Card+ title="Reviews"+ href="https://github.com/spree-contrib/spree_reviews"+ >+ Straightforward review/rating functionality.+ </Card>+ </Accordion>++ <Accordion title="Tax Calculation">+ <Card+ title="Avatax"+ href="https://github.com/spree-contrib/spree_avatax_official"+ >+ The new officially certified Spree Avatax \(Avalara\) extension.+ </Card>+ <Card+ title="TaxJar"+ href="https://github.com/spree-contrib/spree_taxjar"+ >+ Spree Taxjar is a US sales tax extension for Spree using the Taxjar service.+ </Card>+ </Accordion>++ <Accordion title="Upselling">+ <Card+ title="Product Assembly"+ href="https://github.com/spree-contrib/spree-product-assembly"+ >+ Adds the ability to make product bundles.+ </Card>+ <Card+ title="Related Products"+ href="https://github.com/spree-contrib/spree_related_products"+ >+ Possible uses: Accessories, Cross Sells, Up Sells, Compatible Products, Replacement Products, Warranty & Support Products.+ </Card>+ </Accordion>+</AccordionGroup>diff --git a/docs/developer/extending-spree/promotions.mdx b/docs/developer/extending-spree/promotions.mdxnew file mode 100644index 0000000000..958106a3cd--- /dev/null+++ b/docs/developer/extending-spree/promotions.mdx@@ -0,0 +1,167 @@+## Overview++In this guide we will show you how to create custom promotion rules and actions in Spree.++### Custom Promotion Actions++<AccordionGroup>+ <Accordion title="1. Ensure proper directory structure">+ Ensure you have the following directory structure:+ ```bash+ mkdir -p app/models/spree/promotion/actions+ ```+ </Accordion>++ <Accordion title="2. Create a new model file">+ Create a new file in `app/models/spree/promotion/actions/` directory+ ```bash+ touch app/models/spree/promotion/actions/my_promotion_action.rb+ ```+ </Accordion>++ <Accordion title="3. Implement your own Logic">+ Implement your custom logic in the `perform` method.+ ```ruby+ module Spree+ module Promotion+ module Actions+ class MyPromotionAction < Spree::PromotionAction+ def perform(options={})+ # Implement your custom logic here+ end+ end+ end+ end+ end+ ```+ <Note>+ This class needs to inherit from `Spree::PromotionAction` model.+ </Note>+ <Info>+ You can access promotion information using the `promotion` method within any `Spree::PromotionAction`.+ </Info>+ </Accordion>++ <Accordion title="4. Register the New Action">+ Register the new action with Spree.+ Open `config/initializers/spree.rb` and add the following line:+ ```ruby+ Rails.application.config.after_initialize do+ Rails.application.config.spree.promotions.actions << Spree::Promotion::Actions::MyPromotionAction+ end+ ```+ Once this has been registered, it will be available within Spree's interface.+ </Accordion>++ <Accordion title="5. Add Translations for the Admin Dashboard">+ To provide translations for the interface, you will need to define them within your locale file. For instance, to define English translations for your new promotion action, use this code within `config/locales/en.yml`:++ ```yaml+ en:+ spree:+ promotion_action_types:+ my_promotion_action:+ name: My Promotion Action+ description: Performs my promotion action.+ ```+ </Accordion>++ <Accordion title="6. Restart Your Application">+ After making these changes, restart your application. Your custom promotion action will now be available within Spree's admin interface, ready for use in your promotions.+ </Accordion>+</AccordionGroup>++### Custom Promotion Rules++<AccordionGroup>+ <Accordion title="1. Ensure proper directory structure">+ Ensure you have the following directory structure:+ ```bash+ mkdir -p app/models/spree/promotion/rules+ ```+ </Accordion>++ <Accordion title="2. Create a new model file">+ Create a new file in `app/models/spree/promotion/rules/` directory:++ ```bash+ touch app/models/spree/promotion/rules/my_promotion_rule.rb+ ```+ </Accordion>++ <Accordion title="3. Implement your own Logic">+ Implement your logic within this class as shown below:++ ```ruby+ module Spree+ class Promotion+ module Rules+ class MyPromotionRule < Spree::PromotionRule+ def applicable?(promotable)+ promotable.is_a?(Spree::Order)+ end++ def eligible?(order, options = {})+ # Your custom eligibility logic here+ end++ def actionable?(line_item)+ # Your custom actionability logic here+ end+ end+ end+ end+ end+ ```++ <Note>+ This class needs to inherit from `Spree::PromotionRule` model.+ </Note>++ <Note>+ The <code>eligible?</code> method should return <code>true</code> or <code>false</code> to indicate if the promotion should be eligible for an order, based on your custom logic. Similarly, define <code>actionable?</code> to evaluate line items against your promotion criteria.+ </Note>+ </Accordion>++ <Accordion title="4. Register the Custom Rule">+ To make your custom rule available, register it within Spree by adding the following block to your `config/initializers/spree.rb` file:++ ```ruby+ Rails.application.config.after_initialize do+ Rails.application.config.spree.promotions.rules << Spree::Promotion::Rules::MyPromotionRule+ end+ ```++ This step ensures that your custom rule is recognized and can be utilized within the Spree ecosystem.+ </Accordion>++ <Accordion title="5. Create Promotion Rule view template">++ Create a partial for your new rule:++ ```bash+ touch app/views/spree/admin/promotions/rules/_my_promotion_rule.html.erb+ ```++ This file can either be simple or complex based on whether your rule requires parameters for configuration.++ For guidance, refer to existing rule partials in Spree's backend sources to understand how to structure this file.+ </Accordion>++ <Accordion title="6. Add Translations for the Admin Dashboard">+ To display your rule within the Spree admin interface, define its name and description in your locale files. For English, edit `config/locales/en.yml` and add:++ ```yaml+ en:+ spree:+ promotion_rule_types:+ my_promotion_rule:+ name: "My Promotion Rule"+ description: "Custom rule for my promotion"+ ```+ </Accordion>++ <Accordion title="7. Restart Your Application">+ After making these changes, restart your application. Your custom promotion rule will now be available within Spree's admin interface, ready for use in your promotions.+ </Accordion>+</AccordionGroup>diff --git a/docs/developer/getting-started/quickstart.mdx b/docs/developer/getting-started/quickstart.mdxnew file mode 100644index 0000000000..69d9fd8bde--- /dev/null+++ b/docs/developer/getting-started/quickstart.mdx@@ -0,0 +1,100 @@+---+title: Quickstart+description: 'Start building awesome e-commerce applications with Spree'+---++<img+ className="block dark:hidden"+ src="/images/spree_header_978-2x.png"+/>+<img+ className="hidden dark:block"+ src="/images/spree_header_978-2x.png"+/>++## Getting Started with Spree Commerce++Welcome to the Spree Commerce documentation guide. Follow the instructions below to learn how to build and deploy your Spree Commerce store.++### 1. Installing Spree++<AccordionGroup>+ <Accordion icon="github" title="Creating Your Spree Repository">++ To create your Spree store repository please, follow these instructions:++ [Use Spree starter template](https://github.com/new?template_name=spree_starter&template_owner=spree) to create your own repository++ </Accordion>++ <Accordion icon="rectangle-terminal" title="Setting up Your Development Environment">++ <Note>+ If you're on Windows remember to [install the Linux subsystem](https://docs.microsoft.com/en-us/windows/wsl/install-win10) before proceeding.+ </Note>++ 1. Install [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [Ruby](https://www.ruby-lang.org/en/installation/)+ 2. Once git is installed, clone your docs repository using++ ```basgh+ git clone <your-repo>+ ```++ <Info>+ If you haven't set it up yet, now would be a good time to do so with these [SSH keys](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)+ </Info>++ 3. Open a terminal and go to the repository directory+ 4. Run setup commands:++ ```bash+ bin/setup+ ```+ 5. And finally start the development server with:++ ```bash+ bin/rails s+ ```+ </Accordion>++ <Accordion icon="box" title="Adding sample data">++ To add sample data to your store, run:++ ```bash+ bin/rake spree_sample:load+ ```++ This will add a some products, categories, and will setup a checkout flow to your store.+ </Accordion>+</AccordionGroup>++### 2. Exploring Your Store++Feel free to explore your store. You can do so because Spree comes with a default pre-built Storefront and Admin Panel.++<AccordionGroup>+ <Accordion icon="key" title="Logging into the Admin Dashboard">+ Use your browser window to navigate to [http://localhost:3000/admin](http://localhost:3000/admin). You can log in with the default credentials:+ - login: `[email protected]`+ - password: `spree123`++ Upon successful authentication, you should see the admin screen:++ ++ Feel free to explore some of the Admin Panel features that Spree has to offer and to verify that your installation is working properly.+ </Accordion>++ <Accordion icon="palette" title="Browsing Storefront">++ Spree comes with a default pre-built Storefront. You can access it by navigating to [http://localhost:3000](http://localhost:3000).++ You can later customize this Storefront or choose another one if you prefer Next.js or Vue.js.++ </Accordion>+</AccordionGroup>++### All Done!++Congrats! You've set up your Spree Commerce and it's looking amazing! Need support or want to give some feedback? You can join our [community](https://slack.spreecommerce.org/) or drop us an email at [[email protected]](mailto:[email protected]).diff --git a/docs/developer/security/api.mdx b/docs/developer/security/api.mdxnew file mode 100644index 0000000000..ad1d427d1c--- /dev/null+++ b/docs/developer/security/api.mdx@@ -0,0 +1,18 @@+---+title: API+section: security+order: 3+---++# API++<Warning>+This section is only applicatable to API v1+</Warning>++The REST API behaves slightly differently than a standard user. First, an admin has to create the access key before any user can query the REST API. This includes generating the key for the admin him/herself. This is not the case if `Spree::Api::Config[:requires_authentication]` is set to `false`.++In cases where `Spree::Api::Config[:requires_authentication]` is set to `false`, read-only requests in the API will be possible for all users. For actions that modify data within Spree, a user will need to have an API key and then their user record would need to have permission to perform those actions.++It is up to you to communicate that key. As an added measure, this authentication has to occur on every request made through the REST API as no session or cookies are created or stored for the REST API.+diff --git a/docs/developer/security/authentication_and_authorization.mdx b/docs/developer/security/authentication_and_authorization.mdxnew file mode 100644index 0000000000..229dbbca30--- /dev/null+++ b/docs/developer/security/authentication_and_authorization.mdx@@ -0,0 +1,33 @@+---+title: Authentication and Authorization+section: security+order: 2+---++# Authentication & authorization++If you install spree\_auth\_devise when setting up your app, we use a third party authentication library for Ruby known as [Devise](https://github.com/plataformatec/devise). This library provides a host of useful functionality that is in turn available to Spree, including the following features:++* Authentication+* Strong password encryption \(with the ability to specify your own algorithms\)+* "Remember Me" cookies+* "Forgot my password" emails+* Token-based/oAuth 2.0 access \(for REST API\)++## Devise Configuration++ A default Spree install comes with the \[Spree Auth Devise\]\(https://github.com/spree/spree\_auth\_devise\) gem, which provides authentication for Spree using Devise. This section of the guide covers the default setup. If you're using your own authentication, please consult the manual for that authentication engine.++We have configured Devise to handle only what is needed to authenticate with a Spree site. The following details cover the default configurations:++* Passwords are stored in the database encrypted with the salt.+* User authentication is done through the database query.+* User registration is enabled and the user's login is available immediately \(no validation emails\).+* There is a remember me and password recovery tool built in and enabled through Devise.++These configurations represent a reasonable starting point for a typical e-commerce site. Devise can be configured extensively to allow for a different feature set but that is currently beyond the scope of this document. Developers are encouraged to visit the [Devise wiki](https://github.com/plataformatec/devise/wiki) for more details.++## Authorization++Please refer to [Permissions Customization guide](../customization/permissions) for more information.+diff --git a/docs/developer/security/index.mdx b/docs/developer/security/index.mdxnew file mode 100644index 0000000000..2db68f0fc5--- /dev/null+++ b/docs/developer/security/index.mdx@@ -0,0 +1,33 @@+# General guidelines++## Overview++Proper application design, intelligent programming, and secure infrastructure are all essential in creating a secure e-commerce store using any software (Spree included). The Spree team has done its best to provide you with the tools to create a secure and profitable web presence, but it is up to you to take these tools and put them in good practice. We highly recommend reading and understanding the [Rails Security Guide](http://guides.rubyonrails.org/security.html).++## Supported Versions++This is a list of all Spree versions currently being supported by the Spree team.++| Version | Release date | EOL date |+| ------- | ------------ | ---------- |+| 4.4 | 26.01.2022 | 26.07.2023 |+| 4.3 | 14.09.2021 | 14.03.2023 |+| 4.2 | 23.02.2021 | 23.08.2022 |++If you're using an older version [please upgrade](../upgrades/upgrades/). Have trouble upgrading? [Contact us for support](https://spreecommerce.org/contact/).++Or you can migrate once to [Spree as a Service](https://spreecommerce.org/spree-as-a-service/) and forget about upgrades altogether!++**Versions that aren't supported will not receive any security patches and fixes!**++## Reporting Security Issues++Please do not announce potential security vulnerabilities in public. We have a dedicated email address [[email protected]](mailto:[email protected]). We will work quickly to determine the severity of the issue and provide a fix for the appropriate versions. We will credit you with the discovery of this patch by naming you in a blog post.++If you would like to provide a patch yourself for the security issue **do not open a pull request for it**. Instead, create a commit on your fork of Spree and run this command:++```bash+git format-patch HEAD~1..HEAD --stdout > patch.txt+```++This command will generate a file called `patch.txt` with your changes. Please email a description of the patch along with the patch itself to our [dedicated email address](mailto:[email protected]).diff --git a/docs/developer/security/pci_compliance.mdx b/docs/developer/security/pci_compliance.mdxnew file mode 100644index 0000000000..6c1818fbc0--- /dev/null+++ b/docs/developer/security/pci_compliance.mdx@@ -0,0 +1,13 @@+# PCI Compliance++All store owners wishing to process credit card transactions should be familiar with [PCI Compliance](http://en.wikipedia.org/wiki/Pci\_compliance). [Spree Gateway Stripe integration](https://github.com/spree/spree\_gateway) and [Spree Braintree vzero](https://github.com/spree-contrib/spree\_braintree\_vzero) are PCI-compliant.++### Using payment tokens++We do not transmit or store Credit Card numbers. Instead we're using payment processor tokens supplied by their SDKs to authorize and charge customer cards.++### 3-D Secure and Strong Customer Authentication support++[Spree Gateway Stripe integration](https://github.com/spree/spree\_gateway) supports [Strong Customer Authentication (SCA)](https://stripe.com/en-pl/guides/strong-customer-authentication) out of the box. Remember to use S**tripe Elements** gateway with **Payment Intents** option enabled.++[Spree Braintree vzero](https://github.com/spree-contrib/spree\_braintree\_vzero) extension supports [3D Secure 2.0](https://developers.braintreepayments.com/guides/3d-secure/overview).diff --git a/docs/developer/storefronts/next.js-commerce.mdx b/docs/developer/storefronts/next.js-commerce.mdxnew file mode 100644index 0000000000..9834301dbb--- /dev/null+++ b/docs/developer/storefronts/next.js-commerce.mdx@@ -0,0 +1,22 @@+# Next.js Commerce++[Next.js Commerce](https://nextjs.org/commerce) is an all-in-one React starter kit for high-performance e-commerce sites.++See the live demo: [https://spree.vercel.store/](https://spree.vercel.store/)++### Installation++1. Clone the git repository:++ ```+ git clone https://github.com/spree/nextjs-commerce.git+ ```+2. Copy the `framework/spree/.env.template` file to `.env.local` in the main directory:++ ```+ cp framework/spree/.env.template .env.local+ ```+3. Adjust the `NEXT_PUBLIC_SPREE_CATEGORIES_TAXONOMY_PERMALINK` and `NEXT_PUBLIC_SPREE_BRANDS_TAXONOMY_PERMALINK` environment variables inside `.env.local`:+ * They rely on [taxonomies](https://developer/core-concepts/products#taxons-and-taxonomies) `permalink` values set in Spree.+ * Go to the Spree admin panel and create `Categories` and `Brands` taxonomies if they don't exist. Copy their permalinks into `.env.local` in NextJS Commerce.+4. Finally, run `yarn install` and `yarn run dev`.diff --git a/docs/developer/storefronts/vue-storefront.mdx b/docs/developer/storefronts/vue-storefront.mdxnew file mode 100644index 0000000000..78433e0732--- /dev/null+++ b/docs/developer/storefronts/vue-storefront.mdx@@ -0,0 +1,43 @@+# Vue Storefront++<Note>+This integration was built by the awesome Team at [Upside](https://upsidelab.io/) [❤️](https://emojipedia.org/red-heart/)+</Note>++[Vue Storefront](https://www.vuestorefront.io/) is a lightning-fast frontend platform for headless eCommerce solutions. It comes with both reusable components to build custom storefronts and a default theme that allows developers to effortlessly create an eCommerce frontend.++See the live demo: [https://vuestorefront-spree.upsidelab.io/](https://vuestorefront-spree.upsidelab.io/)++### Installation++1. Clone the git repository:++```bash+git clone https://github.com/upsidelab/vue-storefront-spree.git+```++2\. Install the required dependencies:++```bash+yarn install+```++3\. Set the backend URL via env variable:++```bash+export BACKEND_URL=https://localhost:4000+```++4\. (optional) Then you can verify if everything works properly by building all three projects:++```bash+yarn build+```++5\. If everything is built properly, you can start working on your new frontend with:++```bash+yarn dev+```++For more configurtion options please visit the Spree [VueStorefront GitHub repository](https://github.com/vuestorefront/spree).diff --git a/docs/developer/upgrades/index.mdx b/docs/developer/upgrades/index.mdxnew file mode 100644index 0000000000..ca23c304e1--- /dev/null+++ b/docs/developer/upgrades/index.mdx@@ -0,0 +1,42 @@+---+title: Upgrading Spree+section: upgrades+order: 0+---++# How to perform upgrades++## Overview++Keeping your Spree installation up-to-date is essential to keep it safe and secure. Each Spree version brings new features, enhancements and bug fixes so it's greatly beneficial for you and your clients to upgrade frequently.++The upgrade process is fairly easy and well described. Of course, it all boils down to the level of customizations and the way you've customized your Spree applications.++We strongly advise upgrading Spree incrementally, rather than in one big go.++## Support++If you're stuck and would want to get some professional help, you can [contact us directly](https://spreecommerce.org/contact/) and request a quote for our consulting services.++## Release types++Spree development follows a shifted version of [Semantic Versioning](https://semver.org/):++**Patch Z, eg. 4.2.1**++Only bug fixes, no API changes, no new features. Except as necessary for security fixes.++**Minor Y, eg. 4.2.0**++New features, may contain API changes \(Serve as major versions of Semver\). Breaking changes are paired with deprecation notices in the previous minor or major release.++**Major X, eg. 4.0.0**++New features, will likely contain API changes. The difference between Spree minor and major releases is the magnitude of breaking changes and is usually reserved for special occasions.++## Security++Our Security policy is [described here](https://docs.spreecommerce.org/security).++When a release series is no longer supported, it's your own responsibility to deal with bugs and security issues. We may provide backports of some critical security fixes.+diff --git a/docs/developer/upgrades/upgrades/4.3-to-4.4.mdx b/docs/developer/upgrades/upgrades/4.3-to-4.4.mdxnew file mode 100644index 0000000000..51ab8bc22f--- /dev/null+++ b/docs/developer/upgrades/upgrades/4.3-to-4.4.mdx@@ -0,0 +1,145 @@+---+description: This guide covers upgrading a 4.3 Spree application to Spree 4.4.+---++# 4.3 to 4.4++If you have any questions or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/)++**If you're on an older version than 4.3 please follow previous upgrade guides and perform those upgrades incrementally**, eg.++1. [upgrade 4.0 to 4.1](four-dot-oh-to-four-dot-one)+2. [upgrade 4.1 to 4.2](four-dot-one-to-four-dot-two)+3. [upgrade 4.2 to 4.3](fout-dot-two-to-four-dot-three)++This is the safest and recommended method.++## Update Gemfile++```ruby+gem 'spree', '>= 4.4.0.rc1'+```++## Remove gems merged into Spree Core++### (Optional) Remove Spree Digital++If you used that gem in the past you need to remove it. Digital products are now incorporated into Spree core and you cannot use that gem anymore.++1. Remove `spree_digital` from your `Gemfile`++### (Optional) Remove Spree Wishlist++If you used that gem in the past you need to remove it. Wishlists are now incorporated into Spree core and you cannot use that gem anymore.++1. Remove `spree_wishlist` from your `Gemfile`+2. (Optional) Remove `//= require spree/frontend/spree_wishlist` from `vendor/assets/javascripts/spree/frontend/all.js`+3. (Optional) Remove `*= require spree/frontend/spree_wishlist` from `vendor/assets/stylesheets/spree/frontend/all.css`++## Update gems++```bash+bundle update+```++## Install missing migrations++```bash+bin/rake railties:install:migrations+```++## Run migrations++```bash+bin/rails db:migrate+```++## Update Spree Dashboard (`spree_backend`)++### Update Gemfile++```ruby+gem 'spree_backend', '>= 4.4.0.rc1'+```++### Update gems++```shell+bundle update+```++### Install `jsbundling-rails` gem++`spree_backend` 4.4 uses [Hotwire (Turbo and Stimulus)](https://hotwired.dev/) and requires some javascript bundling provided by the excellent [jsbundling-rails](https://github.com/rails/jsbundling-rails) gem developed by the Rails core team.++This requires that you have both Node and yarn installed on your system.++```bash+bin/rails javascript:install:esbuild+```++### Install `@spree/dashboard` NPM package++JavaScript required by the `spree_backend` gem is distributed as [a NPM package](https://www.npmjs.com/package/@spree/dashboard).++```+bin/rails g spree:backend:install+```++From now on when you run your app locally you need to use `bin/dev` instead of `bin/rails s`.++### Make sure that Node is available in your cloud environment++On Heroku, you need to add the node buildpack - [https://devcenter.heroku.com/articles/buildpacks#using-multiple-buildpacks](https://devcenter.heroku.com/articles/buildpacks#using-multiple-buildpacks)++## Additional fixes and hints++### Add ActiveJob queues++Spree uses ActiveJob for processing long running operations to not interrupt your web server performance. You need to update your `config/sidekiq.yml` file if you're using the Sidekiq gem.++Make sure that `spree_stock_location_stock_items` and `spree_webhooks` queues are there. You can check [spree\_starter's config](https://github.com/spree/spree\_starter/blob/main/config/sidekiq.yml) as a guideline.++### Disabling webhooks++Spree 4.4 introduces webhook events for most of the Spree resources (Products, Orders, Customers, etc). If you wish to disable this globally you can set the environment variable:++```+DISABLE_SPREE_WEBHOOKS=true+```++If you would like to disable firing webhooks for certain elements of your application you can wrap these methods in a block:++```+Spree::Webhooks.disable_webhooks do+ ... run your code here ...+end+```++Webhooks do not fire on touch events. Webhooks also do not do anything until there is a first webhook subscriber created which can be done in the Admin Dashboard or via Platform API.++### Update Spree SDK++To use the new features such as Wishlists and Digital Products in your storefront please update [Spree SDK](https://github.com/spree/spree-storefront-api-v2-js-sdk) to [v4.12](https://github.com/spree/spree-storefront-api-v2-js-sdk/releases/tag/v4.12.0) at least.++### Update Spree Dependencies that was renamed++Please change in your codebase:++```ruby+Spree::Dependencies.account_update_address_service+```++to++```ruby+Spree::Dependencies.address_update_service+```++## Read the release notes++For information about changes contained within this release, please read the [CHANGELOG](https://github.com/spree/spree/blob/master/CHANGELOG).++## More info++If you have any questions or suggestions feel free to [contact us via email](https://spreecommerce.org/contact) or through [Spree slack channels](http://slack.spreecommerce.org/)diff --git a/docs/developer/upgrades/upgrades/4.4-to-4.5.mdx b/docs/developer/upgrades/upgrades/4.4-to-4.5.mdxnew file mode 100644index 0000000000..72a52e6658--- /dev/null+++ b/docs/developer/upgrades/upgrades/4.4-to-4.5.mdx@@ -0,0 +1,115 @@+---+description: This guide covers upgrading a 4.4 Spree application to Spree 4.5.+---++# 4.4 to 4.5++**If you're on an older version than 4.4 please follow previous upgrade guides and perform those upgrades incrementally**, eg.++1. [upgrade 4.1 to 4.2](four-dot-one-to-four-dot-two)+2. [upgrade 4.2 to 4.3](fout-dot-two-to-four-dot-three)+3. [upgrade 4.3 to 4.4](https://docs.spreecommerce.org/developer/upgrades/upgrades/4.3-to-4.4)++This is the safest and recommended method.++## Upgrade Rails++Rails 6.0 is no longer supported - if you haven’t already, you’ll need to upgrade to **Rails 6.1 or 7.0**. The effort to upgrade to Rails 6.1 is relatively low, but brings a lot of improvements around ActiveStorage and handling of CDNs. See the Rails docs [for upgrading from 6.0 to 6.1](https://edgeguides.rubyonrails.org/upgrading\_ruby\_on\_rails.html#upgrading-from-rails-6-0-to-rails-6-1), and for [upgrading from 6.1 to 7.0](https://edgeguides.rubyonrails.org/upgrading\_ruby\_on\_rails.html#upgrading-from-rails-6-1-to-rails-7-0).++If using Rails 7, you will need to [install libvips](https://www.libvips.org/install.html) on your cloud environment, as Rails 7 uses vips as its default variant processor. You can still use imagemagick, but you’ll need to manually set it in your [Rails config](https://edgeapi.rubyonrails.org/classes/ActiveStorage/Variant.html).++## Update Spree Config++If you're upgrading your app to Rails 7, you'll need to make a slight update to your spree config initializer. In `config/initializers/spree.rb`, wrap the `Spree.config` block in a `Rails.application.config.after_initialize` block, like so:++```+Rails.application.config.after_initialize do+ Spree.config do |config|+ # config settings initialized here+ end+end+```++If you don't perform this update to the code, you may expect to get the following error:++```shell+/lib/spree/core/preferences/store.rb:96:in `should_persist?':+uninitialized constant Spree::Preference (NameError)+```++## Update other initializers++Just like with Spree::Config, you may need to [update other intializers in your application, that use autoloadable constants](https://rubyonrails.org/2021/9/3/autoloading-in-rails-7-get-ready).++For example, if you use `spree_auth_devise`, you'll need to update `config/initializers/devise.rb` and wrap the configuration in `Rails.application.config.after_initialize` block:++```+Rails.application.config.after_initialize do+ if defined?(Spree::Auth)+ Spree::Auth::Config.signout_after_password_change = false+ end+end+```++## Update Gemfile++```+gem 'spree', '>= 4.5.0'+```++Update all other spree gems used in your application to 4.5.0 or version compatible with 4.5:++```+gem 'spree_sample', '~> 4.5.0'+gem 'spree_emails', '~> 4.5.0'+gem 'spree_frontend', '>= 4.5.0'+gem 'spree_backend', '>= 4.5.0'+gem 'spree_gateway', '~> 3.10'+gem 'spree_auth_devise', '>= 4.5.0'+gem 'spree_i18n', '~> 5.1'+```++If your application depends on the Spree v1 API, you'll have to include it as a gem, as it has been extracted from the spree gem:++```+gem 'spree_api_v1'+```++## Update gems++```bash+bundle update+```++## Install missing migrations++```bash+bin/rake railties:install:migrations+```++## Run migrations++```bash+bin/rails db:migrate+```++## Run Additional Commands for Frontend++If using [Spree Frontend](https://github.com/spree/spree\_legacy\_frontend), run the following additional commands to get everything set up correctly with the updated gems:++```+bin/rails javascript:install:esbuild+bin/rails turbo:install+bin/rails g spree:frontend:install+yarn build+```++And that's a wrap! :tada:++## Read the release notes++For information about changes contained within this release, please read the[ Spree 4.5.0 Release Notes](https://github.com/spree/spree/releases/tag/v4.5.0).++## More info++If you have any questions, issues or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/).diff --git a/docs/developer/upgrades/upgrades/4.5-to-4.6.mdx b/docs/developer/upgrades/upgrades/4.5-to-4.6.mdxnew file mode 100644index 0000000000..c1e4b76802--- /dev/null+++ b/docs/developer/upgrades/upgrades/4.5-to-4.6.mdx@@ -0,0 +1,82 @@+---+description: This guide covers upgrading a 4.5 Spree application to Spree 4.6.+---++# 4.5 to 4.6++**If you're on an older version than 4.5 please follow previous upgrade guides and perform those upgrades incrementally, e.g.**++1. [upgrade 4.2 to 4.3](fout-dot-two-to-four-dot-three)+2. [upgrade 4.3 to 4.4](https://docs.spreecommerce.org/developer/upgrades/upgrades/4.3-to-4.4)+3. [upgrade 4.4 to 4.5](4.4-to-4.5)++This is the safest and recommended method.++## Update Gemfile++```+gem 'spree', '>= 4.6.0'+```++Update all other spree gems used in your application to 4.6.0 or version compatible with 4.6:++```+gem 'spree_sample', '~> 4.6.0'+gem 'spree_emails', '~> 4.6.0'+gem 'spree_frontend', '>= 4.6.0'+gem 'spree_backend', '>= 4.6.0'+gem 'spree_gateway', '~> 3.10'+gem 'spree_auth_devise', '>= 4.5.0'+gem 'spree_i18n', '~> 5.1'+```++## (Optional) Remove spree\_globalize++If your application used the spree\_globalize extension, you can remove it from your Gemfile, as translations are now supported out-of-the-box with the [Mobility](https://github.com/shioyama/mobility) gem.++We've configured Mobility to use [a strategy that uses a separate table to store translations](https://dejimata.com/2017/3/3/translating-with-mobility#strategy-2), just like how spree\_globalize did. This means, you won't need to make any changes to the database structure or migrate data.++During the upgrade process, you may need to review your custom queries that rely on translations, as there are minor differences in how Mobility handles them. Spree 4.6 includes a few [built-in concerns](../../customization/i18n) to make it easier to work with translatable models.++## Update gems++```bash+bundle update+```++## Install missing migrations++```bash+bin/rake railties:install:migrations+```++## Run migrations++```bash+bin/rails db:migrate+```++Note: If you didn't use spree\_globalize before, this will install migrations that move some columns from spree\_products, spree\_taxons, to dedicated translation tables -> spree\_products\_translations, spree\_taxons\_translations etc.++If you're using raw SQL queries (either in the application code, or running in external tools), you may need to review the new structure and update your queries accordingly.++## Run Additional Commands for Frontend++If using [Spree Frontend](https://github.com/spree/spree\_legacy\_frontend), run the following additional commands to get everything set up correctly with the updated gems:++```+bin/rails javascript:install:esbuild+bin/rails turbo:install+bin/rails g spree:frontend:install+yarn build+```++And that's a wrap! :tada:++## Read the release notes++For information about changes contained within this release, please read the [Spree 4.6.0 Release Notes](https://github.com/spree/spree/releases/tag/v4.6.0).++## More info++If you have any questions, issues or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/).diff --git a/docs/developer/upgrades/upgrades/4.6-to-4.7.mdx b/docs/developer/upgrades/upgrades/4.6-to-4.7.mdxnew file mode 100644index 0000000000..fd01cfc5d6--- /dev/null+++ b/docs/developer/upgrades/upgrades/4.6-to-4.7.mdx@@ -0,0 +1,84 @@+---+description: This guide covers upgrading a 4.6 Spree application to Spree 4.7.+---++# 4.6 to 4.7++**If you're on an older version than 4.6 please follow previous upgrade guides and perform those upgrades incrementally, e.g.**++1. [upgrade 4.3 to 4.4](https://docs.spreecommerce.org/developer/upgrades/upgrades/4.3-to-4.4)+2. [upgrade 4.4 to 4.5](4.4-to-4.5)+3. [upgrade 4.5 to 4.6](4.5-to-4.6)++This is the safest and recommended method.++## Update Gemfile++```ruby+gem 'spree', '~> 4.7.0'+```++Update all other spree gems used in your application to 4.7.0 or version compatible with 4.7:++```ruby+gem 'spree_sample', '~> 4.7.0'+gem 'spree_emails', '~> 4.7.0'+gem 'spree_backend', '~> 4.7.0'+gem 'spree_frontend', '~> 4.7.0'+gem 'spree_gateway', '~> 3.10.0'+gem 'spree_auth_devise', '~> 4.6.0'+gem 'spree_i18n', '~> 5.3.0'+```++<Warning>+If your Gemfile includes spree\_frontend, make sure it's defined below spree\_backend. This is required for a proper initialization of the admin action buttons defined by spree\_frontend.+</Warning>++## (Optional) Upgrade to Rails 7.1++Spree 4.7 brings support for Rails 7.1 - to receive security patches we recommend upgrading Rails version to the latest one.++```ruby+gem 'rails', '~> 7.1.0'+```++After upgrading to Rails 7.1, you may need to update your code to be compatible with the new release of Rails. Follow the official [Rails 7.1 Release Notes](https://edgeguides.rubyonrails.org/7\_1\_release\_notes.html) for more information on new features introduced in that release as well as on breaking changes.++## Update gems++```bash+bundle update+```++## Install missing migrations++```bash+bin/rake railties:install:migrations+```++## Run migrations++```bash+bin/rails db:migrate+```++## Run Additional Commands for Frontend++If using [Spree Frontend](https://github.com/spree/spree\_legacy\_frontend), run the following additional commands to get everything set up correctly with the updated gems:++```+bin/rails javascript:install:esbuild+bin/rails turbo:install+bin/rails g spree:frontend:install+yarn build+```++And that's a wrap! :tada:++## Read the release notes++For information about changes contained within this release, please read the [Spree 4.7.0 Release Notes.](https://github.com/spree/spree/releases/tag/v4.7.0)++## More info++If you have any questions, issues or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/).diff --git a/docs/developer/upgrades/upgrades/four-dot-oh-to-four-dot-one.mdx b/docs/developer/upgrades/upgrades/four-dot-oh-to-four-dot-one.mdxnew file mode 100644index 0000000000..12e630ea87--- /dev/null+++ b/docs/developer/upgrades/upgrades/four-dot-oh-to-four-dot-one.mdx@@ -0,0 +1,120 @@+---+title: Upgrading Spree 4.0 to 4.1+section: upgrades+order: 1+description: This guide covers upgrading a 4.0 Spree application to Spree 4.1.+---++# 4.0 to 4.1++If you have any questions or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/)++**If you're on an older version than 4.0 please follow previous upgrade guides and perform those upgrades incrementally**, eg.++1. [upgrade 3.3 to 3.4](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-three-to-three-dot-four)+2. [upgrade 3.4 to 3.5](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-four-to-three-dot-five)+3. [upgrade 3.5 to 3.6](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-five-to-three-dot-six)+4. [upgrade 3.6 to 3.7](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-six-to-three-dot-seven)+5. [upgrade 3.7 to 4.0](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-seven-to-four-dot-oh)++This is the safest and recommended method.++## Update Gemfile++```ruby+gem 'spree', '~> 4.1'+gem 'spree_gateway', '~> 3.9'+```++## Run `bundle update`++## Install missing migrations++```bash+rails spree:install:migrations+```++## Run migrations++```bash+rails db:migrate+```++## Decide what to do next++You have two options:++1. Migrate to the new Storefront UI+2. Stay at the current UI++## Migrate to the new Storefront UI++Spree 4.1 comes with a completely new mobile-first ultra-fast Storefront powered by Turbolinks.++To replace your current frontend with the new Spree UI follow these steps:++1. Update Spree Auth Devise to 4.1 in your `Gemfile`++ ```ruby+ gem 'spree_auth_devise', '~> 4.1'+ ```++2. In your project root directory run:++ ```bash+ rails g spree:frontend:copy_storefront+ ```++ **WARNING** this will overwrite your current project templates, it's required for the new UI, so if you'll be asked by the generator what to do please choose **A** to proceed++3. Next, you will need to copy over two files:+ * [spree\_storefront.rb](https://raw.githubusercontent.com/spree/spree/master/core/lib/generators/spree/install/templates/config/initializers/spree_storefront.rb) to `config/initializers/spree_storefront.rb`+ * [spree\_storefront.yml](https://raw.githubusercontent.com/spree/spree/master/core/lib/generators/spree/install/templates/config/spree_storefront.yml) to `config/spree_storefront.yml`+4. If you overwrote any `spree_frontend` [controllers](https://github.com/spree/spree/tree/master/frontend/app/controllers) you will need to either remove your local copies or move your custom logic to [decorators](../../customization/logic#extending-controllers)+5. The same goes for [helpers](https://github.com/spree/spree/tree/master/frontend/app/helpers/spree)+6. You will also need to remove this line:++ ```javascript+ //= require spree/frontend/spree_auth+ ```++ from `vendor/assets/javascripts/spree/frontend.all.js` file++## Stay at the current UI++If you wish to not move to the new Storefront UI it's still an option. Just proceed with the steps described below.++1. Keep Spree Auth Devise at the version you're currently using++ If you're using Spree Auth Devise gem you need to lock it at 4.0.0 in your `Gemfile`:++ ```ruby+ gem 'spree_auth_devise', '~> 4.0.0'+ ```++2. Copy over all views from Spree 4.0++ Copy overviews from: [https://github.com/spree/spree/tree/4-0-stable/frontend/app/views](https://github.com/spree/spree/tree/4-0-stable/frontend/app/views) to your application views directory: `app/views`++ **WARNING** remember to not overwrite your customizations!++3. Copy over all Stylesheets from Spree 4.0++ Copy over stylesheets from: [https://github.com/spree/spree/tree/4-0-stable/frontend/app/assets/stylesheets](https://github.com/spree/spree/tree/4-0-stable/frontend/app/assets/stylesheets) to `app/stylesheets`++ **WARNING** remember to not overwrite your customizations!++4. Copy over all JavaScript from Spree 4.0++ Copy over stylesheets from: [https://github.com/spree/spree/tree/4-0-stable/frontend/app/assets/javascripts](https://github.com/spree/spree/tree/4-0-stable/frontend/app/assets/javascripts) to `app/javascripts`++ **WARNING** remember to not overwrite your customizations!++## Read the release notes++For information about changes contained within this release, please read the [4.1.0 Release Notes](https://guides.spreecommerce.org/release_notes/spree_4_1_0.html).++## More info++If you have any questions or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/)+diff --git a/docs/developer/upgrades/upgrades/four-dot-one-to-four-dot-two.mdx b/docs/developer/upgrades/upgrades/four-dot-one-to-four-dot-two.mdxnew file mode 100644index 0000000000..94025dff66--- /dev/null+++ b/docs/developer/upgrades/upgrades/four-dot-one-to-four-dot-two.mdx@@ -0,0 +1,131 @@+---+title: Upgrading Spree 4.1 to 4.2+section: upgrades+order: 0+description: This guide covers upgrading a 4.1 Spree application to Spree 4.2.+---++# 4.1 to 4.2++If you have any questions or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/)++**If you're on an older version than 4.1 please follow previous upgrade guides and perform those upgrades incrementally**, eg.++1. [upgrade 3.7 to 4.0](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-seven-to-four-dot-oh)+2. [upgrade 4.0 to 4.1](https://docs.spreecommerce.org/developer/upgrades/upgrades/four-dot-oh-to-four-dot-one)++This is the safest and recommended method.++## Update Gemfile++```ruby+gem 'spree', '~> 4.2'+gem 'spree_auth_devise', '~> 4.3'+gem 'spree_gateway', '~> 3.9'+gem 'spree_i18n', '~> 5.0'+```++## Remove SpreeMultiCurrency \(optional\)++If you used that gem in the past you need to remove it. Multi-Currency is now incorporated into Spree core and you cannot use that gem anymore.++1. Remove `spree_multi_currency` from your `Gemfile`+2. Remove these preferences from your Spree initializer \(`config/initializers/spree.rb`\):+ * `allow_currency_change`+ * `show_currency_selector`+ * `supported_currencies`+3. Remove `//= require spree/frontend/spree_multi_currency` from `vendor/assets/javascripts/spree/frontend/all.js`+4. Remove `//= require spree/backend/spree_multi_currency` from `vendor/assets/javascripts/spree/backend/all.js`++## \(Optional\) Remove SpreeI18n config++All international configuration is now kept on the `Store` model in the database rather than in initializer files.++If you used `spree_i18n` gem before please remove any `SpreeI18n::Config`references from your `config/initializers/spree.rb` file.++## \(Optional\) Add `deface` gem \(optional\)++If you used [Deface overrides](../../advanced/deface_overrides_tutorial#organizing-overrides) you will need to include `deface` in your `Gemfile` as it was removed from Spree / Spree Auth Devise / Spree Gateway dependencies.++Simply add it to your `Gemfile`:++```ruby+gem 'deface'+```++## Update gems++```bash+bundle update+```++## Fix RMA migration++Please find a `add_stock_location_to_rma` migration in your `db/migrate` directory and change:++```ruby+class AddStockLocationToRma < ActiveRecord::Migration[4.2]+```++to++```ruby+class AddStockLocationToRMA < ActiveRecord::Migration[4.2]+```++## Install missing migrations++```bash+rails spree:install:migrations+rails active_storage:update+```++## Run migrations++```bash+rails db:migrate+```++## Upgrade all of your Spree extensions to the newest versions++To avoid errors and compatibility issues, please update all of your Spree extension gems to the newest versions which usually includes fixes for the new Spree release, eg.++```bash+bundle update spree_related_products+```++## Other things to remember++### Replace `fast_json` with `jsonapi-serializer`++Please follow [this guide to migrate your custom serializers](https://github.com/jsonapi-serializer/jsonapi-serializer#migrating-from-netflixfast_jsonapi).++### Migrate select2 3.5 to 4.x++Only if you've added new Admin Panel pages with Select2 dropdown - [this guide will help](https://select2.org/upgrading/migrating-from-35)++### Make sure you've got up to date Spree templates \(Storefront\)++If you're using Spree default Storefront \(`spree_frontend` gem\) make sure to update your templates, especially:++* [app/views/spree/shared/\_head.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_head.html.erb)+* [app/views/spree/shared/\_locale\_and\_currency.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_locale_and_currency.html.erb)+* [app/views/spree/shared/\_link\_to\_account.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_link_to_account.html.erb)+* [app/views/spree/shared/\_internationalization\_options.html.erb](https://github.com/spree/spree/blob/master/frontend/app/views/spree/shared/_internationalization_options.html.erb)+* [app/views/spree/shared/\_locale\_dropdown.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_locale_dropdown.html.erb)+* [app/views/spree/shared/\_currency\_dropdown.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_currency_dropdown.html.erb)+* [app/views/spree/shared/\_mobile\_navigation.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_mobile_navigation.html.erb)+* [app/views/spree/shared/\_mobile\_internationalization\_options.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_mobile_internationalization_options.html.erb)+* [app/views/spree/shared/\_nav\_bar.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_nav_bar.html.erb)+* [app/views/spree/shared/\_line\_item.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_line_item.html.erb)++Or simply run `bundle exec rails g spree:frontend:copy_storefront`++## Read the release notes++For information about changes contained within this release, please read the [4.2.0 Release Notes](https://github.com/spree/spree/releases/tag/v4.2.0).++## More info++If you have any questions or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/)+diff --git a/docs/developer/upgrades/upgrades/fout-dot-two-to-four-dot-three.mdx b/docs/developer/upgrades/upgrades/fout-dot-two-to-four-dot-three.mdxnew file mode 100644index 0000000000..8c275f4556--- /dev/null+++ b/docs/developer/upgrades/upgrades/fout-dot-two-to-four-dot-three.mdx@@ -0,0 +1,145 @@+---+title: Upgrading Spree 4.2 to 4.3+section: upgrades+order: 0+hidden: true+description: This guide covers upgrading a 4.2 Spree application to Spree 4.3.+---++# 4.2 to 4.3++If you have any questions or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/)++**If you're on an older version than 4.1 please follow previous upgrade guides and perform those upgrades incrementally**, eg.++1. [upgrade 3.7 to 4.0](three-dot-seven-to-four-dot-oh)+2. [upgrade 4.0 to 4.1](four-dot-oh-to-four-dot-one)+3. [upgrade 4.1 to 4.2](four-dot-one-to-four-dot-two)++This is the safest and recommended method.++## Update Gemfile++```ruby+gem 'spree', '>= 4.3'+```++## Remove gems merged into Spree Core++### \(Optional\) Remove SpreeMultiDomain++If you used that gem in the past you need to remove it. Multi-Store is now incorporated into Spree core and you cannot use that gem anymore.++1. Remove `spree_multi_domain` from your `Gemfile`+2. Remove `//= require spree/frontend/spree_multi_domain` from `vendor/assets/javascripts/spree/frontend/all.js`+3. Remove `//= require spree/backend/spree_multi_domain` from `vendor/assets/javascripts/spree/backend/all.js`++### \(Optional\) Remove Spree Editor++Spree 4.3 includes TinyMCE 5 editor built-in. It's not recommended to use `spree_editor` gem anymore.++### \(Optional\) Remove Spree Static Content++Spree 4.3 includes a built-in CMS. It's not recommended to use `spree_static_content`++## Add Spree modules++Spree 4.3 was split into separate modules which aren't included in the `spree` package anymore.++### \(Optional\) Add `spree_frontend` gem++If you use the default Spree Storefront you need to add it to your `Gemfile`.++Note: If you are using `spree_auth_devise`, make sure `spree_frontend` precedes it in your Gemfile.++```ruby+gem 'spree_frontend', '>= 4.3'+```++### \(Optional\) Add `spree_backend` gem++If you use the default Spree Admin Panel you need to add it to your `Gemfile`. Make sure it comes before `spree_auth_devise`.++Note: If you are using `spree_auth_devise`, make sure `spree_backend` precedes it in your Gemfile.+++```ruby+gem 'spree_backend', '>= 4.3'+```++### \(Optional\) Add `spree_emails` gem++Transactional emails once part of `spree_core` were extracted into their own gem called `spree_emails`. If you would like to still use this feature you'll need to include this new gem in your `Gemfile`.++```ruby+gem 'spree_emails', '>= 4.3'+```++## Update gems++```bash+bundle update+```++## Install missing migrations++```bash+bin/rails spree:install:migrations+```++## Run migrations++```bash+bin/rails db:migrate+```++## Additional fixes and hints++### Upgrade Sprockets to v4++In your project create `app/assets/config/manifest.jss` file with contents:++```ruby+//= link_tree ../images+//= link_tree ../javascripts+//= link_directory ../stylesheets .css+```++More [on this topic](https://github.com/rails/sprockets/blob/master/UPGRADING#manifestjs).++### Update Spree Auth Devise and Spree Gateway++```bash+bundle update spree_gateway spree_auth_devise+```++### Admin Panel fix++If you've developed custom features for your Admin Panel, please replace++```ruby+render partial: 'spree/shared/error_messages'+```++with++```ruby+render partial: 'spree/admin/shared/error_messages'+```++## Upgrade all of your Spree extensions to the newest versions++To avoid errors and compatibility issues, please update all of your Spree extension gems to the newest versions which usually include fixes for the new Spree release, eg.++```bash+bundle update spree_related_products+```++## Read the release notes++For information about changes contained within this release, please read the [CHANGELOG](https://github.com/spree/spree/blob/master/CHANGELOG).++## More info++If you have any questions or suggestions feel free to [contact us via email](https://spreecommerce.org/contact) or through [Spree slack channels](http://slack.spreecommerce.org/)+diff --git a/docs/developer/upgrades/upgrades/one-dot-oh-to-one-dot-one.mdx b/docs/developer/upgrades/upgrades/one-dot-oh-to-one-dot-one.mdxnew file mode 100644index 0000000000..7cd67c74d7--- /dev/null+++ b/docs/developer/upgrades/upgrades/one-dot-oh-to-one-dot-one.mdx@@ -0,0 +1,72 @@+---+title: Upgrading Spree from 1.0.x to 1.1.x+section: upgrades+hidden: true+order: 16+description: 'This guide covers upgrading a 1.0.x Spree store, to a 1.1.x store.'+---++# 1.0 to 1.1++## Overview++This guide has been written from the perspective of a blank Spree 1.0.x store with no extensions.++If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 1.1.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 1-1-stable branch.++## Upgrade Rails++Spree 1.1 depends on any Rails 3.2 release after Rails 3.2.9. Ensure that you have that dependency specified in your Gemfile:++```ruby+gem 'rails', '~> 3.2.9'```++Along with this, you may have to also update your assets group in the Gemfile:++```ruby+group :assets do+ gem 'sass-rails', '~> 3.2.5'+ gem 'coffee-rails', '~> 3.2.1'+ gem 'uglifier', '>= 1.0.3'+end++gem 'jquery-rails', '2.1.4'+```++For more information, please refer to the [Upgrading Ruby on Rails guide](http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-3-1-to-rails-3-2).++## Upgrade Spree++For best results, use the 1-1-stable branch from GitHub:++```ruby+gem 'spree', github: 'spree/spree', branch: '1-1-stable'```++Run `bundle update spree`.++## Copy and run migrations++Copy over the migrations from Spree (and any other engine) and run them using+these commands:++ rake railties:install:migrations+ rake db:migrate++## Remove references to spree_api assets++Spree API no longer provides any asset files, so references to these must be removed from:++* app/assets/stylesheets/store/all.css+* app/assets/stylesheets/admin/all.css+* app/assets/javascripts/store/all.js+* app/assets/javascripts/admin/all.js++## Read the release notes++For information about what has changed in this release, please read the [1.1.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_1_1_0.html).++## Verify that everything is OK++Click around in your store and make sure it's performing as normal. Fix any deprecation warnings you see.+```+diff --git a/docs/developer/upgrades/upgrades/one-dot-one-to-one-dot-two.mdx b/docs/developer/upgrades/upgrades/one-dot-one-to-one-dot-two.mdxnew file mode 100644index 0000000000..5309c9e500--- /dev/null+++ b/docs/developer/upgrades/upgrades/one-dot-one-to-one-dot-two.mdx@@ -0,0 +1,60 @@+---+title: Upgrading Spree from 1.1.x to 1.2.x+section: upgrades+order: 15+hidden: true+description: 'This guide covers upgrading a 1.1.x Spree store, to a 1.2.x store.'+---++# 1.1 to 1.2++## Overview++This guide has been written from the perspective of a blank Spree 1.1.x store with no extensions.++If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 1.2.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 1-2-stable branch.++## Upgrade Spree++For best results, use the 1-2-stable branch from GitHub:++```ruby+gem 'spree', github: 'spree/spree', branch: '1-2-stable'```++Run `bundle update spree`.++## Authentication dependency++In this release, the `spree_auth` component was moved out of the main set of+gems into an extension, called `spree_auth_devise`. If you want to continue using Spree's authentication, then you will need to specify this extension as a dependency in your `Gemfile`:++```ruby+gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '1-2-stable'```++Run `bundle install` to install this extension.++### Rename current_user to current_spree_user++To ensure that Spree does not conflict with any authentication provided by the application, Spree has renamed its `current_user` variable to `current_spree_user`. You should make this change wherever necessary within your application.++Similar to this, any references to `@user` are now `@spree_user`.++## Copy and run migrations++Copy over the migrations from Spree (and any other engine) and run them using+these commands:++ rake railties:install:migrations+ rake db:migrate++This may copy over additional migrations from spree_auth_devise and run them as well.++## Read the release notes++For information about changes contained with this release, please read the [1.2.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_1_2_0.html).++## Verify that everything is OK++Click around in your store and make sure it's performing as normal. Fix any deprecation warnings you see.+```+diff --git a/docs/developer/upgrades/upgrades/one-dot-three-to-two-dot-oh.mdx b/docs/developer/upgrades/upgrades/one-dot-three-to-two-dot-oh.mdxnew file mode 100644index 0000000000..9dbe22511b--- /dev/null+++ b/docs/developer/upgrades/upgrades/one-dot-three-to-two-dot-oh.mdx@@ -0,0 +1,69 @@+---+title: Upgrading Spree from 1.3.x to 2.0.x+section: upgrades+order: 13+hidden: true+description: 'This guide covers upgrading a 1.3.x Spree store, to a 2.0.x store.'+---++# 1.3 to 2.0++## Overview++This guide has been written from the perspective of a blank Spree 1.3.x store with no extensions.++If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 2.0.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-0-stable branch.++Given that this is a major release, you may want to read through the [2.0.0 release notes](http://guides.spreecommerce.org/release_notes/spree_2_0_0.html) to see what has changed before proceeding with this upgrade.++## Upgrade Spree++For best results, use the 2-0-stable branch from GitHub:++```ruby+gem 'spree', github: 'spree/spree', branch: '2-0-stable'```++Run `bundle update spree`.++## Bump jquery-rails++This version of Spree bumps the dependency for jquery-rails to this:++```ruby+gem 'jquery-rails', '3.0.0'```++Ensure that you have a line such as this in your Gemfile to allow that dependency.++## Remove middleware++The two pieces of middleware previously inserted into `config/application.rb` have now been deprecated. Remove these two lines:++```ruby+config.middleware.use "Spree::Core::Middleware::RedirectLegacyProductUrl"+config.middleware.use "Spree::Core::Middleware::SeoAssist"```++## Rename assets++In Spree 2, assets have been renamed.++In `store/all.css` and `store/all.js`, you will need to rename the references from `spree_core` to `spree_frontend`. Similarly to this, in `admin/all.css` and `admin/all.js`, you will need to rename the references from `spree_core` to `spree_backend`.++Additionally, remove references to `spree_promo` from these files. That component of Spree has now been merged with the Core component.++## Copy and run migrations++Copy over the migrations from Spree (and any other engine) and run them using+these commands:++ rake railties:install:migrations+ rake db:migrate++## Read the release notes++For information about changes contained with this release, please read the [2.0.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_2_0_0.html).++## Verify that everything is OK++Click around in your store and make sure it's performing as normal. Fix any deprecation warnings you see.+```+diff --git a/docs/developer/upgrades/upgrades/one-dot-two-to-one-dot-three.mdx b/docs/developer/upgrades/upgrades/one-dot-two-to-one-dot-three.mdxnew file mode 100644index 0000000000..67e8c2ff41--- /dev/null+++ b/docs/developer/upgrades/upgrades/one-dot-two-to-one-dot-three.mdx@@ -0,0 +1,91 @@+---+title: Upgrading Spree from 1.2.x to 1.3.x+section: upgrades+order: 14+hidden: true+description: 'This guide covers upgrading a 1.2.x Spree store, to a 1.3.x store.'+---++# 1.2 to 1.3++## Overview++This guide has been written from the perspective of a blank Spree 1.2.x store with no extensions.++If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 1.3.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 1-3-stable branch.++## Upgrade Spree++For best results, use the 1-3-stable branch from GitHub:++```ruby+gem 'spree', github: 'spree/spree', branch: '1-3-stable'```++Run `bundle update spree`.++## Bump jquery-rails++This version of Spree bumps the dependency for jquery-rails to this:++```ruby+gem 'jquery-rails', '2.2.0'```++Ensure that you have a line such as this in your Gemfile to allow that dependency.++## Copy and run migrations++Copy over the migrations from Spree (and any other engine) and run them using+these commands:++ rake railties:install:migrations+ rake db:migrate++## Replace money usages++In older versions of Spree, we had a helper method called `money` which+occasionally formatted money amounts incorrectly. Specifically, if the `I18n.locale` was changed, currencies started to display in that amount, rather than the proper amount. An item that was once $100, would suddenly become 100¥ if the locale was switched to Japanese, for instance.++In Spree 1.3, money handling+has been reworked by a major contribution by the [Free Running+Technologies](http://www.freerunningtech.com/) team. See [#2197](https://github.com/spree/spree/pull/2197) for details.++Prices are now stored in a separate table, called `spree_prices`. This table tracks the variant, the price amount, and the currency. This allows for variants to have different prices in different currencies.++Along with this, we introduced the `Spree::Money` class which is used to display amounts correctly. Where previously Spree would have done this:++```erb+<td><%%= money adjustment.amount %></td>```++We now use this:++```erb+<td><%%= adjustment.display_amount.to_html %></td>```++Alternatively, you can use `Spree::Money.new(amount)` to get a `Spree::Money` representation. Calling `to_html` on that object will format it neatly for HTML views, and calling `to_s` will format it nicely everywhere else.++### Variant.active scope++Along with these changes, the `Spree::Variant.active` scope now takes an argument for the currency. Whatever currency is specified will return variants in that currency. Previously it may have been enough to just do this:++```ruby++But now you must specify a currency:++```ruby[email protected]("USD")```++Or you can rely on the current currency within views:++```ruby[email protected](current_currency)```++## Read the release notes++For information about changes contained with this release, please read the [1.3.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_1_3_0.html).++## Verify that everything is OK++Click around in your store and make sure it's performing as normal. Fix any deprecation warnings you see.+```+diff --git a/docs/developer/upgrades/upgrades/three-dot-five-to-three-dot-six.mdx b/docs/developer/upgrades/upgrades/three-dot-five-to-three-dot-six.mdxnew file mode 100644index 0000000000..d7e6caa214--- /dev/null+++ b/docs/developer/upgrades/upgrades/three-dot-five-to-three-dot-six.mdx@@ -0,0 +1,53 @@+---+title: Upgrading Spree from 3.5 to 3.6+section: upgrades+order: 4+description: 'This guide covers upgrading a 3.5 Spree application, to a 3.6 application.'+---++# 3.5 to 3.6++### Update Gemfile++```ruby+gem 'spree', '~> 3.6.1'+gem 'spree_auth_devise', '~> 3.3'+gem 'spree_gateway', '~> 3.3'+```++### Update your Rails version to 5.2++Please follow the [official Rails guide](http://guides.rubyonrails.org/5_2_release_notes.html#upgrading-to-rails-5-2) to upgrade your store.++### Run `bundle update`++### Migrate to ActiveStorage \(optional\)++Please follow the [official paperclip guide](https://github.com/thoughtbot/paperclip/blob/master/MIGRATING) if you want to use ActiveStorage instead of paperclip.++You can still use paperclip for attachment management by setting `SPREE_USE_PAPERCLIP` environment variable to `true`, but keep in mind that paperclip is DEPRECATED and we will remove paperclip support in Spree 4.0.++### Install missing migrations++```bash+rails spree:install:migrations+rails spree_auth:install:migrations+rails spree_gateway:install:migrations+```++### Run migrations++```bash+rails db:migrate+```++You're good to go!++## Read the release notes++For information about changes contained within this release, please read the [3.6.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_3_6_0.html).++## Verify that everything is OK++Run your test suite, click around in your application and make sure it's performing as normal. Fix any deprecation warnings you see.+diff --git a/docs/developer/upgrades/upgrades/three-dot-four-to-three-dot-five.mdx b/docs/developer/upgrades/upgrades/three-dot-four-to-three-dot-five.mdxnew file mode 100644index 0000000000..e857fb7e16--- /dev/null+++ b/docs/developer/upgrades/upgrades/three-dot-four-to-three-dot-five.mdx@@ -0,0 +1,65 @@+---+title: Upgrading Spree from 3.4 to 3.5+section: upgrades+order: 5+description: 'This guide covers upgrading a 3.4 Spree store, to a 3.5 store.'+---++# 3.4 to 3.5++### Update Gemfile++```ruby+gem 'spree', '~> 3.5.0'+gem 'spree_auth_devise', '~> 3.3'+gem 'spree_gateway', '~> 3.3'+```++### Run `bundle update`++### Install missing migrations++```bash+rails spree:install:migrations+rails spree_auth:install:migrations+rails spree_gateway:install:migrations+```++### Run migrations++```bash+rails db:migrate+```++### Install Spree Analytics Trackers extension++If you were previously using Analytics Trackers feature you need to install it as an extension as it was [extracted from the core](https://github.com/spree/spree/pull/8408).++1. Add [Spree Analytics Trackers](https://github.com/spree-contrib/spree_analytics_trackers) to your `Gemfile`:++```ruby+gem 'spree_analytics_trackers', github: 'spree-contrib/spree_analytics_trackers'+```++1. Install the gem using Bundler:++```bash+bundle install+```++1. Copy and run migrations:++```bash+bundle exec rails g spree_analytics_trackers:install+```++You're good to go!++## Read the release notes++For information about changes contained within this release, please read the [3.5.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_3_5_0.html).++## Verify that everything is OK++Run your test suite, click around in your store and make sure it's performing as normal. Fix any deprecation warnings you see.+diff --git a/docs/developer/upgrades/upgrades/three-dot-oh-to-three-dot-one.mdx b/docs/developer/upgrades/upgrades/three-dot-oh-to-three-dot-one.mdxnew file mode 100644index 0000000000..7c759cb3da--- /dev/null+++ b/docs/developer/upgrades/upgrades/three-dot-oh-to-three-dot-one.mdx@@ -0,0 +1,83 @@+---+title: Upgrading Spree from 3.0 to 3.1+section: upgrades+order: 9+description: 'This guide covers upgrading a 3.0.x Spree store, to a 3.1.x store'+---++# 3.0 to 3.1++## Upgrade Rails++For this Spree release, you will need to upgrade your Rails version to at least 4.2.6.++```ruby+gem 'rails', '~> 4.2.6'+```++## Upgrade Spree++For best results, use the spree gem in version 3.1.x:++```ruby+gem 'spree', '~> 3.1.0.rc1'+```++Run `bundle update spree`.++## Copy and run migrations++Copy over the migrations from Spree \(and any other engine\) and run them using these commands:++```text+rake railties:install:migrations+rake db:migrate+```++## Spree Auth Devise & Spree Gateway++If you are using Spree Gateway and/or Spree Auth Devise you should also upgrade them:++```ruby+gem 'spree_auth_devise', '~> 3.1.0.rc1'+gem 'spree_gateway', '~> 3.1.0.rc1'+```++For Spree Auth Devise run installer:++```text+rails g spree:auth:install+```++\(you don't have to override config/initializers/devise.rb\)++## Additional information++### Make sure to v1 namespace custom rabl templates & overrides.++If your rabl templates reference others with extend you'll need to add the v1 namespace.++For example:++```ruby+extends 'spree/api/zones/show'+```++Becomes:++```ruby+extends 'spree/api/v1/zones/show'+```++### Remove Spree::Config.check\_for\_spree\_alerts++If you were disabling the alert checks you'll now want to remove this preference as it's no longer used.++## Read the release notes++For information about changes contained within this release, please read the [3.1.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_3_1_0.html).++## Verify that everything is OK++Run your test suite, click around in your store and make sure it's performing as normal. Fix any deprecation warnings you see.+diff --git a/docs/developer/upgrades/upgrades/three-dot-one-to-three-dot-two.mdx b/docs/developer/upgrades/upgrades/three-dot-one-to-three-dot-two.mdxnew file mode 100644index 0000000000..34bc3d8e41--- /dev/null+++ b/docs/developer/upgrades/upgrades/three-dot-one-to-three-dot-two.mdx@@ -0,0 +1,61 @@+---+title: Upgrading Spree from 3.1 to 3.2+section: upgrades+order: 8+description: 'This guide covers upgrading a 3.1.x Spree store, to a 3.2.x store.'+---++# 3.1 to 3.2++### Update your Rails version to 5.0++Please follow the [official Rails guide](http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-4-2-to-rails-5-0) to upgrade your store.++### Update Gemfile++```ruby+gem 'spree', '~> 3.2.0'+gem 'spree_auth_devise', '~> 3.2.0'+gem 'spree_gateway', '~> 3.2.0'+```++### Update your extensions++We're changing how extensions dependencies work. Previously you had to match the extension branch to the Spree branch. Starting from now `master` branch of all `spree-contrib` extensions should work with Spree >= `3.1` and < `4.0`. Please change your extensions in Gemfile eg.:++from:++```ruby+gem 'spree_braintree_vzero', github: 'spree-contrib/spree_braintree_vzero', branch: '3-1-stable'+```++to:++```ruby+gem 'spree_braintree_vzero', github: 'spree-contrib/spree_braintree_vzero'+```++### Run `bundle update`++### Install missing migrations++```bash+rails spree:install:migrations+rails spree_auth:install:migrations+rails spree_gateway:install:migrations+```++### Run migrations++```bash+rails db:migrate+```++## Read the release notes++For information about changes contained within this release, please read the [3.2.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_3_2_0.html).++## Verify that everything is OK++Run your test suite, click around in your store and make sure it's performing as normal. Fix any deprecation warnings you see.+diff --git a/docs/developer/upgrades/upgrades/three-dot-seven-to-four-dot-oh.mdx b/docs/developer/upgrades/upgrades/three-dot-seven-to-four-dot-oh.mdxnew file mode 100644index 0000000000..c330b38394--- /dev/null+++ b/docs/developer/upgrades/upgrades/three-dot-seven-to-four-dot-oh.mdx@@ -0,0 +1,253 @@+---+title: Upgrading Spree 3.7 to 4.0+section: upgrades+order: 2+description: This guide covers upgrading a 3.7 Spree application to Spree 4.0.+---++# 3.7 to 4.0++If you have any questions or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/)++**If you're on an older version than 3.7 please follow previous upgrade guides and perform those upgrades incrementally**, eg.++1. [upgrade 3.2 to 3.3](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-two-to-three-dot-three)+2. [upgrade 3.3 to 3.4](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-three-to-three-dot-four)+3. [upgrade 3.4 to 3.5](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-four-to-three-dot-five)+4. [upgrade 3.5 to 3.6](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-five-to-three-dot-six)+5. [upgrade 3.6 to 3.7](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-six-to-three-dot-seven)++This is the safest and recommended method.++## Update your Ruby version to 2.5.0 at least++Spree 4.0 requires Ruby 2.5.0 at least so you need to bump the ruby version in your project's `Gemfile` and `.ruby-version` files.++## Migrate from Paperclip to ActiveStorage++In Spree 3.6 we deprecated [Paperclip support in favor of ActiveStorage](https://guides.spreecommerce.org/release_notes/3_6_0.html#active-storage-support). Paperclip gem itself isn't maintained anymore and it is recommended to move to ActiveStorage as it is the default Rails storage engine since Rails 5.2 release.++In Spree 4.0 we've removed Paperclip support in favor of ActiveStorage.++Please remove also any occurrences of `Rails.application.config.use_paperclip` and `Configuration::Paperclip` from your codebase.++Please follow the [official Paperclip to ActiveStorage migration guide](https://github.com/thoughtbot/paperclip/blob/master/MIGRATING).++## Replace OrderContents with services in your codebase++`OrderContents` was deprecated in Spree 3.7 and removed in 4.0. We've replaced it with [service objects](https://guides.spreecommerce.org/release_notes/3_7_0.html#service-oriented-architecture).++You need to replace any instances of `OrderContents` usage with corresponding services in your codebase.++### `OrderContents#update_cart`++before:++```ruby+order.contents.update_cart(line_items_attributes)+```++after:++```ruby+Spree::Cart::Update.call(order: order, params: line_items_attributes)+```++### `OrderContents#add`++before:++```ruby+order.contents.add(variant, quantity, shipment: shipment)+```++after:++```ruby+Spree::Cart::AddItem.call(+ order: order,+ variant: variant,+ quantity: quantity,+ options: {+ shipment: @shipment+ }+)+```++### `OrderContents#remove`++before:++```ruby+order.contents.remove(variant, quantity, shipment: shipment)+```++after:++```ruby+Spree::Cart::RemoveItem.call(+ order: order,+ variant: variant,+ quantity: quantity,+ options: {+ shipment: shipment+ }+)+```++## Replace `add_store_credit_payments` with `Checkout::AddStoreCredit`++Similar to `OrderContents` method `add_store_credit_payments` was replaced with `Checkout::AddStoreCredit` service.++before:++```ruby+order.add_store_credit_payments+```++after:++```ruby+Spree::Checkout::AddStoreCredit.call(order: order)+```++## Replace `remove_store_credit_payments` with `Checkout::RemoveStoreCredit`++Similar to `OrderContents` method `remove_store_credit_payments` was replaced with `Checkout::RemeoveStoreCredit` service.++before:++```ruby+order.remove_store_credit_payments+```++after:++```ruby+Spree::Checkout::RemoveStoreCredit.call(order: order)+```++## Remove `spree_address_book` extension++If you're using the [Address Book](https://github.com/spree-contrib/spree_address_book) extension you need to remove it as this feature was merged into [core Spree](https://guides.spreecommerce.org/release_notes/4_0_0.html#address-book-support).++1. Remove this line from `Gemfile`++ ```ruby+ gem 'spree_address_book', github: 'spree-contrib/spree_address_book'+ ```++2. Remove this line from `vendor/assets/javascripts/spree/frontend/all.js`++ ```text+ //= require spree/frontend/spree_address_book+ ```++3. Remove this line from `vendor/assets/stylesheets/spree/frontend/all.css`++ ```text+ //= require spree/frontend/spree_address_book+ ```++## Replace `class_eval` with `Module.prepend` \(only for Rails 6\)++Rails 6.0 ships with a [new code autoloader called Zeitwerk](https://medium.com/@fxn/zeitwerk-a-new-code-loader-for-ruby-ae7895977e73) which has some [strict rules in terms of file naming and contents](https://github.com/fxn/zeitwerk#file-structure). If you used `class_eval` to extend and modify Spree classes you will need to rewrite those with `Module.prepend`. Eg.++Old decorator syntax:++```ruby+Spree::Order.class_eval do+ has_many :new_custom_model++ def some_method+ # ...+ end+end+```++Replaced with:++```ruby+module Spree+ module OrderDecorator+ def self.prepended(base)+ base.has_many :new_custom_model+ end++ def some_method+ # ...+ end+ end++ Order.prepend(OrderDecorator)+end+```++When migrating a class method to the new [autoloader](https://medium.com/@fxn/zeitwerk-a-new-code-loader-for-ruby-ae7895977e73) things are a little different because you will have to prepend to the Singleton class as shown in this example:++```ruby+module Spree::BaseDecorator+ def spree_base_scopes+ # custom implementation+ end+end++Spree::Base.singleton_class.send :prepend, Spree::BaseDecorator+```++Please also consider other options for [Logic Customization](../../customization/logic).++We recommend also reading through [Ruby modules: Include vs Prepend vs Extend](https://medium.com/@leo_hetsch/ruby-modules-include-vs-prepend-vs-extend-f09837a5b073)++## Update Bootstrap 3 to 4 or stay at Bootstrap 3++Spree 4 uses Bootstrap 4 for both Storefront and Admin Panel. You have two options:++### Stay at Bootstrap 3++As we know this is a big portion of work you can still use Bootstrap 3 for your Storefront.++1. Copy all remaining views by running `bundle exec spree:frontend:copy_views`+2. Add `bootstrap-sass` gem to your `Gemfile`++ ```ruby+ gem 'bootstrap-sass', '~> 3.4.1'+ ```++### Move to Bootstrap 4++[Follow the official Bootstrap 3 to 4 migration guide](https://getbootstrap.com/docs/4.0/migration/)++## Update Gemfile++```ruby+gem 'spree', '~> 4.0'+gem 'spree_auth_devise', '~> 4.0'+gem 'spree_gateway', '~> 3.6'+```++## Run `bundle update`++## Install missing migrations++```bash+rails spree:install:migrations+rails spree_api:install:migrations+rails spree_auth:install:migrations+rails spree_gateway:install:migrations+```++## Run migrations++```bash+rails db:migrate+```++## Read the release notes++For information about changes contained within this release, please read the [4.0.0 Release Notes](https://guides.spreecommerce.org/release_notes/spree_4_0_0.html).++## More info++If you have any questions or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/)+diff --git a/docs/developer/upgrades/upgrades/three-dot-six-to-three-dot-seven.mdx b/docs/developer/upgrades/upgrades/three-dot-six-to-three-dot-seven.mdxnew file mode 100644index 0000000000..8b72614bc1--- /dev/null+++ b/docs/developer/upgrades/upgrades/three-dot-six-to-three-dot-seven.mdx@@ -0,0 +1,70 @@+---+title: Upgrading Spree from 3.6 to 3.7+section: upgrades+order: 3+description: 'This guide covers upgrading a 3.6 Spree application, to version 3.7.'+---++# 3.6 to 3.7++## Update Gemfile++```ruby+gem 'spree', '~> 3.7.0'+gem 'spree_auth_devise', '~> 3.5'+gem 'spree_gateway', '~> 3.4'+```++## Run `bundle update`++## Install missing migrations++```bash+rails spree:install:migrations+rails spree_api:install:migrations+rails spree_auth:install:migrations+rails spree_gateway:install:migrations+```++## Run migrations++```bash+rails db:migrate+```++## Migrate Taxon icons to Spree Assets++We renamed `TaxonIcon` to `TaxonImage` to clarify usage of this model. If you were using `TaxonIcon` please run this to migrate your icons to images:++```bash+rails db:migrate_taxon_icons_to_images+```++## Ensure all Orders associated to Store++Orders needs to be associated to Stores. To ensure all existing `Order` are associated with `Store` please run this:++```bash+rails db:associate_orders_with_store+```++This will associate all Orders without Store to the default Store. This can take some time depending on your volume of data.++## Ensure all Orders have currency present++To enhance multi currency capabilities we've made `currency` presence obligatory in `Order` model. To ensure all existing `Orders` have `currency` present please run this command:++```bash+rails db:ensure_order_currency_presence+```++This will set `currency` in Orders without currency set to `Spree::Config[:default_currency]` value. This can take some time depending on your volume of data.++## Replace `guest_token` with `token` in your codebase++`Order#guest_token` was renamed to `Order#token` in order to unify the experience for guest checkouts and orders placed by signed in users.++## Read the release notes++For information about changes contained within this release, please read the [3.7.0 Release Notes](https://guides.spreecommerce.org/release_notes/spree_3_7_0.html).+diff --git a/docs/developer/upgrades/upgrades/three-dot-three-to-three-dot-four.mdx b/docs/developer/upgrades/upgrades/three-dot-three-to-three-dot-four.mdxnew file mode 100644index 0000000000..770497a213--- /dev/null+++ b/docs/developer/upgrades/upgrades/three-dot-three-to-three-dot-four.mdx@@ -0,0 +1,49 @@+---+title: Upgrading Spree from 3.3 to 3.4+section: upgrades+order: 6+description: 'This guide covers upgrading a 3.3 Spree store, to a 3.4 store.'+---++# 3.3 to 3.4++### Update Gemfile++```ruby+gem 'spree', '~> 3.4.0'+gem 'spree_auth_devise', '~> 3.3'+gem 'spree_gateway', '~> 3.3'+```++### Run `bundle update`++### Install missing migrations++```bash+rails spree:install:migrations+rails spree_auth:install:migrations+rails spree_gateway:install:migrations+```++### Run migrations++```bash+rails db:migrate+```++### Migrate Spree::Taxon icons to Spree Assets++We changed `Spree::Taxon` icon to use `Spree::Asset` to unify attachment usage across all Spree models. If you were using icon images in `Spree::Taxon` please run this to migrate your icons:++```bash+rails db:migrate_taxon_icons+```++## Read the release notes++For information about changes contained within this release, please read the [3.4.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_3_4_0.html).++## Verify that everything is OK++Run your test suite, click around in your store and make sure it's performing as normal. Fix any deprecation warnings you see.+diff --git a/docs/developer/upgrades/upgrades/three-dot-two-to-three-dot-three.mdx b/docs/developer/upgrades/upgrades/three-dot-two-to-three-dot-three.mdxnew file mode 100644index 0000000000..df3b45d794--- /dev/null+++ b/docs/developer/upgrades/upgrades/three-dot-two-to-three-dot-three.mdx@@ -0,0 +1,99 @@+---+title: Upgrading Spree from 3.2 to 3.3+section: upgrades+order: 7+description: 'This guide covers upgrading a 3.2.x Spree store, to a 3.3.x store.'+---++# 3.2 to 3.3++### Update your Rails version to 5.1++Please follow the [official Rails guide](http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-5-0-to-rails-5-1) to upgrade your store.++### Update Gemfile++```ruby+gem 'spree', '~> 3.3.0'+gem 'spree_auth_devise', '~> 3.3'+gem 'spree_gateway', '~> 3.3'+```++### Update your extensions++We're changing how extensions dependencies work. Previously you had to match the extension branch to the Spree branch. Starting from Spree 3.2 release date `master` branch of all `spree-contrib` extensions should work with Spree >= `3.1` and < `4.0`. Please change your extensions in Gemfile eg.:++from:++```ruby+gem 'spree_braintree_vzero', github: 'spree-contrib/spree_braintree_vzero', branch: '3-1-stable'+```++to:++```ruby+gem 'spree_braintree_vzero', github: 'spree-contrib/spree_braintree_vzero'+```++### Run `bundle update`++### Install missing migrations++```bash+rails spree:install:migrations+rails spree_auth:install:migrations+rails spree_gateway:install:migrations+```++### Run migrations++```bash+rails db:migrate+```++### Include `UserMethods` in your `User` class++With this release, we're not including this automatically. You need to do it manually if you're not using `spree_auth_devise`.++You need to include `Spree::UserMethods` in your user class, eg.++```ruby+class User+ include UserAddress+ include UserMethods+ include UserPaymentSource+end+```++### Update `aws-sdk` gem to `>= 2.0`++Spree 3.3 comes with paperclip 5.1 support so if you're using Amazon S3 storage you need to change in your Gemfile, from:++```ruby+gem 'aws-sdk', '< 2.0'+```++to:++```ruby+gem 'aws-sdk', '>= 2.0'+```++and run `bundle update aws-sdk`++In your paperclip configuration, you also need to specify `s3_region` attribute eg. [https://github.com/spree/spree/blame/master/guides/content/developer/customization/s3\_storage.md\#L27](https://github.com/spree/spree/blame/master/guides/content/developer/customization/s3_storage#L27)++See also [RubyThursday episode](https://rubythursday.com/episodes/ruby-snack-27-upgrade-paperclip-and-aws-sdk-in-prep-for-rails-5) walkthrough of upgrading paperclip in your project.++### Add jquery.validate to your project if you've used it directly from Spree++If your application.js file includes line `//= require jquery.validate/jquery.validate.min` you will need to add this file manually to your project because this library was [removed from Spree in favor of native HTML5 validation](https://github.com/spree/spree/pull/8173).++## Read the release notes++For information about changes contained within this release, please read the [3.3.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_3_3_0.html).++## Verify that everything is OK++Run your test suite, click around in your store and make sure it's performing as normal. Fix any deprecation warnings you see.+diff --git a/docs/developer/upgrades/upgrades/two-dot-oh-to-two-dot-one.mdx b/docs/developer/upgrades/upgrades/two-dot-oh-to-two-dot-one.mdxnew file mode 100644index 0000000000..ae730d0827--- /dev/null+++ b/docs/developer/upgrades/upgrades/two-dot-oh-to-two-dot-one.mdx@@ -0,0 +1,53 @@+---+title: Upgrading Spree from 2.0.x to 2.1.x+section: upgrades+order: 12+hidden: true+description: 'This guide covers upgrading a 2.0.x Spree store, to a 2.1.x store.'+---++# 2.0 to 2.1++## Overview++This guide has been written from the perspective of a blank Spree 2.0.x store with no extensions.++If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 2.1.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-1-stable branch.++This is the first Spree release that supports Rails 4 exclusively. Spree releases after this point will continue to support Rails 4 only.++## Upgrade Rails++For this Spree release, you will need to upgrade your Rails version to at least 4.0.0.++It is recommended to read through the [Upgrading Ruby on Rails guide](http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-%20from-rails-3-2-to-rails-4-0) to learn what needs to be done for your application to migrate to Rails 4.++```ruby+gem 'rails', '~> 4.0.0'```++## Upgrade Spree++For best results, use the 2-1-stable branch from GitHub:++```ruby+gem 'spree', github: 'spree/spree', branch: '2-1-stable'```++Run `bundle update spree`.++## Copy and run migrations++Copy over the migrations from Spree (and any other engine) and run them using+these commands:++ rake railties:install:migrations+ rake db:migrate++## Read the release notes++For information about changes contained with this release, please read the [2.1.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_2_1_0.html).++## Verify that everything is OK++Click around in your store and make sure it's performing as normal. Fix any deprecation warnings you see.+```+diff --git a/docs/developer/upgrades/upgrades/two-dot-one-to-two-dot-two.mdx b/docs/developer/upgrades/upgrades/two-dot-one-to-two-dot-two.mdxnew file mode 100644index 0000000000..1dc41d376e--- /dev/null+++ b/docs/developer/upgrades/upgrades/two-dot-one-to-two-dot-two.mdx@@ -0,0 +1,63 @@+---+title: Upgrading Spree from 2.1.x to 2.2.x+section: upgrades+order: 11+hidden: true+description: 'This guide covers upgrading a 2.1.x Spree store, to a 2.2.x store.'+---++# 2.1 to 2.2++## Overview++This guide has been written from the perspective of a blank Spree 2.1.x store with no extensions.++If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 2.2.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-2-stable branch.++## Upgrade Rails++For this Spree release, you will need to upgrade your Rails version to at least 4.0.6.++```ruby+gem 'rails', '~> 4.0.6'+```++## Upgrade Spree++For best results, use the 2-2-stable branch from GitHub:++```ruby+gem 'spree', github: 'spree/spree', branch: '2-2-stable'```++Run `bundle update spree`.++## Copy and run migrations++Copy over the migrations from Spree (and any other engine) and run them using+these commands:++ rake railties:install:migrations+ rake db:migrate++## Read the release notes++For information about changes contained with this release, please read the [2.2.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_2_2_0.html).++### Rename assets++As mentioned in the release notes, asset paths have changed. Change the references on the left, to the ones on the right:++* `admin/spree_backend` => `spree/backend`+* `store/spree_frontend` => `spree/frontend`++This applies across the board on Spree, and may need to be done in your store's extensions.++### Paperclip settings have been removed from master++Please consult [this section](http://guides.spreecommerce.org/release_notes/spree_2_2_0.html#paperclip-settings-have-been-removed) of the release notes if you were using custom Paperclip settings. This will direct you what to do in that particular case.++## Verify that everything is OK++Click around in your store and make sure it's performing as normal. Fix any deprecation warnings you see.+```+diff --git a/docs/developer/upgrades/upgrades/two-dot-three-to-two-dot-four.mdx b/docs/developer/upgrades/upgrades/two-dot-three-to-two-dot-four.mdxnew file mode 100644index 0000000000..6651ee1449--- /dev/null+++ b/docs/developer/upgrades/upgrades/two-dot-three-to-two-dot-four.mdx@@ -0,0 +1,48 @@+---+title: Upgrading Spree from 2.3.x to 2.4.x+section: upgrades+hidden: true+order: 9+description: 'This guide covers upgrading a 2.3.x Spree store, to a 2.4.x store.'+---++# 2.3 to 2.4++This guide has been written from the perspective of a blank Spree 2.3.x store with no extensions.++If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 2.4.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-4-stable branch.++## Upgrade Rails++For this Spree release, you will need to upgrade your Rails version to at least 4.1.8.++```ruby+gem 'rails', '~> 4.1.8'+```++## Upgrade Spree++For best results, use the 2-4-stable branch from GitHub:++```ruby+gem 'spree', github: 'spree/spree', branch: '2-4-stable'```++Run `bundle update spree`.++## Copy and run migrations++Copy over the migrations from Spree (and any other engine) and run them using+these commands:++ rake railties:install:migrations+ rake db:migrate++## Read the release notes++For information about changes contained within this release, please read the [2.4.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_2_4_0.html).++## Verify that everything is OK++Click around in your store and make sure it's performing as normal. Fix any deprecation warnings you see.+```+diff --git a/docs/developer/upgrades/upgrades/two-dot-two-to-two-dot-three.mdx b/docs/developer/upgrades/upgrades/two-dot-two-to-two-dot-three.mdxnew file mode 100644index 0000000000..248fd198f5--- /dev/null+++ b/docs/developer/upgrades/upgrades/two-dot-two-to-two-dot-three.mdx@@ -0,0 +1,52 @@+---+title: Upgrading Spree from 2.2.x to 2.3.x+section: upgrades+hidden: true+order: 10+description: 'This guide covers upgrading a 2.2.x Spree store, to a 2.3.x store.'+---++# 2.2 to 2.3++## Overview++This guide has been written from the perspective of a blank Spree 2.2.x store with no extensions.++If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 2.3.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-3-stable branch.++This is the first Spree release that supports Rails 4.1.++## Upgrade Rails++For this Spree release, you will need to upgrade your Rails version to at least 4.1.2.++```ruby+gem 'rails', '~> 4.1.2'+```++## Upgrade Spree++For best results, use the 2-3-stable branch from GitHub:++```ruby+gem 'spree', github: 'spree/spree', branch: '2-3-stable'```++Run `bundle update spree`.++## Copy and run migrations++Copy over the migrations from Spree (and any other engine) and run them using+these commands:++ rake railties:install:migrations+ rake db:migrate++## Read the release notes++For information about changes contained with this release, please read the [2.3.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_2_3_0.html).++## Verify that everything is OK++Click around in your store and make sure it's performing as normal. Fix any deprecation warnings you see.+```+diff --git a/docs/favicon.png b/docs/favicon.pngnew file mode 100644index 0000000000..a54cf06b90Binary files /dev/null and b/docs/favicon.png differdiff --git a/docs/images/Platform API 1.png b/docs/images/Platform API 1.pngnew file mode 100644index 0000000000..86f767926dBinary files /dev/null and b/docs/images/Platform API 1.png differdiff --git a/docs/images/Platform API 2.png b/docs/images/Platform API 2.pngnew file mode 100644index 0000000000..e4597be857Binary files /dev/null and b/docs/images/Platform API 2.png differdiff --git a/docs/images/Platform API 3.png b/docs/images/Platform API 3.pngnew file mode 100644index 0000000000..781d34f034Binary files /dev/null and b/docs/images/Platform API 3.png differdiff --git a/docs/images/Platform API 4.png b/docs/images/Platform API 4.pngnew file mode 100644index 0000000000..67cef6a3b0Binary files /dev/null and b/docs/images/Platform API 4.png differdiff --git a/docs/images/Screenshot 2023-10-31 at 18.57.13.png b/docs/images/Screenshot 2023-10-31 at 18.57.13.pngnew file mode 100644index 0000000000..7abba91a77Binary files /dev/null and b/docs/images/Screenshot 2023-10-31 at 18.57.13.png differdiff --git a/docs/images/Spree Login.png b/docs/images/Spree Login.pngnew file mode 100644index 0000000000..a2edd953b6Binary files /dev/null and b/docs/images/Spree Login.png differdiff --git a/docs/images/Spree Vue Storefront.png b/docs/images/Spree Vue Storefront.pngnew file mode 100644index 0000000000..2a7f715f9eBinary files /dev/null and b/docs/images/Spree Vue Storefront.png differdiff --git a/docs/images/admin_panel_978-2x.jpg b/docs/images/admin_panel_978-2x.jpgnew file mode 100644index 0000000000..852135bad9Binary files /dev/null and b/docs/images/admin_panel_978-2x.jpg differdiff --git a/docs/images/admin_panel_978-2x.png b/docs/images/admin_panel_978-2x.pngnew file mode 100644index 0000000000..9395830534Binary files /dev/null and b/docs/images/admin_panel_978-2x.png differdiff --git a/docs/images/clo1 (1).png b/docs/images/clo1 (1).pngnew file mode 100644index 0000000000..72f6b10940Binary files /dev/null and b/docs/images/clo1 (1).png differdiff --git a/docs/images/clo1.png b/docs/images/clo1.pngnew file mode 100644index 0000000000..014310a1fcBinary files /dev/null and b/docs/images/clo1.png differdiff --git a/docs/images/clo2.png b/docs/images/clo2.pngnew file mode 100644index 0000000000..2ae414d713Binary files /dev/null and b/docs/images/clo2.png differdiff --git a/docs/images/clo3.png b/docs/images/clo3.pngnew file mode 100644index 0000000000..6dbcf41e0bBinary files /dev/null and b/docs/images/clo3.png differdiff --git a/docs/images/cms_navigation.png b/docs/images/cms_navigation.pngnew file mode 100644index 0000000000..3febb0bdc2Binary files /dev/null and b/docs/images/cms_navigation.png differdiff --git a/docs/images/cms_pages.png b/docs/images/cms_pages.pngnew file mode 100644index 0000000000..0d4ed07a54Binary files /dev/null and b/docs/images/cms_pages.png differdiff --git a/docs/images/cre1.png b/docs/images/cre1.pngnew file mode 100644index 0000000000..29eb0010e8Binary files /dev/null and b/docs/images/cre1.png differdiff --git a/docs/images/cre2.png b/docs/images/cre2.pngnew file mode 100644index 0000000000..1183d72671Binary files /dev/null and b/docs/images/cre2.png differdiff --git a/docs/images/del.png b/docs/images/del.pngnew file mode 100644index 0000000000..958ca8b0afBinary files /dev/null and b/docs/images/del.png differdiff --git a/docs/images/erd.jpg b/docs/images/erd.jpgnew file mode 100644index 0000000000..28cac73af8Binary files /dev/null and b/docs/images/erd.jpg differdiff --git a/docs/images/image (1) (1).png b/docs/images/image (1) (1).pngnew file mode 100644index 0000000000..31e8016c11Binary files /dev/null and b/docs/images/image (1) (1).png differdiff --git a/docs/images/image (1).png b/docs/images/image (1).pngnew file mode 100644index 0000000000..31e8016c11Binary files /dev/null and b/docs/images/image (1).png differdiff --git a/docs/images/image (10).png b/docs/images/image (10).pngnew file mode 100644index 0000000000..4bbb1dd805Binary files /dev/null and b/docs/images/image (10).png differdiff --git a/docs/images/image (100).png b/docs/images/image (100).pngnew file mode 100644index 0000000000..387ffa387bBinary files /dev/null and b/docs/images/image (100).png differdiff --git a/docs/images/image (101).png b/docs/images/image (101).pngnew file mode 100644index 0000000000..da988d6d17Binary files /dev/null and b/docs/images/image (101).png differdiff --git a/docs/images/image (102).png b/docs/images/image (102).pngnew file mode 100644index 0000000000..97fdb2116bBinary files /dev/null and b/docs/images/image (102).png differdiff --git a/docs/images/image (103).png b/docs/images/image (103).pngnew file mode 100644index 0000000000..5be9cade9cBinary files /dev/null and b/docs/images/image (103).png differdiff --git a/docs/images/image (104).png b/docs/images/image (104).pngnew file mode 100644index 0000000000..c4ccfeb730Binary files /dev/null and b/docs/images/image (104).png differdiff --git a/docs/images/image (105).png b/docs/images/image (105).pngnew file mode 100644index 0000000000..b2cb7c7c57Binary files /dev/null and b/docs/images/image (105).png differdiff --git a/docs/images/image (106).png b/docs/images/image (106).pngnew file mode 100644index 0000000000..3e1486fedcBinary files /dev/null and b/docs/images/image (106).png differdiff --git a/docs/images/image (107).png b/docs/images/image (107).pngnew file mode 100644index 0000000000..65c751565dBinary files /dev/null and b/docs/images/image (107).png differdiff --git a/docs/images/image (108).png b/docs/images/image (108).pngnew file mode 100644index 0000000000..82286dde98Binary files /dev/null and b/docs/images/image (108).png differdiff --git a/docs/images/image (109).png b/docs/images/image (109).pngnew file mode 100644index 0000000000..8c438c1ac4Binary files /dev/null and b/docs/images/image (109).png differdiff --git a/docs/images/image (11).png b/docs/images/image (11).pngnew file mode 100644index 0000000000..8928251cb9Binary files /dev/null and b/docs/images/image (11).png differdiff --git a/docs/images/image (110).png b/docs/images/image (110).pngnew file mode 100644index 0000000000..fe03ab1e12Binary files /dev/null and b/docs/images/image (110).png differdiff --git a/docs/images/image (111).png b/docs/images/image (111).pngnew file mode 100644index 0000000000..59306a0f45Binary files /dev/null and b/docs/images/image (111).png differdiff --git a/docs/images/image (112).png b/docs/images/image (112).pngnew file mode 100644index 0000000000..256b93964bBinary files /dev/null and b/docs/images/image (112).png differdiff --git a/docs/images/image (113).png b/docs/images/image (113).pngnew file mode 100644index 0000000000..d167f117a3Binary files /dev/null and b/docs/images/image (113).png differdiff --git a/docs/images/image (114).png b/docs/images/image (114).pngnew file mode 100644index 0000000000..e6020e055dBinary files /dev/null and b/docs/images/image (114).png differdiff --git a/docs/images/image (115).png b/docs/images/image (115).pngnew file mode 100644index 0000000000..29b13010d0Binary files /dev/null and b/docs/images/image (115).png differdiff --git a/docs/images/image (116).png b/docs/images/image (116).pngnew file mode 100644index 0000000000..fe03ab1e12Binary files /dev/null and b/docs/images/image (116).png differdiff --git a/docs/images/image (117).png b/docs/images/image (117).pngnew file mode 100644index 0000000000..60c9441b4eBinary files /dev/null and b/docs/images/image (117).png differdiff --git a/docs/images/image (118).png b/docs/images/image (118).pngnew file mode 100644index 0000000000..d91b0929a6Binary files /dev/null and b/docs/images/image (118).png differdiff --git a/docs/images/image (119).png b/docs/images/image (119).pngnew file mode 100644index 0000000000..215f385be5Binary files /dev/null and b/docs/images/image (119).png differdiff --git a/docs/images/image (12).png b/docs/images/image (12).pngnew file mode 100644index 0000000000..4bb5ba5ee6Binary files /dev/null and b/docs/images/image (12).png differdiff --git a/docs/images/image (120).png b/docs/images/image (120).pngnew file mode 100644index 0000000000..76e0f1dbfeBinary files /dev/null and b/docs/images/image (120).png differdiff --git a/docs/images/image (121).png b/docs/images/image (121).pngnew file mode 100644index 0000000000..9ece87b074Binary files /dev/null and b/docs/images/image (121).png differdiff --git a/docs/images/image (122).png b/docs/images/image (122).pngnew file mode 100644index 0000000000..8ad004b225Binary files /dev/null and b/docs/images/image (122).png differdiff --git a/docs/images/image (123).png b/docs/images/image (123).pngnew file mode 100644index 0000000000..b04ce35634Binary files /dev/null and b/docs/images/image (123).png differdiff --git a/docs/images/image (124).png b/docs/images/image (124).pngnew file mode 100644index 0000000000..df1f5d47d5Binary files /dev/null and b/docs/images/image (124).png differdiff --git a/docs/images/image (125).png b/docs/images/image (125).pngnew file mode 100644index 0000000000..275963073eBinary files /dev/null and b/docs/images/image (125).png differdiff --git a/docs/images/image (126).png b/docs/images/image (126).pngnew file mode 100644index 0000000000..6f8683bb47Binary files /dev/null and b/docs/images/image (126).png differdiff --git a/docs/images/image (127).png b/docs/images/image (127).pngnew file mode 100644index 0000000000..29972c8d4eBinary files /dev/null and b/docs/images/image (127).png differdiff --git a/docs/images/image (128).png b/docs/images/image (128).pngnew file mode 100644index 0000000000..6f8683bb47Binary files /dev/null and b/docs/images/image (128).png differdiff --git a/docs/images/image (129).png b/docs/images/image (129).pngnew file mode 100644index 0000000000..b04ce35634Binary files /dev/null and b/docs/images/image (129).png differdiff --git a/docs/images/image (13).png b/docs/images/image (13).pngnew file mode 100644index 0000000000..30ebd8bac6Binary files /dev/null and b/docs/images/image (13).png differdiff --git a/docs/images/image (130).png b/docs/images/image (130).pngnew file mode 100644index 0000000000..fed3e6bb9aBinary files /dev/null and b/docs/images/image (130).png differdiff --git a/docs/images/image (131).png b/docs/images/image (131).pngnew file mode 100644index 0000000000..425e635b85Binary files /dev/null and b/docs/images/image (131).png differdiff --git a/docs/images/image (132).png b/docs/images/image (132).pngnew file mode 100644index 0000000000..b6c8916b0bBinary files /dev/null and b/docs/images/image (132).png differdiff --git a/docs/images/image (14).png b/docs/images/image (14).pngnew file mode 100644index 0000000000..9cc0db8360Binary files /dev/null and b/docs/images/image (14).png differdiff --git a/docs/images/image (15).png b/docs/images/image (15).pngnew file mode 100644index 0000000000..0405a714c2Binary files /dev/null and b/docs/images/image (15).png differdiff --git a/docs/images/image (16).png b/docs/images/image (16).pngnew file mode 100644index 0000000000..fd851e3545Binary files /dev/null and b/docs/images/image (16).png differdiff --git a/docs/images/image (17).png b/docs/images/image (17).pngnew file mode 100644index 0000000000..689cd6bc48Binary files /dev/null and b/docs/images/image (17).png differdiff --git a/docs/images/image (18).png b/docs/images/image (18).pngnew file mode 100644index 0000000000..1165f80180Binary files /dev/null and b/docs/images/image (18).png differdiff --git a/docs/images/image (19).png b/docs/images/image (19).pngnew file mode 100644index 0000000000..8bba03da47Binary files /dev/null and b/docs/images/image (19).png differdiff --git a/docs/images/image (2).png b/docs/images/image (2).pngnew file mode 100644index 0000000000..a29e6f9919Binary files /dev/null and b/docs/images/image (2).png differdiff --git a/docs/images/image (20).png b/docs/images/image (20).pngnew file mode 100644index 0000000000..916359ed62Binary files /dev/null and b/docs/images/image (20).png differdiff --git a/docs/images/image (21).png b/docs/images/image (21).pngnew file mode 100644index 0000000000..bb76732a2fBinary files /dev/null and b/docs/images/image (21).png differdiff --git a/docs/images/image (22).png b/docs/images/image (22).pngnew file mode 100644index 0000000000..ac62710a8fBinary files /dev/null and b/docs/images/image (22).png differdiff --git a/docs/images/image (23).png b/docs/images/image (23).pngnew file mode 100644index 0000000000..87446cd340Binary files /dev/null and b/docs/images/image (23).png differdiff --git a/docs/images/image (24).png b/docs/images/image (24).pngnew file mode 100644index 0000000000..efd6ea7dd0Binary files /dev/null and b/docs/images/image (24).png differdiff --git a/docs/images/image (25).png b/docs/images/image (25).pngnew file mode 100644index 0000000000..d45a7c651aBinary files /dev/null and b/docs/images/image (25).png differdiff --git a/docs/images/image (26).png b/docs/images/image (26).pngnew file mode 100644index 0000000000..ff004ac31eBinary files /dev/null and b/docs/images/image (26).png differdiff --git a/docs/images/image (27).png b/docs/images/image (27).pngnew file mode 100644index 0000000000..a8c322d9efBinary files /dev/null and b/docs/images/image (27).png differdiff --git a/docs/images/image (28).png b/docs/images/image (28).pngnew file mode 100644index 0000000000..0ca2f8bf6dBinary files /dev/null and b/docs/images/image (28).png differdiff --git a/docs/images/image (29).png b/docs/images/image (29).pngnew file mode 100644index 0000000000..ed0bfe56e5Binary files /dev/null and b/docs/images/image (29).png differdiff --git a/docs/images/image (3).png b/docs/images/image (3).pngnew file mode 100644index 0000000000..2a5d77a671Binary files /dev/null and b/docs/images/image (3).png differdiff --git a/docs/images/image (30).png b/docs/images/image (30).pngnew file mode 100644index 0000000000..c23432bc56Binary files /dev/null and b/docs/images/image (30).png differdiff --git a/docs/images/image (31).png b/docs/images/image (31).pngnew file mode 100644index 0000000000..52da7f379cBinary files /dev/null and b/docs/images/image (31).png differdiff --git a/docs/images/image (32).png b/docs/images/image (32).pngnew file mode 100644index 0000000000..9313ee0405Binary files /dev/null and b/docs/images/image (32).png differdiff --git a/docs/images/image (33).png b/docs/images/image (33).pngnew file mode 100644index 0000000000..b604600129Binary files /dev/null and b/docs/images/image (33).png differdiff --git a/docs/images/image (34).png b/docs/images/image (34).pngnew file mode 100644index 0000000000..84d5eeb396Binary files /dev/null and b/docs/images/image (34).png differdiff --git a/docs/images/image (35).png b/docs/images/image (35).pngnew file mode 100644index 0000000000..c647dc193eBinary files /dev/null and b/docs/images/image (35).png differdiff --git a/docs/images/image (36).png b/docs/images/image (36).pngnew file mode 100644index 0000000000..e6bf4cf78cBinary files /dev/null and b/docs/images/image (36).png differdiff --git a/docs/images/image (37).png b/docs/images/image (37).pngnew file mode 100644index 0000000000..8f38d9f2e0Binary files /dev/null and b/docs/images/image (37).png differdiff --git a/docs/images/image (38).png b/docs/images/image (38).pngnew file mode 100644index 0000000000..91b42a9b83Binary files /dev/null and b/docs/images/image (38).png differdiff --git a/docs/images/image (39).png b/docs/images/image (39).pngnew file mode 100644index 0000000000..19a5abb480Binary files /dev/null and b/docs/images/image (39).png differdiff --git a/docs/images/image (4) (1).png b/docs/images/image (4) (1).pngnew file mode 100644index 0000000000..1044a5eec5Binary files /dev/null and b/docs/images/image (4) (1).png differdiff --git a/docs/images/image (4).png b/docs/images/image (4).pngnew file mode 100644index 0000000000..1044a5eec5Binary files /dev/null and b/docs/images/image (4).png differdiff --git a/docs/images/image (40).png b/docs/images/image (40).pngnew file mode 100644index 0000000000..605c3d0001Binary files /dev/null and b/docs/images/image (40).png differdiff --git a/docs/images/image (41).png b/docs/images/image (41).pngnew file mode 100644index 0000000000..a4238057eaBinary files /dev/null and b/docs/images/image (41).png differdiff --git a/docs/images/image (42).png b/docs/images/image (42).pngnew file mode 100644index 0000000000..006fe194f5Binary files /dev/null and b/docs/images/image (42).png differdiff --git a/docs/images/image (43).png b/docs/images/image (43).pngnew file mode 100644index 0000000000..99b56af986Binary files /dev/null and b/docs/images/image (43).png differdiff --git a/docs/images/image (44).png b/docs/images/image (44).pngnew file mode 100644index 0000000000..296f884fbdBinary files /dev/null and b/docs/images/image (44).png differdiff --git a/docs/images/image (45).png b/docs/images/image (45).pngnew file mode 100644index 0000000000..948ec6dc6aBinary files /dev/null and b/docs/images/image (45).png differdiff --git a/docs/images/image (46).png b/docs/images/image (46).pngnew file mode 100644index 0000000000..26212a6a0eBinary files /dev/null and b/docs/images/image (46).png differdiff --git a/docs/images/image (47).png b/docs/images/image (47).pngnew file mode 100644index 0000000000..3e76ebaf9fBinary files /dev/null and b/docs/images/image (47).png differdiff --git a/docs/images/image (48).png b/docs/images/image (48).pngnew file mode 100644index 0000000000..68284aa020Binary files /dev/null and b/docs/images/image (48).png differdiff --git a/docs/images/image (49).png b/docs/images/image (49).pngnew file mode 100644index 0000000000..d282e9f624Binary files /dev/null and b/docs/images/image (49).png differdiff --git a/docs/images/image (5).png b/docs/images/image (5).pngnew file mode 100644index 0000000000..ad44d9281eBinary files /dev/null and b/docs/images/image (5).png differdiff --git a/docs/images/image (50).png b/docs/images/image (50).pngnew file mode 100644index 0000000000..6f6ab41e37Binary files /dev/null and b/docs/images/image (50).png differdiff --git a/docs/images/image (51).png b/docs/images/image (51).pngnew file mode 100644index 0000000000..7a61e0d5ceBinary files /dev/null and b/docs/images/image (51).png differdiff --git a/docs/images/image (52).png b/docs/images/image (52).pngnew file mode 100644index 0000000000..74a36d60f8Binary files /dev/null and b/docs/images/image (52).png differdiff --git a/docs/images/image (53).png b/docs/images/image (53).pngnew file mode 100644index 0000000000..1b171d6660Binary files /dev/null and b/docs/images/image (53).png differdiff --git a/docs/images/image (54).png b/docs/images/image (54).pngnew file mode 100644index 0000000000..02c5f401c7Binary files /dev/null and b/docs/images/image (54).png differdiff --git a/docs/images/image (55).png b/docs/images/image (55).pngnew file mode 100644index 0000000000..9fcd014e22Binary files /dev/null and b/docs/images/image (55).png differdiff --git a/docs/images/image (56).png b/docs/images/image (56).pngnew file mode 100644index 0000000000..d713c4467eBinary files /dev/null and b/docs/images/image (56).png differdiff --git a/docs/images/image (57).png b/docs/images/image (57).pngnew file mode 100644index 0000000000..16991c488eBinary files /dev/null and b/docs/images/image (57).png differdiff --git a/docs/images/image (58).png b/docs/images/image (58).pngnew file mode 100644index 0000000000..da5651e101Binary files /dev/null and b/docs/images/image (58).png differdiff --git a/docs/images/image (59).png b/docs/images/image (59).pngnew file mode 100644index 0000000000..24686d3eb5Binary files /dev/null and b/docs/images/image (59).png differdiff --git a/docs/images/image (6).png b/docs/images/image (6).pngnew file mode 100644index 0000000000..1e7f6dae78Binary files /dev/null and b/docs/images/image (6).png differdiff --git a/docs/images/image (60).png b/docs/images/image (60).pngnew file mode 100644index 0000000000..29f423634eBinary files /dev/null and b/docs/images/image (60).png differdiff --git a/docs/images/image (61).png b/docs/images/image (61).pngnew file mode 100644index 0000000000..7862ee625bBinary files /dev/null and b/docs/images/image (61).png differdiff --git a/docs/images/image (62).png b/docs/images/image (62).pngnew file mode 100644index 0000000000..b3e239f2b6Binary files /dev/null and b/docs/images/image (62).png differdiff --git a/docs/images/image (63).png b/docs/images/image (63).pngnew file mode 100644index 0000000000..828f087f61Binary files /dev/null and b/docs/images/image (63).png differdiff --git a/docs/images/image (64).png b/docs/images/image (64).pngnew file mode 100644index 0000000000..36fe2a1e35Binary files /dev/null and b/docs/images/image (64).png differdiff --git a/docs/images/image (65).png b/docs/images/image (65).pngnew file mode 100644index 0000000000..572bbda9ccBinary files /dev/null and b/docs/images/image (65).png differdiff --git a/docs/images/image (66).png b/docs/images/image (66).pngnew file mode 100644index 0000000000..acf382d839Binary files /dev/null and b/docs/images/image (66).png differdiff --git a/docs/images/image (67).png b/docs/images/image (67).pngnew file mode 100644index 0000000000..dd933bf948Binary files /dev/null and b/docs/images/image (67).png differdiff --git a/docs/images/image (68).png b/docs/images/image (68).pngnew file mode 100644index 0000000000..cd7ac56013Binary files /dev/null and b/docs/images/image (68).png differdiff --git a/docs/images/image (69).png b/docs/images/image (69).pngnew file mode 100644index 0000000000..832fdca57bBinary files /dev/null and b/docs/images/image (69).png differdiff --git a/docs/images/image (7).png b/docs/images/image (7).pngnew file mode 100644index 0000000000..3db41ec3cfBinary files /dev/null and b/docs/images/image (7).png differdiff --git a/docs/images/image (70).png b/docs/images/image (70).pngnew file mode 100644index 0000000000..1d89c9e623Binary files /dev/null and b/docs/images/image (70).png differdiff --git a/docs/images/image (71).png b/docs/images/image (71).pngnew file mode 100644index 0000000000..13a8bc6e0cBinary files /dev/null and b/docs/images/image (71).png differdiff --git a/docs/images/image (72).png b/docs/images/image (72).pngnew file mode 100644index 0000000000..a982882406Binary files /dev/null and b/docs/images/image (72).png differdiff --git a/docs/images/image (73).png b/docs/images/image (73).pngnew file mode 100644index 0000000000..fa975186e6Binary files /dev/null and b/docs/images/image (73).png differdiff --git a/docs/images/image (74).png b/docs/images/image (74).pngnew file mode 100644index 0000000000..13837a1fc5Binary files /dev/null and b/docs/images/image (74).png differdiff --git a/docs/images/image (75).png b/docs/images/image (75).pngnew file mode 100644index 0000000000..f1a876c9c2Binary files /dev/null and b/docs/images/image (75).png differdiff --git a/docs/images/image (76).png b/docs/images/image (76).pngnew file mode 100644index 0000000000..69f2e45d27Binary files /dev/null and b/docs/images/image (76).png differdiff --git a/docs/images/image (77).png b/docs/images/image (77).pngnew file mode 100644index 0000000000..31f1c50bc4Binary files /dev/null and b/docs/images/image (77).png differdiff --git a/docs/images/image (78).png b/docs/images/image (78).pngnew file mode 100644index 0000000000..a778074668Binary files /dev/null and b/docs/images/image (78).png differdiff --git a/docs/images/image (79).png b/docs/images/image (79).pngnew file mode 100644index 0000000000..b610497418Binary files /dev/null and b/docs/images/image (79).png differdiff --git a/docs/images/image (8).png b/docs/images/image (8).pngnew file mode 100644index 0000000000..369176772bBinary files /dev/null and b/docs/images/image (8).png differdiff --git a/docs/images/image (80).png b/docs/images/image (80).pngnew file mode 100644index 0000000000..3fa7b3dbcaBinary files /dev/null and b/docs/images/image (80).png differdiff --git a/docs/images/image (81).png b/docs/images/image (81).pngnew file mode 100644index 0000000000..6ed47b5b43Binary files /dev/null and b/docs/images/image (81).png differdiff --git a/docs/images/image (82).png b/docs/images/image (82).pngnew file mode 100644index 0000000000..875afd80c7Binary files /dev/null and b/docs/images/image (82).png differdiff --git a/docs/images/image (83).png b/docs/images/image (83).pngnew file mode 100644index 0000000000..f8bddabbc6Binary files /dev/null and b/docs/images/image (83).png differdiff --git a/docs/images/image (84).png b/docs/images/image (84).pngnew file mode 100644index 0000000000..feab9b6c44Binary files /dev/null and b/docs/images/image (84).png differdiff --git a/docs/images/image (85).png b/docs/images/image (85).pngnew file mode 100644index 0000000000..4f03672572Binary files /dev/null and b/docs/images/image (85).png differdiff --git a/docs/images/image (86).png b/docs/images/image (86).pngnew file mode 100644index 0000000000..38d2c509b2Binary files /dev/null and b/docs/images/image (86).png differdiff --git a/docs/images/image (87).png b/docs/images/image (87).pngnew file mode 100644index 0000000000..983e3d7966Binary files /dev/null and b/docs/images/image (87).png differdiff --git a/docs/images/image (88).png b/docs/images/image (88).pngnew file mode 100644index 0000000000..0c8ff0481aBinary files /dev/null and b/docs/images/image (88).png differdiff --git a/docs/images/image (89).png b/docs/images/image (89).pngnew file mode 100644index 0000000000..a5774adb2bBinary files /dev/null and b/docs/images/image (89).png differdiff --git a/docs/images/image (9).png b/docs/images/image (9).pngnew file mode 100644index 0000000000..37959e4158Binary files /dev/null and b/docs/images/image (9).png differdiff --git a/docs/images/image (90).png b/docs/images/image (90).pngnew file mode 100644index 0000000000..77e11a5ad7Binary files /dev/null and b/docs/images/image (90).png differdiff --git a/docs/images/image (91).png b/docs/images/image (91).pngnew file mode 100644index 0000000000..dfd7a96494Binary files /dev/null and b/docs/images/image (91).png differdiff --git a/docs/images/image (92).png b/docs/images/image (92).pngnew file mode 100644index 0000000000..e7f14fb486Binary files /dev/null and b/docs/images/image (92).png differdiff --git a/docs/images/image (93).png b/docs/images/image (93).pngnew file mode 100644index 0000000000..171ad5b8fbBinary files /dev/null and b/docs/images/image (93).png differdiff --git a/docs/images/image (94).png b/docs/images/image (94).pngnew file mode 100644index 0000000000..8150b78498Binary files /dev/null and b/docs/images/image (94).png differdiff --git a/docs/images/image (95).png b/docs/images/image (95).pngnew file mode 100644index 0000000000..505f939c61Binary files /dev/null and b/docs/images/image (95).png differdiff --git a/docs/images/image (96).png b/docs/images/image (96).pngnew file mode 100644index 0000000000..cb6bc4a53bBinary files /dev/null and b/docs/images/image (96).png differdiff --git a/docs/images/image (97).png b/docs/images/image (97).pngnew file mode 100644index 0000000000..8195f5aa6dBinary files /dev/null and b/docs/images/image (97).png differdiff --git a/docs/images/image (98).png b/docs/images/image (98).pngnew file mode 100644index 0000000000..554ca75e28Binary files /dev/null and b/docs/images/image (98).png differdiff --git a/docs/images/image (99).png b/docs/images/image (99).pngnew file mode 100644index 0000000000..8fb9f6c561Binary files /dev/null and b/docs/images/image (99).png differdiff --git a/docs/images/image.png b/docs/images/image.pngnew file mode 100644index 0000000000..58b038316dBinary files /dev/null and b/docs/images/image.png differdiff --git a/docs/images/image2 (1).png b/docs/images/image2 (1).pngnew file mode 100644index 0000000000..167e45a876Binary files /dev/null and b/docs/images/image2 (1).png differdiff --git a/docs/images/image2 (2).png b/docs/images/image2 (2).pngnew file mode 100644index 0000000000..11e6981fddBinary files /dev/null and b/docs/images/image2 (2).png differdiff --git a/docs/images/image2 (3).png b/docs/images/image2 (3).pngnew file mode 100644index 0000000000..2956744c6fBinary files /dev/null and b/docs/images/image2 (3).png differdiff --git a/docs/images/image2 (4).png b/docs/images/image2 (4).pngnew file mode 100644index 0000000000..f309468db4Binary files /dev/null and b/docs/images/image2 (4).png differdiff --git a/docs/images/image2 (5).png b/docs/images/image2 (5).pngnew file mode 100644index 0000000000..5650702dddBinary files /dev/null and b/docs/images/image2 (5).png differdiff --git a/docs/images/image2.png b/docs/images/image2.pngnew file mode 100644index 0000000000..7b5e50674dBinary files /dev/null and b/docs/images/image2.png differdiff --git a/docs/images/linkedin_cover_profile-2x.png b/docs/images/linkedin_cover_profile-2x.pngnew file mode 100644index 0000000000..03ad2efc4cBinary files /dev/null and b/docs/images/linkedin_cover_profile-2x.png differdiff --git a/docs/images/mulit_store_978x2.png b/docs/images/mulit_store_978x2.pngnew file mode 100644index 0000000000..f3f9f63092Binary files /dev/null and b/docs/images/mulit_store_978x2.png differdiff --git a/docs/images/payment_flow.jpg b/docs/images/payment_flow.jpgnew file mode 100644index 0000000000..88d36ece13Binary files /dev/null and b/docs/images/payment_flow.jpg differdiff --git a/docs/images/platform_api_diagram.jpg b/docs/images/platform_api_diagram.jpgnew file mode 100644index 0000000000..eecb8d1b5bBinary files /dev/null and b/docs/images/platform_api_diagram.jpg differdiff --git a/docs/images/prod1 (1).png b/docs/images/prod1 (1).pngnew file mode 100644index 0000000000..7837338082Binary files /dev/null and b/docs/images/prod1 (1).png differdiff --git a/docs/images/prod1.png b/docs/images/prod1.pngnew file mode 100644index 0000000000..7837338082Binary files /dev/null and b/docs/images/prod1.png differdiff --git a/docs/images/screenshot-2021-09-14-at-22.45.58.png b/docs/images/screenshot-2021-09-14-at-22.45.58.pngnew file mode 100644index 0000000000..b208054301Binary files /dev/null and b/docs/images/screenshot-2021-09-14-at-22.45.58.png differdiff --git a/docs/images/screenshot-2021-10-05-at-11.19.20.png b/docs/images/screenshot-2021-10-05-at-11.19.20.pngnew file mode 100644index 0000000000..90d3e43757Binary files /dev/null and b/docs/images/screenshot-2021-10-05-at-11.19.20.png differdiff --git a/docs/images/spark_solutions_logo.png b/docs/images/spark_solutions_logo.pngnew file mode 100644index 0000000000..7f872c7d39Binary files /dev/null and b/docs/images/spark_solutions_logo.png differdiff --git a/docs/images/spree_admin_store_settings.png b/docs/images/spree_admin_store_settings.pngnew file mode 100644index 0000000000..c232ac8f0dBinary files /dev/null and b/docs/images/spree_admin_store_settings.png differdiff --git a/docs/images/spree_commerce_home_header_2-2x-1-.png b/docs/images/spree_commerce_home_header_2-2x-1-.pngnew file mode 100644index 0000000000..ce942b9e70Binary files /dev/null and b/docs/images/spree_commerce_home_header_2-2x-1-.png differdiff --git a/docs/images/spree_commerce_home_header_2-2x.png b/docs/images/spree_commerce_home_header_2-2x.pngnew file mode 100644index 0000000000..efe3b26291Binary files /dev/null and b/docs/images/spree_commerce_home_header_2-2x.png differdiff --git a/docs/images/spree_commerce_spree_api_3-2x.png b/docs/images/spree_commerce_spree_api_3-2x.pngnew file mode 100644index 0000000000..204a896c28Binary files /dev/null and b/docs/images/spree_commerce_spree_api_3-2x.png differdiff --git a/docs/images/spree_commerce_spree_api_6.png b/docs/images/spree_commerce_spree_api_6.pngnew file mode 100644index 0000000000..e67fc26243Binary files /dev/null and b/docs/images/spree_commerce_spree_api_6.png differdiff --git a/docs/images/spree_header_978-2x.png b/docs/images/spree_header_978-2x.pngnew file mode 100644index 0000000000..67f3aa7de9Binary files /dev/null and b/docs/images/spree_header_978-2x.png differdiff --git a/docs/images/starter_template.png b/docs/images/starter_template.pngnew file mode 100644index 0000000000..d88e315948Binary files /dev/null and b/docs/images/starter_template.png differdiff --git a/docs/images/zrzut-ekranu-2021-08-19-135155.jpg b/docs/images/zrzut-ekranu-2021-08-19-135155.jpgnew file mode 100644index 0000000000..4be1e11561Binary files /dev/null and b/docs/images/zrzut-ekranu-2021-08-19-135155.jpg differdiff --git a/docs/images/zrzut-ekranu-2021-08-19-161951.jpg b/docs/images/zrzut-ekranu-2021-08-19-161951.jpgnew file mode 100644index 0000000000..2f16d52d5dBinary files /dev/null and b/docs/images/zrzut-ekranu-2021-08-19-161951.jpg differdiff --git a/docs/images/zrzut-ekranu-2021-08-19-162218.jpg b/docs/images/zrzut-ekranu-2021-08-19-162218.jpgnew file mode 100644index 0000000000..e821ed5e62Binary files /dev/null and b/docs/images/zrzut-ekranu-2021-08-19-162218.jpg differdiff --git a/docs/images/zrzut-ekranu-2021-08-20-000659.jpg b/docs/images/zrzut-ekranu-2021-08-20-000659.jpgnew file mode 100644index 0000000000..877d342027Binary files /dev/null and b/docs/images/zrzut-ekranu-2021-08-20-000659.jpg differdiff --git a/docs/images/zrzut-ekranu-2021-08-20-001032.jpg b/docs/images/zrzut-ekranu-2021-08-20-001032.jpgnew file mode 100644index 0000000000..6284f36edbBinary files /dev/null and b/docs/images/zrzut-ekranu-2021-08-20-001032.jpg differdiff --git a/docs/logo/logo_dark.png b/docs/logo/logo_dark.pngnew file mode 100644index 0000000000..da379f90eeBinary files /dev/null and b/docs/logo/logo_dark.png differdiff --git a/docs/logo/logo_light.png b/docs/logo/logo_light.pngnew file mode 100644index 0000000000..ff125cfe16Binary files /dev/null and b/docs/logo/logo_light.png differdiff --git a/docs/mint.json b/docs/mint.jsonnew file mode 100644index 0000000000..134fde27e3--- /dev/null+++ b/docs/mint.json@@ -0,0 +1,759 @@+{+ "$schema": "https://mintlify.com/schema.json",+ "name": "Spree Commerce Guides",+ "logo": {+ "dark": "/logo/logo_dark.png",+ "light": "/logo/logo_light.png",+ "href": "https://spreecommerce.org"+ },+ "favicon": "/favicon.png",+ "colors": {+ "primary": "#0A2242",+ "light": "#D7DFE9",+ "dark": "#0A2242",+ "anchors": {+ "from": "#233855",+ "to": "#233855"+ },+ "background": {+ "light": "#F3F3F3"+ }+ },+ "api": {+ "baseUrl": ["http://localhost:3000", "https://demo.spreecommerce.org"]+ },+ "openapi": [+ "/api-reference/storefront.yaml",+ "/api-reference/platform.yaml"+ ],+ "topbarLinks": [+ {+ "name": "Support",+ "url": "mailto:[email protected]"+ }+ ],+ "topbarCtaButton": {+ "type": "link",+ "name": "Get started",+ "url": "https://spreecommerce.org/contact/"+ },+ "tabs": [+ {+ "name": "API Reference",+ "url": "api-reference"+ }+ ],+ "primaryTab": {+ "name": "Docs"+ },+ "anchors": [+ {+ "name": "Community",+ "icon": "slack",+ "url": "http://slack.spreecommerce.org/"+ },+ {+ "name": "Showcase",+ "icon": "trophy",+ "url": "https://spreecommerce.org/success-stories/"+ },+ {+ "name": "Github",+ "icon": "github",+ "url": "https://github.com/spree/spree"+ },+ {+ "name": "Blog",+ "icon": "newspaper",+ "url": "https://spreecommerce.org/blog/"+ }+ ],+ "navigation": [+ {+ "group": "Getting started",+ "pages": [+ "developer/getting-started/quickstart"+ ]+ },+ {+ "group": "Core Concepts",+ "pages": [+ "developer/core-concepts/architecture",+ "developer/core-concepts/stores",+ "developer/core-concepts/orders",+ "developer/core-concepts/users",+ "developer/core-concepts/products",+ "developer/core-concepts/inventory",+ "developer/core-concepts/payments",+ "developer/core-concepts/taxes",+ "developer/core-concepts/promotions",+ "developer/core-concepts/shipments",+ "developer/core-concepts/addresses"+ ]+ },++ {+ "group": "Customizing Spree",+ "pages": [+ "developer/customization/quickstart",+ "developer/customization/authentication",+ "developer/customization/permissions"+ ]+ },++ {+ "group": "Extending Spree",+ "pages": [+ "developer/extending-spree/promotions",+ "developer/extending-spree/3rd-party-extensions"+ ]+ },++ {+ "group": "Contributing",+ "pages": [+ "developer/contributing/quickstart",+ "developer/contributing/creating-an-extension"+ ]+ },++ {+ "group": "API basics",+ "pages": [+ "api-reference/introduction",+ "api-reference/pagination",+ "api-reference/filtering-and-sorting",+ "api-reference/fetching-multiple-resources"+ ]+ },+ {+ "group": "Storefront API",+ "pages": [+ "api-reference/storefront/authentication",+ {+ "group": "Account",+ "pages": [+ "api-reference/storefront/account/retrieve-an-account",+ "api-reference/storefront/account/create-an-account",+ "api-reference/storefront/account/update-an-account"+ ]+ },+ {+ "group": "Account / Address",+ "pages": [+ "api-reference/storefront/account-address/list-all-addresses",+ "api-reference/storefront/account-address/create-an-address",+ "api-reference/storefront/account-address/remove-an-address",+ "api-reference/storefront/account-address/update-an-address"+ ]+ },+ {+ "group": "Account / Credit Cards",+ "pages": [+ "api-reference/storefront/account-credit-cards/list-all-credit-cards",+ "api-reference/storefront/account-credit-cards/remove-a-credit-card",+ "api-reference/storefront/account-credit-cards/retrieve-the-default-credit-card"+ ]+ },+ {+ "group": "Account / Orders",+ "pages": [+ "api-reference/storefront/account-orders/list-all-orders",+ "api-reference/storefront/account-orders/retrieve-an-order"+ ]+ },+ {+ "group": "Order Status",+ "pages": [+ "api-reference/storefront/order-status/retrieve-an-order-status"+ ]+ },+ {+ "group": "Cart",+ "pages": [+ "api-reference/storefront/cart/retrieve-a-cart",+ "api-reference/storefront/cart/create-a-cart",+ "api-reference/storefront/cart/delete-a-cart"+ ]+ },+ {+ "group": "Cart / Line Items",+ "pages": [+ "api-reference/storefront/cart-line-items/add-an-item-to-cart",+ "api-reference/storefront/cart-line-items/set-line-item-quantity",+ "api-reference/storefront/cart-line-items/remove-a-line-item"+ ]+ },+ {+ "group": "Cart / Other",+ "pages": [+ "api-reference/storefront/cart-other/empty-the-cart",+ "api-reference/storefront/cart-other/list-estimated-shipping-rates",+ "api-reference/storefront/cart-other/associate-a-cart-with-a-user",+ "api-reference/storefront/cart-other/change-cart-currency"+ ]+ },+ {+ "group": "Cart / Coupons",+ "pages": [+ "api-reference/storefront/cart-coupons/apply-a-coupon-code",+ "api-reference/storefront/cart-coupons/remove-a-coupon",+ "api-reference/storefront/cart-coupons/remove-all-coupons"+ ]+ },+ {+ "group": "Checkout",+ "pages": [+ "api-reference/storefront/checkout/update-checkout"+ ]+ },+ {+ "group": "Checkout / State",+ "pages": [+ "api-reference/storefront/checkout-state/next-checkout-step",+ "api-reference/storefront/checkout-state/advance-checkout",+ "api-reference/storefront/checkout-state/complete-checkout"+ ]+ },+ {+ "group": "Checkout / Shipments",+ "pages": [+ "api-reference/storefront/checkout-shipments/selects-shipping-method-for-shipments",+ "api-reference/storefront/checkout-shipments/list-shipping-rates"+ ]+ },+ {+ "group": "Checkout / Payments",+ "pages": [+ "api-reference/storefront/checkout-payments/create-new-payment",+ "api-reference/storefront/checkout-payments/list-payment-methods"+ ]+ },+ {+ "group": "Checkout / Store Credit",+ "pages": [+ "api-reference/storefront/checkout-store-credit/add-store-credit",+ "api-reference/storefront/checkout-store-credit/remove-store-credit"+ ]+ },+ {+ "group": "Products",+ "pages": [+ "api-reference/storefront/products/list-all-products",+ "api-reference/storefront/products/retrieve-a-product"+ ]+ },+ {+ "group": "Stores",+ "pages": [+ "api-reference/storefront/stores/return-the-current-store"+ ]+ },+ {+ "group": "Taxons",+ "pages": [+ "api-reference/storefront/taxons/list-all-taxons",+ "api-reference/storefront/taxons/retrieve-a-taxon"+ ]+ },+ {+ "group": "Countries",+ "pages": [+ "api-reference/storefront/countries/list-all-countries",+ "api-reference/storefront/countries/retrieve-a-country",+ "api-reference/storefront/countries/get-default-country"+ ]+ },+ {+ "group": "CMS Pages",+ "pages": [+ "api-reference/storefront/cms-pages/list-all-cms-pages",+ "api-reference/storefront/cms-pages/retrieve-a-cms-page"+ ]+ },+ {+ "group": "Menus",+ "pages": [+ "api-reference/storefront/menus/list-all-menus",+ "api-reference/storefront/menus/retrieve-a-menu"+ ]+ },+ {+ "group": "Wishlists",+ "pages": [+ "api-reference/storefront/wishlists/list-all-wishlists",+ "api-reference/storefront/wishlists/create-a-wishlist",+ "api-reference/storefront/wishlists/retrieve-a-wishlist",+ "api-reference/storefront/wishlists/delete-a-wishlist",+ "api-reference/storefront/wishlists/update-a-wishlist",+ "api-reference/storefront/wishlists/retrieve-the-default-wishlist"+ ]+ },+ {+ "group": "Wishlists / Wished Items",+ "pages": [+ "api-reference/storefront/wishlists-wished-items/add-item-to-wishlist",+ "api-reference/storefront/wishlists-wished-items/set-wished-item-quantity",+ "api-reference/storefront/wishlists-wished-items/delete-item-from-wishlist"+ ]+ },+ {+ "group": "Digital Downloads",+ "pages": [+ "api-reference/storefront/digital-downloads/download-a-digital-asset"+ ]+ }+ ]+ },++ {+ "group": "Platform API",+ "pages": [+ "api-reference/platform/authentication",+ {+ "group": "Addresses",+ "pages": [+ "api-reference/platform/addresses/return-a-list-of-addresses",+ "api-reference/platform/addresses/create-an-address",+ "api-reference/platform/addresses/return-an-address",+ "api-reference/platform/addresses/delete-an-address",+ "api-reference/platform/addresses/update-an-address"+ ]+ },+ {+ "group": "Adjustments",+ "pages": [+ "api-reference/platform/adjustments/return-a-list-of-adjustments",+ "api-reference/platform/adjustments/create-an-adjustment",+ "api-reference/platform/adjustments/return-an-adjustment",+ "api-reference/platform/adjustments/delete-an-adjustment",+ "api-reference/platform/adjustments/update-an-adjustment"+ ]+ },+ {+ "group": "Classifications",+ "pages": [+ "api-reference/platform/classifications/return-a-list-of-classifications",+ "api-reference/platform/classifications/create-a-classification",+ "api-reference/platform/classifications/return-a-classification",+ "api-reference/platform/classifications/delete-a-classification",+ "api-reference/platform/classifications/update-a-classification"+ ]+ },+ {+ "group": "CMS Pages",+ "pages": [+ "api-reference/platform/cms-pages/return-a-list-of-cms-pages",+ "api-reference/platform/cms-pages/create-a-cms-page",+ "api-reference/platform/cms-pages/return-a-cms-page",+ "api-reference/platform/cms-pages/delete-a-cms-page",+ "api-reference/platform/cms-pages/update-a-cms-page"+ ]+ },+ {+ "group": "CMS Sections",+ "pages": [+ "api-reference/platform/cms-sections/return-a-list-of-cms-sections",+ "api-reference/platform/cms-sections/create-a-cms-section",+ "api-reference/platform/cms-sections/return-a-cms-section",+ "api-reference/platform/cms-sections/delete-a-cms-section",+ "api-reference/platform/cms-sections/update-a-cms-section"+ ]+ },+ {+ "group": "Countries",+ "pages": [+ "api-reference/platform/countries/returns-a-list-of-countries",+ "api-reference/platform/countries/returns-a-country"+ ]+ },+ {+ "group": "Data Feeds",+ "pages": [+ "api-reference/platform/data-feeds/return-a-list-of-data-feeds",+ "api-reference/platform/data-feeds/create-a-data-feed",+ "api-reference/platform/data-feeds/return-a-data-feed",+ "api-reference/platform/data-feeds/delete-a-data-feed",+ "api-reference/platform/data-feeds/update-a-data-feed"+ ]+ },+ {+ "group": "Digital Links",+ "pages": [+ "api-reference/platform/digital-links/return-a-list-of-digital-links",+ "api-reference/platform/digital-links/create-a-digital-link",+ "api-reference/platform/digital-links/return-a-digital-link",+ "api-reference/platform/digital-links/delete-a-digital-link",+ "api-reference/platform/digital-links/update-a-digital-link",+ "api-reference/platform/digital-links/reset-a-digital-link"+ ]+ },+ {+ "group": "Digital Assets",+ "pages": [+ "api-reference/platform/digital-assets/return-a-list-of-digital-assets",+ "api-reference/platform/digital-assets/create-a-digital-asset",+ "api-reference/platform/digital-assets/return-a-digital-asset",+ "api-reference/platform/digital-assets/delete-a-digital-asset",+ "api-reference/platform/digital-assets/update-a-digital-asset"+ ]+ },+ {+ "group": "Line Items",+ "pages": [+ "api-reference/platform/line-items/return-a-list-of-line-items",+ "api-reference/platform/line-items/create-a-line-item",+ "api-reference/platform/line-items/return-a-line-item",+ "api-reference/platform/line-items/delete-a-line-item",+ "api-reference/platform/line-items/update-a-line-item"+ ]+ },+ {+ "group": "Menu Items",+ "pages": [+ "api-reference/platform/menu-items/return-a-list-of-menu-items",+ "api-reference/platform/menu-items/create-a-menu-item",+ "api-reference/platform/menu-items/return-a-menu-item",+ "api-reference/platform/menu-items/delete-a-menu-item",+ "api-reference/platform/menu-items/update-a-menu-item",+ "api-reference/platform/menu-items/reposition-a-menu-item"+ ]+ },+ {+ "group": "Menus",+ "pages": [+ "api-reference/platform/menus/return-a-list-of-menus",+ "api-reference/platform/menus/create-a-menu",+ "api-reference/platform/menus/return-a-menu",+ "api-reference/platform/menus/delete-a-menu",+ "api-reference/platform/menus/update-a-menu"+ ]+ },+ {+ "group": "Option Types",+ "pages": [+ "api-reference/platform/option-types/return-a-list-of-option-types",+ "api-reference/platform/option-types/create-an-option-type",+ "api-reference/platform/option-types/return-an-option-type",+ "api-reference/platform/option-types/delete-an-option-type",+ "api-reference/platform/option-types/update-an-option-type"+ ]+ },+ {+ "group": "Option Values",+ "pages": [+ "api-reference/platform/option-values/return-a-list-of-option-values",+ "api-reference/platform/option-values/create-an-option-value",+ "api-reference/platform/option-values/return-an-option-value",+ "api-reference/platform/option-values/delete-an-option-value",+ "api-reference/platform/option-values/update-an-option-value"+ ]+ },+ {+ "group": "Orders",+ "pages": [+ "api-reference/platform/orders/return-a-list-of-orders",+ "api-reference/platform/orders/creates-an-order",+ "api-reference/platform/orders/return-an-order",+ "api-reference/platform/orders/delete-an-order",+ "api-reference/platform/orders/update-an-order",+ "api-reference/platform/orders/advances-an-order",+ "api-reference/platform/orders/next-an-order",+ "api-reference/platform/orders/completes-an-order",+ "api-reference/platform/orders/empties-an-order",+ "api-reference/platform/orders/approves-an-order",+ "api-reference/platform/orders/cancels-an-order",+ "api-reference/platform/orders/use-store-credit-for-an-order",+ "api-reference/platform/orders/apply-coupon-code-for-an-order"+ ]+ },+ {+ "group": "Payment Methods",+ "pages": [+ "api-reference/platform/payment-methods/return-a-list-of-payment-methods",+ "api-reference/platform/payment-methods/create-a-payment-method",+ "api-reference/platform/payment-methods/return-a-payment-method",+ "api-reference/platform/payment-methods/delete-a-payment-method",+ "api-reference/platform/payment-methods/update-a-payment-method"+ ]+ },+ {+ "group": "Payments",+ "pages": [+ "api-reference/platform/payments/return-a-list-of-payments",+ "api-reference/platform/payments/return-a-payment",+ "api-reference/platform/payments/delete-a-payment"+ ]+ },+ {+ "group": "Products",+ "pages": [+ "api-reference/platform/products/return-a-list-of-products",+ "api-reference/platform/products/create-a-product",+ "api-reference/platform/products/return-a-product",+ "api-reference/platform/products/delete-a-product",+ "api-reference/platform/products/update-a-product"+ ]+ },+ {+ "group": "Promotion Actions",+ "pages": [+ "api-reference/platform/promotion-actions/return-a-list-of-promotion-actions",+ "api-reference/platform/promotion-actions/create-a-promotion-action",+ "api-reference/platform/promotion-actions/return-a-promotion-action",+ "api-reference/platform/promotion-actions/delete-a-promotion-action",+ "api-reference/platform/promotion-actions/update-a-promotion-action"+ ]+ },+ {+ "group": "Promotion Categories",+ "pages": [+ "api-reference/platform/promotion-categories/return-a-list-of-promotion-categories",+ "api-reference/platform/promotion-categories/create-a-promotion-category",+ "api-reference/platform/promotion-categories/return-a-promotion-category",+ "api-reference/platform/promotion-categories/delete-a-promotion-category",+ "api-reference/platform/promotion-categories/update-a-promotion-category"+ ]+ },+ {+ "group": "Promotion Rules",+ "pages": [+ "api-reference/platform/promotion-rules/return-a-list-of-promotion-rules",+ "api-reference/platform/promotion-rules/create-a-promotion-rule",+ "api-reference/platform/promotion-rules/return-a-promotion-rule",+ "api-reference/platform/promotion-rules/delete-a-promotion-rule",+ "api-reference/platform/promotion-rules/update-a-promotion-rule"+ ]+ },+ {+ "group": "Promotions",+ "pages": [+ "api-reference/platform/promotions/return-a-list-of-promotions",+ "api-reference/platform/promotions/create-a-promotion",+ "api-reference/platform/promotions/return-a-promotion",+ "api-reference/platform/promotions/delete-a-promotion",+ "api-reference/platform/promotions/update-a-promotion"+ ]+ },+ {+ "group": "Roles",+ "pages": [+ "api-reference/platform/roles/return-a-list-of-roles",+ "api-reference/platform/roles/create-a-role",+ "api-reference/platform/roles/return-a-role",+ "api-reference/platform/roles/delete-a-role",+ "api-reference/platform/roles/update-a-role"+ ]+ },+ {+ "group": "Shipments",+ "pages": [+ "api-reference/platform/shipments/return-a-list-of-shipments",+ "api-reference/platform/shipments/create-a-shipment",+ "api-reference/platform/shipments/return-a-shipment",+ "api-reference/platform/shipments/delete-a-shipment",+ "api-reference/platform/shipments/update-a-shipment",+ "api-reference/platform/shipments/adds-item-variant-to-an-existing-shipment",+ "api-reference/platform/shipments/removes-item-variant-from-shipment",+ "api-reference/platform/shipments/mark-shipment-as-ready-to-be-shipped",+ "api-reference/platform/shipments/mark-shipment-as-shipped",+ "api-reference/platform/shipments/cancels-the-shipment",+ "api-reference/platform/shipments/resumes-the-shipment",+ "api-reference/platform/shipments/moves-shipment-back-to-pending-state"+ ]+ },+ {+ "group": "Shipping Categories",+ "pages": [+ "api-reference/platform/shipping-categories/return-a-list-of-shipping-categories",+ "api-reference/platform/shipping-categories/create-a-shipping-category",+ "api-reference/platform/shipping-categories/return-a-shipping-category",+ "api-reference/platform/shipping-categories/delete-a-shipping-category",+ "api-reference/platform/shipping-categories/update-a-shipping-category"+ ]+ },+ {+ "group": "Shipping Methods",+ "pages": [+ "api-reference/platform/shipping-methods/return-a-list-of-shipping-methods",+ "api-reference/platform/shipping-methods/create-a-shipping-method",+ "api-reference/platform/shipping-methods/return-a-shipping-method",+ "api-reference/platform/shipping-methods/delete-a-shipping-method",+ "api-reference/platform/shipping-methods/update-a-shipping-method"+ ]+ },+ {+ "group": "States",+ "pages": [+ "api-reference/platform/states/returns-a-list-of-states",+ "api-reference/platform/states/returns-a-state"+ ]+ },+ {+ "group": "Stock Items",+ "pages": [+ "api-reference/platform/stock-items/return-a-list-of-stock-items",+ "api-reference/platform/stock-items/create-a-stock-item",+ "api-reference/platform/stock-items/return-a-stock-item",+ "api-reference/platform/stock-items/delete-a-stock-item",+ "api-reference/platform/stock-items/update-a-stock-item"+ ]+ },+ {+ "group": "Stock Locations",+ "pages": [+ "api-reference/platform/stock-locations/return-a-list-of-stock-locations",+ "api-reference/platform/stock-locations/create-a-stock-location",+ "api-reference/platform/stock-locations/return-a-stock-location",+ "api-reference/platform/stock-locations/delete-a-stock-location",+ "api-reference/platform/stock-locations/update-a-stock-location"+ ]+ },+ {+ "group": "Store Credit Categories",+ "pages": [+ "api-reference/platform/store-credit-categories/return-a-list-of-store-credit-categories",+ "api-reference/platform/store-credit-categories/create-a-store-credit-category",+ "api-reference/platform/store-credit-categories/return-a-store-credit-category",+ "api-reference/platform/store-credit-categories/delete-a-store-credit-category",+ "api-reference/platform/store-credit-categories/update-a-store-credit-category"+ ]+ },+ {+ "group": "Store Credit Types",+ "pages": [+ "api-reference/platform/store-credit-types/return-a-list-of-store-credit-types",+ "api-reference/platform/store-credit-types/create-a-store-credit-type",+ "api-reference/platform/store-credit-types/return-a-store-credit-type",+ "api-reference/platform/store-credit-types/delete-a-store-credit-type",+ "api-reference/platform/store-credit-types/update-a-store-credit-type"+ ]+ },+ {+ "group": "Store Credits",+ "pages": [+ "api-reference/platform/store-credits/return-a-list-of-store-credits",+ "api-reference/platform/store-credits/create-a-store-credit",+ "api-reference/platform/store-credits/return-a-store-credit",+ "api-reference/platform/store-credits/delete-a-store-credit",+ "api-reference/platform/store-credits/update-a-store-credit"+ ]+ },+ {+ "group": "Tax Categories",+ "pages": [+ "api-reference/platform/tax-categories/return-a-list-of-tax-categories",+ "api-reference/platform/tax-categories/create-a-tax-category",+ "api-reference/platform/tax-categories/return-a-tax-category",+ "api-reference/platform/tax-categories/delete-a-tax-category",+ "api-reference/platform/tax-categories/update-a-tax-category"+ ]+ },+ {+ "group": "Tax Rates",+ "pages": [+ "api-reference/platform/tax-rates/return-a-list-of-tax-rates",+ "api-reference/platform/tax-rates/create-a-tax-rate",+ "api-reference/platform/tax-rates/return-a-tax-rate",+ "api-reference/platform/tax-rates/delete-a-tax-rate",+ "api-reference/platform/tax-rates/update-a-tax-rate"+ ]+ },+ {+ "group": "Taxonomies",+ "pages": [+ "api-reference/platform/taxonomies/return-a-list-of-taxonomies",+ "api-reference/platform/taxonomies/create-a-taxonomy",+ "api-reference/platform/taxonomies/return-a-taxonomy",+ "api-reference/platform/taxonomies/delete-a-taxonomy",+ "api-reference/platform/taxonomies/update-a-taxonomy"+ ]+ },+ {+ "group": "Taxons",+ "pages": [+ "api-reference/platform/taxons/return-a-list-of-taxons",+ "api-reference/platform/taxons/create-a-taxon",+ "api-reference/platform/taxons/return-a-taxon",+ "api-reference/platform/taxons/delete-a-taxon",+ "api-reference/platform/taxons/update-a-taxon",+ "api-reference/platform/taxons/reposition-a-taxon"+ ]+ },+ {+ "group": "Users",+ "pages": [+ "api-reference/platform/users/return-a-list-of-users",+ "api-reference/platform/users/create-a-user",+ "api-reference/platform/users/return-a-user",+ "api-reference/platform/users/delete-a-user",+ "api-reference/platform/users/update-a-user"+ ]+ },+ {+ "group": "Variants",+ "pages": [+ "api-reference/platform/variants/return-a-list-of-variants",+ "api-reference/platform/variants/return-a-variant",+ "api-reference/platform/variants/delete-a-variant"+ ]+ },+ {+ "group": "Webhook Events",+ "pages": [+ "api-reference/platform/webhook-events/return-a-list-of-webhook-events"+ ]+ },+ {+ "group": "Webhook Subscribers",+ "pages": [+ "api-reference/platform/webhook-subscribers/return-a-list-of-webhook-subscribers",+ "api-reference/platform/webhook-subscribers/create-a-webhook-subscriber",+ "api-reference/platform/webhook-subscribers/return-a-webhook-subscriber",+ "api-reference/platform/webhook-subscribers/delete-a-webhook-subscriber",+ "api-reference/platform/webhook-subscribers/update-a-webhook-subscriber"+ ]+ },+ {+ "group": "Wished Items",+ "pages": [+ "api-reference/platform/wished-items/return-a-list-of-wished-items",+ "api-reference/platform/wished-items/create-a-wished-item",+ "api-reference/platform/wished-items/return-a-wished-item",+ "api-reference/platform/wished-items/delete-a-wished-item",+ "api-reference/platform/wished-items/update-a-wished-item"+ ]+ },+ {+ "group": "Wishlists",+ "pages": [+ "api-reference/platform/wishlists/return-a-list-of-wishlists",+ "api-reference/platform/wishlists/create-a-wishlist",+ "api-reference/platform/wishlists/return-a-wishlist",+ "api-reference/platform/wishlists/delete-a-wishlist",+ "api-reference/platform/wishlists/update-a-wishlist"+ ]+ },+ {+ "group": "Zones",+ "pages": [+ "api-reference/platform/zones/return-a-list-of-zones",+ "api-reference/platform/zones/create-a-zone",+ "api-reference/platform/zones/return-a-zone",+ "api-reference/platform/zones/delete-a-zone",+ "api-reference/platform/zones/update-a-zone"+ ]+ }+ ]+ }+ ],+ "footerSocials": {+ "github": "https://github.com/spree/spree",+ "x": "https://x.com/spreecommerce"+ },+ "feedback": {+ "thumbsRating": true,+ "suggestEdit": true,+ "raiseIssue": true+ }+}\ No newline at end of filediff --git a/docs/snippets/snippet-intro.mdx b/docs/snippets/snippet-intro.mdxnew file mode 100644index 0000000000..c57e7c7564--- /dev/null+++ b/docs/snippets/snippet-intro.mdx@@ -0,0 +1,4 @@+One of the core principles of software development is DRY (Don't Repeat+Yourself). This is a principle that apply to documentation as+well. If you find yourself repeating the same content in multiple places, you+should consider creating a custom snippet to keep your content in sync.diff --git a/emails/spree_emails.gemspec b/emails/spree_emails.gemspecindex dbd53bdcb6..5f863d9fa2 100644--- a/emails/spree_emails.gemspec+++ b/emails/spree_emails.gemspec@@ -16,7 +16,7 @@ Gem::Specification.new do |s|s.metadata = {"bug_tracker_uri" => "https://github.com/spree/spree/issues","changelog_uri" => "https://github.com/spree/spree/releases/tag/v#{s.version}",- "documentation_uri" => "https://dev-docs.spreecommerce.org/",+ "documentation_uri" => "https://docs.spreecommerce.org/","source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",}diff --git a/license.md b/license.mdindex 7496e4b6bc..6dca29887c 100644--- a/license.md+++ b/license.md@@ -1,13 +1,18 @@BSD 3-Clause License=============-Copyright © 2007-2024, Spree Commerce Inc., Spark Solutions Sp. z o.o. and other contributors.+Copyright © 2015-2024 Spark Solutions Sp. z o.o.++Copyright © 2007-2015, Spree Commerce Inc.+All rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.+* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.+* Neither the name of Spree Commerce Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.-_This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage._+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.diff --git a/sample/spree_sample.gemspec b/sample/spree_sample.gemspecindex ee3c8567b8..0aa5a39ec9 100644--- a/sample/spree_sample.gemspec+++ b/sample/spree_sample.gemspec@@ -15,7 +15,7 @@ Gem::Specification.new do |s|s.metadata = {"bug_tracker_uri" => "https://github.com/spree/spree/issues","changelog_uri" => "https://github.com/spree/spree/releases/tag/v#{s.version}",- "documentation_uri" => "https://dev-docs.spreecommerce.org/",+ "documentation_uri" => "https://docs.spreecommerce.org/","source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",}diff --git a/spree.gemspec b/spree.gemspecindex 9edfa6a0dc..06933f8684 100644--- a/spree.gemspec+++ b/spree.gemspec@@ -15,7 +15,7 @@ Gem::Specification.new do |s|s.metadata = {"bug_tracker_uri" => "https://github.com/spree/spree/issues","changelog_uri" => "https://github.com/spree/spree/releases/tag/v#{s.version}",- "documentation_uri" => "https://dev-docs.spreecommerce.org/",+ "documentation_uri" => "https://docs.spreecommerce.org/","source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",}