@spree/docs 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,18 +27,47 @@ Samples are now included in the `spree` gem. If you've added previously `spree_s
27
27
  bin/rake spree:install:migrations && bin/rails db:migrate
28
28
  ```
29
29
 
30
+ ### Fix your Admin user class
31
+
32
+ Your admin user model needs to include the `Spree::AdminUserMethods` concern instead of `Spree::UserMethods`.
33
+ Previously `UserMethods` bundled `AdminUserMethods` but that caused all kinds of issues.
34
+
35
+ So if you have a model like this:
36
+
37
+ ```ruby
38
+ class Spree::AdminUser < Spree::Base
39
+ include Spree::UserMethods
40
+
41
+ # ... other model code ...
42
+ end
43
+ ```
44
+
45
+ You need to change it to this:
46
+
47
+ ```ruby
48
+ class Spree::AdminUser < Spree::Base
49
+ include Spree::AdminUserMethods
50
+
51
+ # ... other model code ...
52
+ end
53
+ ```
54
+
55
+ By default that file is located at `app/models/spree/admin_user.rb`.
56
+
30
57
  ### Backfill Image Thumbnail IDs
31
58
 
32
- Spree 5.4 adds a `thumbnail` association to both `Product` and `Variant` models. This greatly speeds up rendering Product lists everywhere (API, Admin Dashboard and `spree_storefront`), as previously we've had to load all images for each product.
59
+ Spree 5.4 adds a `primary_media` association to both `Product` and `Variant` models. This greatly speeds up rendering Product lists everywhere (API, Admin Dashboard and `spree_storefront`), as previously we've had to load all media/images for each product and determine which one is the one to render a thumbnail.
33
60
 
34
- This can be done by running the following command:
61
+ To generate the new association you will need to run a rake task (both in development and production environments):
35
62
 
36
63
  ```bash
37
- bin/rails spree:images:backfill_thumbnails
64
+ bin/rails spree:media:backfill_primary_media
38
65
  ```
39
66
 
40
67
  As above, this process can take a while depending on the size of your product catalog.
41
68
 
69
+ For new products this will be set automatically and you won't need to run this rake task more than once.
70
+
42
71
  ### Prefixed IDs
43
72
 
44
73
  Spree 5.4 by default uses prefixed IDs for resources (eg. `prod_6VsgxZbenF`) instead of just IDs from the database. These IDs are now used in Admin Dashboard, API v3, Events system and Webhooks.
@@ -93,7 +122,7 @@ Prefix length isn't limited by default, but we recommend to keep it short.
93
122
 
94
123
  ### Migrate Checkout Zones to Markets
95
124
 
96
- Spree 5.4 introduces [Markets](../core-concepts/markets.md) as the primary way to manage which countries are available for checkout, along with their currencies and locales. The legacy `checkout_zone` field on the Store model is now deprecated and will be removed in Spree 5.5.
125
+ Spree 5.4 introduces [Markets](../core-concepts/markets.md) as the primary way to manage which countries are available for checkout, along with their currencies and locales. The legacy `checkout_zone` field on the Store model is now deprecated and will be removed in Spree 6.0.
97
126
 
98
127
  New stores automatically get a default market created from their `default_country` — no manual setup needed. For existing stores that used `checkout_zone`, run the migration rake task:
99
128
 
@@ -192,7 +221,7 @@ These extensions will continue to work — Spree's `LogEntry#parsed_details` sti
192
221
 
193
222
  `Spree::Address#active_merchant_hash` has been renamed to `#gateway_hash`. A backwards-compatible alias is provided, so existing code continues to work without changes.
194
223
 
195
- ### (Optional) Install API v2
224
+ ### (Optional) Install Legacy API v2 extension
196
225
 
197
226
  Spree 5.4 ships with API v3, which marks deprecation of API v2. API v2 is still available but you need to install it separately. If you currently use API v2, you can do this by running the following command:
198
227
 
@@ -225,15 +254,19 @@ And run `bundle install`
225
254
 
226
255
  ### (Optional) Install Spree Multi Store
227
256
 
228
- Multi-store features like multiple store management & custom domains were moved to a separate gem `spree_multi_store`.
257
+ [Multi-store](../multi-store/quickstart.md) features like multiple store management & custom domains were moved to a separate gem `spree_multi_store`.
229
258
 
230
259
  If you rely on these features please run:
231
260
 
232
261
  ```bash
233
262
  bundle add spree_multi_store
234
263
  ```
264
+
265
+ > **INFO:** Spree Multi-Store is licensed under the [AGPL v3 License](https://opensource.org/licenses/AGPL-3.0).
266
+ >
267
+ > If you would like to use it in a commercial application, please [contact us](https://spreecommerce.org/get-started/) to obtain a commercial license.
235
268
 
236
- ### (Optional) Install Legacy Product Properties
269
+ ### (Optional) Install Legacy Product Properties extension
237
270
 
238
271
  Product Properties have been extracted from Spree core to a separate gem `spree_legacy_product_properties`. Product Properties were already deprecated in favor of [Metafields](../core-concepts/metafields.md) and disabled by default since Spree 5.1.
239
272
 
@@ -246,3 +279,13 @@ If you have `product_properties_enabled: true` in your Spree configuration or re
246
279
  No data migration is needed — the gem uses the same database tables. All existing product properties, property definitions, and associations will continue to work as before.
247
280
 
248
281
  > **WARNING:** If you skip this step and had Product Properties enabled, any code referencing `product.product_properties`, `product.property()`, `product.set_property()`, or the admin Properties page will stop working.
282
+
283
+ ### (Optional) Install Spree Posts extension
284
+
285
+ Posts and Post Categories management were extracted from Spree core into a seperate gem `spree_posts`.
286
+
287
+ If you use these features before run this command to restore them:
288
+
289
+ ```bash
290
+ bundle add spree_posts
291
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spree/docs",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Spree Commerce developer documentation for AI agents and local reference",
5
5
  "type": "module",
6
6
  "license": "CC-BY-4.0",