Skip to content

armgit / spree

Public Imported from GitHub
0

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.

Mark requires Spree version for major features (#13972)

Damian Legawiec65a5430aa850
diff --git a/docs/api-reference/admin-api/introduction.mdx b/docs/api-reference/admin-api/introduction.mdx
index 0b1073928e..a32407e7df 100644
--- a/docs/api-reference/admin-api/introduction.mdx
+++ b/docs/api-reference/admin-api/introduction.mdx
@@ -3,6 +3,10 @@ title: "Admin API"
sidebarTitle: "Introduction"
---
+import { Since } from '/snippets/since.mdx';
+
+<Since version="5.5" />
+
<Warning>
**Developer Preview.** The Admin API is in active development and may change between major versions.
</Warning>
diff --git a/docs/api-reference/store-api/introduction.mdx b/docs/api-reference/store-api/introduction.mdx
index 970c568c9a..51aff3cac2 100644
--- a/docs/api-reference/store-api/introduction.mdx
+++ b/docs/api-reference/store-api/introduction.mdx
@@ -3,6 +3,10 @@ title: "Store API"
sidebarTitle: "Introduction"
---
+import { Since } from '/snippets/since.mdx';
+
+<Since version="5.4" />
+
This API reference includes Spree Store APIs, which are REST APIs exposed by the Spree application. They are used to create a storefront for your commerce store, such as a website, point of sale or a commerce mobile app.
All API Routes are prefixed with `/api/v3/store`. So, during development, the API Routes will be available under the path `http://localhost:3000/api/v3/store`. For production, replace `http://localhost:3000` with your Spree application URL.
diff --git a/docs/developer/core-concepts/events.mdx b/docs/developer/core-concepts/events.mdx
index b23979d77d..20bb4e1901 100644
--- a/docs/developer/core-concepts/events.mdx
+++ b/docs/developer/core-concepts/events.mdx
@@ -3,6 +3,10 @@ title: Events
description: Learn how Spree's event system works and how to subscribe to events.
---
+import { Since } from '/snippets/since.mdx';
+
+<Since version="5.3" />
+
## Overview
Spree includes a powerful event system that allows you to react to various actions happening in your store. When something happens (an order is completed, a product is created, etc.), Spree publishes an event that your code can subscribe to and handle.
diff --git a/docs/developer/core-concepts/markets.mdx b/docs/developer/core-concepts/markets.mdx
index 273943012f..fc16a39200 100644
--- a/docs/developer/core-concepts/markets.mdx
+++ b/docs/developer/core-concepts/markets.mdx
@@ -3,6 +3,10 @@ title: Markets
description: Multi-region commerce with Markets — bundle geography, currency, and locale into distinct selling regions within a single store.
---
+import { Since } from '/snippets/since.mdx';
+
+<Since version="5.4" />
+
## Overview
Markets let you segment a single [Store](/developer/core-concepts/stores) into distinct geographic regions, each with its own currency, locale, and set of countries. For example, an international store might define:
diff --git a/docs/developer/core-concepts/media.mdx b/docs/developer/core-concepts/media.mdx
index 42de770680..b436c4cc36 100644
--- a/docs/developer/core-concepts/media.mdx
+++ b/docs/developer/core-concepts/media.mdx
@@ -4,6 +4,8 @@ sidebarTitle: "Media"
description: Product media (images, videos), named variants, focal points, and how media is served via the Store API
---
+import { Since } from '/snippets/since.mdx';
+
## Overview
Spree handles uploads, processing, and delivery for product media. Images are automatically converted to WebP format and preprocessed into multiple sizes for optimal performance.
@@ -24,7 +26,7 @@ Each media item has a `media_type` field that defaults to `image`. The `variant_
`Spree::Image` is a backward-compatible subclass of `Spree::Asset` that sets `media_type` to `image`. New code should use `Spree::Asset` directly.
</Note>
-### Named Variant Sizes
+### Named Variant Sizes <Since version="5.3" />
When an image is uploaded, Spree automatically generates optimized versions in the background:
diff --git a/docs/developer/core-concepts/pricing.mdx b/docs/developer/core-concepts/pricing.mdx
index 489c881eeb..b7c1680ab9 100644
--- a/docs/developer/core-concepts/pricing.mdx
+++ b/docs/developer/core-concepts/pricing.mdx
@@ -3,6 +3,8 @@ title: Pricing
description: Prices, Price Lists, Price Rules, and the Pricing Context — Spree's flexible pricing engine for regional, wholesale, volume, and market-based pricing.
---
+import { Since } from '/snippets/since.mdx';
+
## Overview
Spree's pricing system supports both simple single-currency pricing and advanced multi-currency, rule-based pricing through Price Lists. Every [Variant](/developer/core-concepts/products#variants) can have multiple prices — a base price per currency, plus additional prices from Price Lists that apply conditionally based on rules like geography, customer segment, or quantity.
@@ -55,7 +57,7 @@ curl 'https://api.mystore.com/api/v3/store/products/spree-tote?expand=variants'
</CodeGroup>
-## Price Lists
+## Price Lists <Since version="5.3" />
Price Lists allow you to create different pricing strategies based on various conditions. This enables advanced pricing scenarios like:
@@ -88,7 +90,7 @@ If no applicable Price List is found, the base price is used.
| `match_policy` | How rules are evaluated: `all` (every rule must match) or `any` (at least one) |
| `position` | Priority order (lower numbers = higher priority) |
-## Price Rules
+## Price Rules <Since version="5.3" />
Price Rules define conditions that must be met for a Price List to apply. Spree includes five built-in rule types:
@@ -100,7 +102,7 @@ Price Rules define conditions that must be met for a Price List to apply. Spree
| **Customer Group Rule** | Matches members of customer groups | Loyalty tiers, membership pricing |
| **Volume Rule** | Matches based on quantity purchased | Bulk discounts, tiered pricing |
-### Market Rule
+### Market Rule <Since version="5.4" />
The recommended approach for regional pricing when using Markets. Applies the Price List when the customer is in one of the specified markets.
@@ -132,7 +134,7 @@ Applies based on quantity purchased. Supports `min_quantity` and `max_quantity`
Custom Price Rules can be created for specialized pricing logic. See the [Customization Quickstart](/developer/customization/quickstart) for details.
</Info>
-## Pricing Context
+## Pricing Context <Since version="5.3" />
When resolving prices, Spree considers the full context of the request:
@@ -163,7 +165,7 @@ Price Lists are managed in the Admin Panel under **Products → Price Lists**, o
Each Price List contains prices for specific variants and currencies. Products can be added to a Price List, and individual variant prices set within it.
-## Price History (EU Omnibus Directive)
+## Price History (EU Omnibus Directive) <Since version="5.4" />
Spree automatically records price changes for EU Omnibus Directive compliance. When a product goes on sale, EU regulations require displaying the lowest price in the preceding 30 days alongside the discounted price.
diff --git a/docs/developer/core-concepts/search-filtering.mdx b/docs/developer/core-concepts/search-filtering.mdx
index 40df647aff..38e19950d7 100644
--- a/docs/developer/core-concepts/search-filtering.mdx
+++ b/docs/developer/core-concepts/search-filtering.mdx
@@ -3,6 +3,8 @@ title: Search & Filtering
description: "Search, filter, and sort products and other resources via the Store API"
---
+import { Since } from '/snippets/since.mdx';
+
## Overview
Spree provides powerful search, filtering, and sorting capabilities for products and other resources. The Store API supports:
@@ -243,7 +245,7 @@ curl 'https://api.mystore.com/api/v3/store/products?page=1&limit=24' \
See [Querying](/api-reference/store-api/querying) for the full list of filtering, sorting, and pagination options.
-## Search Providers
+## Search Providers <Since version="5.4" />
Spree uses a pluggable search provider architecture. The default provider uses SQL (ILIKE + Ransack). For production catalogs with 1,000+ products, we recommend switching to [Meilisearch](/integrations/search/meilisearch) for typo tolerance, relevance ranking, and faster faceted search.
diff --git a/docs/developer/core-concepts/store-credits-gift-cards.mdx b/docs/developer/core-concepts/store-credits-gift-cards.mdx
index 4d0c0d0418..a06b9841ab 100644
--- a/docs/developer/core-concepts/store-credits-gift-cards.mdx
+++ b/docs/developer/core-concepts/store-credits-gift-cards.mdx
@@ -3,6 +3,10 @@ title: Store Credits & Gift Cards
description: Stored value mechanisms for refunds, loyalty rewards, and gifting
---
+import { Since } from '/snippets/since.mdx';
+
+<Since version="5.1" />
+
## Overview
Spree provides two stored value mechanisms that customers can use at checkout:
diff --git a/docs/developer/core-concepts/webhooks.mdx b/docs/developer/core-concepts/webhooks.mdx
index 8720145a98..ee30e3d9b0 100644
--- a/docs/developer/core-concepts/webhooks.mdx
+++ b/docs/developer/core-concepts/webhooks.mdx
@@ -3,6 +3,10 @@ title: Webhooks
description: Send real-time HTTP notifications to external services when events occur in your store.
---
+import { Since } from '/snippets/since.mdx';
+
+<Since version="5.3" />
+
## Overview
Webhooks allow your Spree store to send real-time HTTP POST notifications to external services when events occur. When an order is completed, a product is updated, or inventory changes, Spree can automatically notify your CRM, fulfillment service, analytics platform, or any other system.
diff --git a/docs/snippets/since.mdx b/docs/snippets/since.mdx
new file mode 100644
index 0000000000..f9952d174f
--- /dev/null
+++ b/docs/snippets/since.mdx
@@ -0,0 +1,27 @@
+export const Since = ({ version, from }) => {
+ const knownPrevious = {
+ '5.0': '4.10',
+ '6.0': '5.4',
+ };
+
+ const previous = from ?? knownPrevious[version] ?? (() => {
+ const [major, minor] = version.split('.').map(Number);
+ if (Number.isNaN(major) || Number.isNaN(minor) || minor < 1) {
+ throw new Error(
+ `<Since version="${version}" />: cannot derive previous version automatically. ` +
+ `Pass an explicit "from" prop, e.g. <Since version="${version}" from="X.Y" />.`
+ );
+ }
+ return `${major}.${minor - 1}`;
+ })();
+
+ return (
+ <Tooltip
+ tip={`Available since Spree ${version}+.`}
+ cta="Upgrade instructions"
+ href={`/developer/upgrades/${previous}-to-${version}`}
+ >
+ <Badge icon="lock">Spree {version}+</Badge>
+ </Tooltip>
+ );
+};
diff --git a/docs/user/manage-products/price-lists.mdx b/docs/user/manage-products/price-lists.mdx
index 49700cde60..a791f75691 100644
--- a/docs/user/manage-products/price-lists.mdx
+++ b/docs/user/manage-products/price-lists.mdx
@@ -3,6 +3,10 @@ title: "Price Lists"
description: "Learn how to set up volume pricing, user-specific pricing, and more in Spree Commerce."
---
+import { Since } from '/snippets/since.mdx';
+
+<Since version="5.3" />
+
Price lists are a powerful tool for managing customer-specific pricing strategies - essential for industries like B2B, wholesale, and marketplaces. They let you offer different prices to different customer segments based on conditions like location, quantity, or account status, without needing to duplicate product records or use heavy customizations.
With Spree’s native support for price lists, you can create and manage custom pricing logic directly in the admin dashboard - no development required.
diff --git a/docs/user/settings/markets.mdx b/docs/user/settings/markets.mdx
index 5e84ae7b86..5bb1e68627 100644
--- a/docs/user/settings/markets.mdx
+++ b/docs/user/settings/markets.mdx
@@ -3,6 +3,10 @@ title: "Markets"
description: "Learn how to create and manage markets in Spree Commerce."
---
+import { Since } from '/snippets/since.mdx';
+
+<Since version="5.4" />
+
Markets allow you to define distinct shopping experiences for different regions or customer
segments — each with its own currency, language, and tax settings. When multiple markets are
configured, customers can switch between them on the storefront to see prices and content in