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
Replace database prefix_id column with Sqids on-the-fly encoding (#13576)
Damian Legawiec8898d52e40f8
diff --git a/backend/Gemfile.lock b/backend/Gemfile.lockindex 40b1b34dcf..3bbf05fa65 100644--- a/backend/Gemfile.lock+++ b/backend/Gemfile.lock@@ -71,6 +71,7 @@ PATHrexmlruby-oembed (~> 0.18)safely_block (~> 0.4)+ sqids (~> 0.2)state_machines-activemodel (~> 0.100)state_machines-activerecord (~> 0.100)stringex@@ -717,6 +718,7 @@ GEMrails-i18nspree_core (>= 4.2.0.rc3)spree_extension+ sqids (0.2.2)state_machines (0.100.4)state_machines-activemodel (0.101.0)activemodel (>= 7.2)@@ -1075,6 +1077,7 @@ CHECKSUMSspree_emails (5.4.0.alpha)spree_extension (0.1.0) sha256=b648327f4787295e051be4ea0c0a47baec47c2e245bca9c93ecf73605fc3a051spree_i18n (5.3.2) sha256=03b805235ca156644951f6bc3d07cbe43d0aa01134c4a27e3f3304011956f79b+ sqids (0.2.2) sha256=c2d31e0dfb6c32d17c10b59df059a299af93bef716d700ff70d77156df702d36state_machines (0.100.4) sha256=dd4e555ebb061569dd8fe18a5f39b51d10be6306b89a0c315a9697671d752565state_machines-activemodel (0.101.0) sha256=6798c6bf5aa4be2b1a00ca633949c999ebee7a148bd4ea8f6858b189e2cdf72dstate_machines-activerecord (0.100.0) sha256=b2213f74f3f32c6d92de5139e8898bc64a0ffb3f048df7d950ce27e28384beb5diff --git a/backend/db/schema.rb b/backend/db/schema.rbindex d8497da6c0..d3ec1353f5 100644--- a/backend/db/schema.rb+++ b/backend/db/schema.rb@@ -93,7 +93,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.decimal "latitude"t.decimal "longitude"t.string "phone"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.boolean "quick_checkout", default: false@@ -106,7 +105,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["deleted_at"], name: "index_spree_addresses_on_deleted_at"t.index ["firstname"], name: "index_addresses_on_firstname"t.index ["lastname"], name: "index_addresses_on_lastname"- t.index ["prefix_id"], name: "index_spree_addresses_on_prefix_id", unique: truet.index ["quick_checkout"], name: "index_spree_addresses_on_quick_checkout"t.index ["state_id"], name: "index_spree_addresses_on_state_id"t.index ["user_id"], name: "index_spree_addresses_on_user_id"@@ -122,7 +120,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "label"t.boolean "mandatory"t.bigint "order_id", null: false- t.string "prefix_id"t.bigint "source_id"t.string "source_type"t.string "state"@@ -134,7 +131,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["order_id", "eligible", "source_type"], name: "index_spree_adjustments_on_order_eligible_source_type"t.index ["order_id", "state"], name: "index_spree_adjustments_on_order_id_and_state"t.index ["order_id"], name: "index_spree_adjustments_on_order_id"- t.index ["prefix_id"], name: "index_spree_adjustments_on_prefix_id", unique: truet.index ["source_id", "source_type"], name: "index_spree_adjustments_on_source_id_and_source_type"t.index ["source_type"], name: "index_spree_adjustments_on_source_type"end@@ -146,7 +142,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "first_name"t.string "last_name"t.string "login"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.datetime "remember_created_at"@@ -155,7 +150,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "selected_locale"t.datetime "updated_at", null: falset.index ["email"], name: "index_spree_admin_users_on_email", unique: true- t.index ["prefix_id"], name: "index_spree_admin_users_on_prefix_id", unique: truet.index ["reset_password_token"], name: "index_spree_admin_users_on_reset_password_token", unique: trueend@@ -166,7 +160,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "key_type", null: falset.datetime "last_used_at"t.string "name", null: false- t.string "prefix_id"t.datetime "revoked_at"t.bigint "revoked_by_id"t.string "revoked_by_type"@@ -175,7 +168,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "updated_at", null: falset.index ["created_by_type", "created_by_id"], name: "index_spree_api_keys_on_created_by"t.index ["key_type"], name: "index_spree_api_keys_on_key_type"- t.index ["prefix_id"], name: "index_spree_api_keys_on_prefix_id", unique: truet.index ["revoked_by_type", "revoked_by_id"], name: "index_spree_api_keys_on_revoked_by"t.index ["store_id", "key_type"], name: "index_spree_api_keys_on_store_id_and_key_type"t.index ["store_id"], name: "index_spree_api_keys_on_store_id"@@ -192,7 +184,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.integer "attachment_width"t.datetime "created_at", precision: nilt.integer "position"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.string "session_id"@@ -201,7 +192,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.bigint "viewable_id"t.string "viewable_type"t.index ["position"], name: "index_spree_assets_on_position"- t.index ["prefix_id"], name: "index_spree_assets_on_prefix_id", unique: truet.index ["viewable_id"], name: "index_assets_on_viewable_id"t.index ["viewable_type", "type"], name: "index_assets_on_viewable_type_and_type"end@@ -212,13 +202,11 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", null: falset.datetime "deleted_at", precision: nilt.text "preferences"- t.string "prefix_id"t.string "type"t.datetime "updated_at", null: falset.index ["calculable_id", "calculable_type"], name: "index_spree_calculators_on_calculable_id_and_calculable_type"t.index ["deleted_at"], name: "index_spree_calculators_on_deleted_at"t.index ["id", "type"], name: "index_spree_calculators_on_id_and_type"- t.index ["prefix_id"], name: "index_spree_calculators_on_prefix_id", unique: trueendcreate_table "spree_countries", force: :cascade do |t|@@ -242,14 +230,12 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", null: falset.datetime "deleted_at", precision: nilt.bigint "order_id"- t.string "prefix_id"t.bigint "promotion_id"t.integer "state", default: 0, null: falset.datetime "updated_at", null: falset.index ["code"], name: "index_spree_coupon_codes_on_code", unique: truet.index ["deleted_at"], name: "index_spree_coupon_codes_on_deleted_at"t.index ["order_id"], name: "index_spree_coupon_codes_on_order_id"- t.index ["prefix_id"], name: "index_spree_coupon_codes_on_prefix_id", unique: truet.index ["promotion_id"], name: "index_spree_coupon_codes_on_promotion_id"t.index ["state"], name: "index_spree_coupon_codes_on_state"end@@ -267,7 +253,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "month"t.string "name"t.bigint "payment_method_id"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.datetime "updated_at", null: false@@ -277,21 +262,18 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["deleted_at"], name: "index_spree_credit_cards_on_deleted_at"t.index ["gateway_customer_id"], name: "index_spree_credit_cards_on_gateway_customer_id"t.index ["payment_method_id"], name: "index_spree_credit_cards_on_payment_method_id"- t.index ["prefix_id"], name: "index_spree_credit_cards_on_prefix_id", unique: truet.index ["user_id"], name: "index_spree_credit_cards_on_user_id"endcreate_table "spree_custom_domains", force: :cascade do |t|t.datetime "created_at", null: falset.boolean "default", default: false, null: false- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.boolean "status", default: falset.bigint "store_id", null: falset.datetime "updated_at", null: falset.string "url", null: false- t.index ["prefix_id"], name: "index_spree_custom_domains_on_prefix_id", unique: truet.index ["store_id"], name: "index_spree_custom_domains_on_store_id"t.index ["url"], name: "index_spree_custom_domains_on_url", unique: trueend@@ -312,11 +294,9 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "deleted_at"t.text "description"t.string "name", null: false- t.string "prefix_id"t.bigint "store_id", null: falset.datetime "updated_at", null: falset.index ["deleted_at"], name: "index_spree_customer_groups_on_deleted_at"- t.index ["prefix_id"], name: "index_spree_customer_groups_on_prefix_id", unique: truet.index ["store_id", "name"], name: "index_spree_customer_groups_on_store_id_and_name", unique: true, where: "(deleted_at IS NULL)"t.index ["store_id"], name: "index_spree_customer_groups_on_store_id"end@@ -324,14 +304,12 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) docreate_table "spree_customer_returns", force: :cascade do |t|t.datetime "created_at", null: falset.string "number"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.bigint "stock_location_id"t.bigint "store_id"t.datetime "updated_at", null: falset.index ["number"], name: "index_spree_customer_returns_on_number", unique: true- t.index ["prefix_id"], name: "index_spree_customer_returns_on_prefix_id", unique: truet.index ["stock_location_id"], name: "index_spree_customer_returns_on_stock_location_id"t.index ["store_id"], name: "index_spree_customer_returns_on_store_id"end@@ -340,12 +318,10 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.boolean "active", default: truet.datetime "created_at", null: falset.string "name"- t.string "prefix_id"t.string "slug"t.bigint "store_id"t.string "type"t.datetime "updated_at", null: false- t.index ["prefix_id"], name: "index_spree_data_feeds_on_prefix_id", unique: truet.index ["store_id", "slug", "type"], name: "index_spree_data_feeds_on_store_id_and_slug_and_type"t.index ["store_id"], name: "index_spree_data_feeds_on_store_id"end@@ -355,21 +331,17 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", precision: nil, null: falset.bigint "digital_id"t.bigint "line_item_id"- t.string "prefix_id"t.string "token"t.datetime "updated_at", precision: nil, null: falset.index ["digital_id"], name: "index_spree_digital_links_on_digital_id"t.index ["line_item_id"], name: "index_spree_digital_links_on_line_item_id"- t.index ["prefix_id"], name: "index_spree_digital_links_on_prefix_id", unique: truet.index ["token"], name: "index_spree_digital_links_on_token", unique: trueendcreate_table "spree_digitals", force: :cascade do |t|t.datetime "created_at", precision: nil, null: false- t.string "prefix_id"t.datetime "updated_at", precision: nil, null: falset.bigint "variant_id"- t.index ["prefix_id"], name: "index_spree_digitals_on_prefix_id", unique: truet.index ["variant_id"], name: "index_spree_digitals_on_variant_id"end@@ -377,7 +349,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", null: falset.integer "format", null: falset.string "number", limit: 32, null: false- t.string "prefix_id"t.jsonb "search_params"t.bigint "store_id", null: falset.string "type", null: false@@ -385,7 +356,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.bigint "user_id"t.index ["format"], name: "index_spree_exports_on_format"t.index ["number"], name: "index_spree_exports_on_number", unique: true- t.index ["prefix_id"], name: "index_spree_exports_on_prefix_id", unique: truet.index ["store_id"], name: "index_spree_exports_on_store_id"t.index ["user_id"], name: "index_spree_exports_on_user_id"end@@ -393,12 +363,10 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) docreate_table "spree_gateway_customers", force: :cascade do |t|t.datetime "created_at", null: falset.bigint "payment_method_id", null: false- t.string "prefix_id"t.string "profile_id", null: falset.datetime "updated_at", null: falset.bigint "user_id", null: falset.index ["payment_method_id"], name: "index_spree_gateway_customers_on_payment_method_id"- t.index ["prefix_id"], name: "index_spree_gateway_customers_on_prefix_id", unique: truet.index ["user_id", "payment_method_id"], name: "index_spree_gateway_customers_on_user_id_and_payment_method_id", unique: truet.index ["user_id"], name: "index_spree_gateway_customers_on_user_id"end@@ -426,11 +394,9 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "currency", null: falset.date "expires_at"t.string "prefix"- t.string "prefix_id"t.bigint "store_id", null: falset.datetime "updated_at", null: falset.index ["created_by_id"], name: "index_spree_gift_card_batches_on_created_by_id"- t.index ["prefix_id"], name: "index_spree_gift_card_batches_on_prefix_id", unique: truet.index ["store_id"], name: "index_spree_gift_card_batches_on_store_id"end@@ -444,7 +410,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "currency", null: falset.date "expires_at"t.bigint "gift_card_batch_id"- t.string "prefix_id"t.datetime "redeemed_at"t.string "state", null: falset.bigint "store_id", null: false@@ -454,7 +419,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["created_by_id"], name: "index_spree_gift_cards_on_created_by_id"t.index ["expires_at"], name: "index_spree_gift_cards_on_expires_at"t.index ["gift_card_batch_id"], name: "index_spree_gift_cards_on_gift_card_batch_id"- t.index ["prefix_id"], name: "index_spree_gift_cards_on_prefix_id", unique: truet.index ["redeemed_at"], name: "index_spree_gift_cards_on_redeemed_at"t.index ["state"], name: "index_spree_gift_cards_on_state"t.index ["store_id"], name: "index_spree_gift_cards_on_store_id"@@ -465,13 +429,11 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", null: falset.string "file_column"t.bigint "import_id", null: false- t.string "prefix_id"t.string "schema_field", null: falset.datetime "updated_at", null: falset.index ["file_column"], name: "index_spree_import_mappings_on_file_column"t.index ["import_id", "schema_field"], name: "index_spree_import_mappings_on_import_id_and_schema_field", unique: truet.index ["import_id"], name: "index_spree_import_mappings_on_import_id"- t.index ["prefix_id"], name: "index_spree_import_mappings_on_prefix_id", unique: trueendcreate_table "spree_import_rows", force: :cascade do |t|@@ -480,7 +442,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.bigint "import_id", null: falset.bigint "item_id"t.string "item_type"- t.string "prefix_id"t.integer "row_number", null: falset.string "status", null: falset.datetime "updated_at", null: false@@ -488,7 +449,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["import_id", "row_number"], name: "index_spree_import_rows_on_import_id_and_row_number", unique: truet.index ["import_id"], name: "index_spree_import_rows_on_import_id"t.index ["item_type", "item_id"], name: "index_spree_import_rows_on_item"- t.index ["prefix_id"], name: "index_spree_import_rows_on_prefix_id", unique: truet.index ["status"], name: "index_spree_import_rows_on_status"end@@ -498,7 +458,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.bigint "owner_id", null: falset.string "owner_type", null: falset.text "preferences"- t.string "prefix_id"t.text "processing_errors"t.integer "rows_count", default: 0, null: falset.string "status", null: false@@ -507,7 +466,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.bigint "user_id", null: falset.index ["number"], name: "index_spree_imports_on_number", unique: truet.index ["owner_type", "owner_id"], name: "index_spree_imports_on_owner"- t.index ["prefix_id"], name: "index_spree_imports_on_prefix_id", unique: truet.index ["status"], name: "index_spree_imports_on_status"t.index ["type"], name: "index_spree_imports_on_type"t.index ["user_id"], name: "index_spree_imports_on_user_id"@@ -517,12 +475,10 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.boolean "active", default: false, null: falset.datetime "created_at", null: falset.text "preferences"- t.string "prefix_id"t.bigint "store_id", null: falset.string "type", null: falset.datetime "updated_at", null: falset.index ["active"], name: "index_spree_integrations_on_active"- t.index ["prefix_id"], name: "index_spree_integrations_on_prefix_id", unique: truet.index ["store_id"], name: "index_spree_integrations_on_store_id"t.index ["type"], name: "index_spree_integrations_on_type"end@@ -533,7 +489,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.bigint "order_id"t.bigint "original_return_item_id"t.boolean "pending", default: true- t.string "prefix_id"t.integer "quantity", default: 1t.bigint "shipment_id"t.string "state"@@ -542,7 +497,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["line_item_id"], name: "index_spree_inventory_units_on_line_item_id"t.index ["order_id"], name: "index_inventory_units_on_order_id"t.index ["original_return_item_id"], name: "index_spree_inventory_units_on_original_return_item_id"- t.index ["prefix_id"], name: "index_spree_inventory_units_on_prefix_id", unique: truet.index ["shipment_id"], name: "index_inventory_units_on_shipment_id"t.index ["variant_id"], name: "index_inventory_units_on_variant_id"end@@ -557,7 +511,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "invitee_type"t.bigint "inviter_id", null: falset.string "inviter_type", null: false- t.string "prefix_id"t.bigint "resource_id", null: falset.string "resource_type", null: falset.bigint "role_id", null: false@@ -569,7 +522,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["expires_at"], name: "index_spree_invitations_on_expires_at"t.index ["invitee_type", "invitee_id"], name: "index_spree_invitations_on_invitee"t.index ["inviter_type", "inviter_id"], name: "index_spree_invitations_on_inviter"- t.index ["prefix_id"], name: "index_spree_invitations_on_prefix_id", unique: truet.index ["resource_type", "resource_id"], name: "index_spree_invitations_on_resource"t.index ["role_id"], name: "index_spree_invitations_on_role_id"t.index ["status"], name: "index_spree_invitations_on_status"@@ -586,7 +538,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.decimal "non_taxable_adjustment_total", precision: 10, scale: 2, default: "0.0", null: falset.bigint "order_id"t.decimal "pre_tax_amount", precision: 12, scale: 4, default: "0.0", null: false- t.string "prefix_id"t.decimal "price", precision: 10, scale: 2, null: falset.bigint "price_list_id"t.jsonb "private_metadata"@@ -598,7 +549,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "updated_at", null: falset.bigint "variant_id"t.index ["order_id"], name: "index_spree_line_items_on_order_id"- t.index ["prefix_id"], name: "index_spree_line_items_on_prefix_id", unique: truet.index ["price_list_id"], name: "index_spree_line_items_on_price_list_id"t.index ["tax_category_id"], name: "index_spree_line_items_on_tax_category_id"t.index ["variant_id"], name: "index_spree_line_items_on_variant_id"@@ -607,11 +557,9 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) docreate_table "spree_log_entries", force: :cascade do |t|t.datetime "created_at", null: falset.text "details"- t.string "prefix_id"t.bigint "source_id"t.string "source_type"t.datetime "updated_at", null: false- t.index ["prefix_id"], name: "index_spree_log_entries_on_prefix_id", unique: truet.index ["source_id", "source_type"], name: "index_spree_log_entries_on_source_id_and_source_type"end@@ -622,12 +570,10 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "metafield_type", null: falset.string "name", null: falset.string "namespace", null: false- t.string "prefix_id"t.string "resource_type", null: falset.datetime "updated_at", null: falset.index ["display_on"], name: "index_spree_metafield_definitions_on_display_on"t.index ["namespace", "key"], name: "index_spree_metafield_definitions_on_namespace_and_key"- t.index ["prefix_id"], name: "index_spree_metafield_definitions_on_prefix_id", unique: truet.index ["resource_type", "namespace", "key"], name: "idx_on_resource_type_namespace_key_60c784bc3e", unique: truet.index ["resource_type"], name: "index_spree_metafield_definitions_on_resource_type"end@@ -635,14 +581,12 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) docreate_table "spree_metafields", force: :cascade do |t|t.datetime "created_at", null: falset.bigint "metafield_definition_id", null: false- t.string "prefix_id"t.bigint "resource_id", null: falset.string "resource_type", null: falset.string "type", null: falset.datetime "updated_at", null: falset.text "value"t.index ["metafield_definition_id"], name: "index_spree_metafields_on_metafield_definition_id"- t.index ["prefix_id"], name: "index_spree_metafields_on_prefix_id", unique: truet.index ["resource_type", "resource_id", "metafield_definition_id"], name: "index_metafields_on_resource_and_definition", unique: truet.index ["resource_type", "resource_id"], name: "index_spree_metafields_on_resource"t.index ["type"], name: "index_spree_metafields_on_type"@@ -651,7 +595,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) docreate_table "spree_newsletter_subscribers", force: :cascade do |t|t.datetime "created_at", null: falset.string "email", null: false- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.datetime "updated_at", null: false@@ -659,7 +602,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "verification_token"t.datetime "verified_at"t.index ["email"], name: "index_spree_newsletter_subscribers_on_email", unique: true- t.index ["prefix_id"], name: "index_spree_newsletter_subscribers_on_prefix_id", unique: truet.index ["user_id"], name: "index_spree_newsletter_subscribers_on_user_id"t.index ["verification_token"], name: "index_spree_newsletter_subscribers_on_verification_token", unique: truet.index ["verified_at"], name: "index_spree_newsletter_subscribers_on_verified_at"@@ -690,7 +632,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.boolean "filterable", default: true, null: falset.string "name", limit: 100t.integer "position", default: 0, null: false- t.string "prefix_id"t.string "presentation", limit: 100t.jsonb "private_metadata"t.jsonb "public_metadata"@@ -698,7 +639,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["filterable"], name: "index_spree_option_types_on_filterable"t.index ["name"], name: "index_spree_option_types_on_name", unique: truet.index ["position"], name: "index_spree_option_types_on_position"- t.index ["prefix_id"], name: "index_spree_option_types_on_prefix_id", unique: trueendcreate_table "spree_option_value_translations", force: :cascade do |t|@@ -726,7 +666,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "name"t.bigint "option_type_id"t.integer "position"- t.string "prefix_id"t.string "presentation"t.jsonb "private_metadata"t.jsonb "public_metadata"@@ -735,7 +674,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["option_type_id", "name"], name: "index_spree_option_values_on_option_type_id_and_name", unique: truet.index ["option_type_id"], name: "index_spree_option_values_on_option_type_id"t.index ["position"], name: "index_spree_option_values_on_position"- t.index ["prefix_id"], name: "index_spree_option_values_on_prefix_id", unique: trueendcreate_table "spree_order_promotions", force: :cascade do |t|@@ -775,7 +713,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "number", limit: 32t.string "payment_state"t.decimal "payment_total", precision: 10, scale: 2, default: "0.0"- t.string "prefix_id"t.jsonb "private_metadata"t.decimal "promo_total", precision: 10, scale: 2, default: "0.0"t.jsonb "public_metadata"@@ -802,7 +739,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["created_by_id"], name: "index_spree_orders_on_created_by_id"t.index ["gift_card_id"], name: "index_spree_orders_on_gift_card_id"t.index ["number"], name: "index_spree_orders_on_number", unique: true- t.index ["prefix_id"], name: "index_spree_orders_on_prefix_id", unique: truet.index ["ship_address_id"], name: "index_spree_orders_on_ship_address_id"t.index ["store_id"], name: "index_spree_orders_on_store_id"t.index ["token"], name: "index_spree_orders_on_token"@@ -813,10 +749,8 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.decimal "amount", precision: 10, scale: 2, default: "0.0"t.datetime "created_at", null: falset.bigint "payment_id"- t.string "prefix_id"t.datetime "updated_at", null: falset.index ["payment_id"], name: "index_spree_payment_capture_events_on_payment_id"- t.index ["prefix_id"], name: "index_spree_payment_capture_events_on_prefix_id", unique: trueendcreate_table "spree_payment_methods", force: :cascade do |t|@@ -829,14 +763,12 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "name"t.integer "position", default: 0t.text "preferences"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.jsonb "settings"t.string "type"t.datetime "updated_at", null: falset.index ["id", "type"], name: "index_spree_payment_methods_on_id_and_type"- t.index ["prefix_id"], name: "index_spree_payment_methods_on_prefix_id", unique: trueendcreate_table "spree_payment_methods_stores", id: false, force: :cascade do |t|@@ -852,14 +784,12 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "gateway_customer_profile_id"t.string "gateway_payment_profile_id"t.bigint "payment_method_id"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.string "type"t.datetime "updated_at", precision: nil, null: falset.bigint "user_id"t.index ["payment_method_id"], name: "index_spree_payment_sources_on_payment_method_id"- t.index ["prefix_id"], name: "index_spree_payment_sources_on_prefix_id", unique: truet.index ["type", "gateway_payment_profile_id"], name: "index_payment_sources_on_type_and_gateway_payment_profile_id", unique: truet.index ["type"], name: "index_spree_payment_sources_on_type"t.index ["user_id"], name: "index_spree_payment_sources_on_user_id"@@ -874,7 +804,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "number"t.bigint "order_id"t.bigint "payment_method_id"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.string "response_code"@@ -885,7 +814,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["number"], name: "index_spree_payments_on_number", unique: truet.index ["order_id"], name: "index_spree_payments_on_order_id"t.index ["payment_method_id"], name: "index_spree_payments_on_payment_method_id"- t.index ["prefix_id"], name: "index_spree_payments_on_prefix_id", unique: truet.index ["source_id", "source_type"], name: "index_spree_payments_on_source_id_and_source_type"end@@ -894,12 +822,10 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "name"t.bigint "owner_id"t.string "owner_type"- t.string "prefix_id"t.string "slug", null: falset.datetime "updated_at", null: falset.index ["owner_id", "owner_type", "slug"], name: "index_spree_policies_on_owner_id_and_owner_type_and_slug", unique: truet.index ["owner_type", "owner_id"], name: "index_spree_policies_on_owner"- t.index ["prefix_id"], name: "index_spree_policies_on_prefix_id", unique: trueendcreate_table "spree_policy_translations", force: :cascade do |t|@@ -914,12 +840,10 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) docreate_table "spree_post_categories", force: :cascade do |t|t.datetime "created_at", null: false- t.string "prefix_id"t.string "slug", null: falset.bigint "store_id", null: falset.string "title", null: falset.datetime "updated_at", null: false- t.index ["prefix_id"], name: "index_spree_post_categories_on_prefix_id", unique: truet.index ["slug", "store_id"], name: "index_spree_post_categories_on_slug_and_store_id", unique: truet.index ["store_id"], name: "index_spree_post_categories_on_store_id"end@@ -931,7 +855,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "meta_description"t.string "meta_title"t.bigint "post_category_id"- t.string "prefix_id"t.datetime "published_at", precision: nilt.string "slug", null: falset.bigint "store_id"@@ -939,7 +862,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "updated_at", null: falset.index ["author_id"], name: "index_spree_posts_on_author_id"t.index ["post_category_id"], name: "index_spree_posts_on_post_category_id"- t.index ["prefix_id"], name: "index_spree_posts_on_prefix_id", unique: truet.index ["store_id"], name: "index_spree_posts_on_store_id"t.index ["title"], name: "index_spree_posts_on_title"end@@ -960,14 +882,12 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "match_policy", default: "all", null: falset.string "name", null: falset.integer "position", default: 0, null: false- t.string "prefix_id"t.datetime "starts_at"t.string "status", default: "draft", null: falset.bigint "store_id", null: falset.datetime "updated_at", null: falset.index ["deleted_at"], name: "index_spree_price_lists_on_deleted_at"t.index ["position"], name: "index_spree_price_lists_on_position"- t.index ["prefix_id"], name: "index_spree_price_lists_on_prefix_id", unique: truet.index ["starts_at", "ends_at"], name: "index_spree_price_lists_on_starts_at_and_ends_at"t.index ["status"], name: "index_spree_price_lists_on_status"t.index ["store_id", "status", "position"], name: "index_spree_price_lists_on_store_id_and_status_and_position"@@ -977,11 +897,9 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) docreate_table "spree_price_rules", force: :cascade do |t|t.datetime "created_at", null: falset.text "preferences"- t.string "prefix_id"t.bigint "price_list_id", null: falset.string "type", null: falset.datetime "updated_at", null: false- t.index ["prefix_id"], name: "index_spree_price_rules_on_prefix_id", unique: truet.index ["price_list_id", "type"], name: "index_spree_price_rules_on_price_list_id_and_type"t.index ["price_list_id"], name: "index_spree_price_rules_on_price_list_id"t.index ["type"], name: "index_spree_price_rules_on_type"@@ -993,12 +911,10 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", precision: nil, null: falset.string "currency"t.datetime "deleted_at", precision: nil- t.string "prefix_id"t.bigint "price_list_id"t.datetime "updated_at", precision: nil, null: falset.bigint "variant_id", null: falset.index ["deleted_at"], name: "index_spree_prices_on_deleted_at"- t.index ["prefix_id"], name: "index_spree_prices_on_prefix_id", unique: truet.index ["price_list_id"], name: "index_spree_prices_on_price_list_id"t.index ["variant_id", "currency", "price_list_id"], name: "index_spree_prices_on_variant_currency_price_list", unique: true, where: "((price_list_id IS NOT NULL) AND (deleted_at IS NULL) AND (amount IS NOT NULL))"t.index ["variant_id", "currency"], name: "index_spree_prices_on_variant_id_and_currency", unique: true, where: "((price_list_id IS NULL) AND (deleted_at IS NULL) AND (amount IS NOT NULL))"@@ -1082,7 +998,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "meta_keywords"t.string "meta_title"t.string "name", default: "", null: false- t.string "prefix_id"t.jsonb "private_metadata"t.boolean "promotionable", default: truet.jsonb "public_metadata"@@ -1100,7 +1015,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["discontinue_on"], name: "index_spree_products_on_discontinue_on"t.index ["make_active_at"], name: "index_spree_products_on_make_active_at"t.index ["name"], name: "index_spree_products_on_name"- t.index ["prefix_id"], name: "index_spree_products_on_prefix_id", unique: truet.index ["promotionable"], name: "index_spree_products_on_promotionable"t.index ["shipping_category_id"], name: "index_spree_products_on_shipping_category_id"t.index ["slug"], name: "index_spree_products_on_slug", unique: true@@ -1114,13 +1028,11 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) docreate_table "spree_products_stores", force: :cascade do |t|t.datetime "created_at", precision: nil, null: false- t.string "prefix_id"t.bigint "product_id"t.decimal "revenue", precision: 10, scale: 2, default: "0.0", null: falset.bigint "store_id"t.integer "units_sold_count", default: 0, null: falset.datetime "updated_at", precision: nil, null: false- t.index ["prefix_id"], name: "index_spree_products_stores_on_prefix_id", unique: truet.index ["product_id", "store_id"], name: "index_spree_products_stores_on_product_id_and_store_id", unique: truet.index ["product_id"], name: "index_spree_products_stores_on_product_id"t.index ["store_id", "revenue"], name: "index_products_stores_on_store_and_revenue"@@ -1155,13 +1067,11 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", precision: nilt.datetime "deleted_at", precision: nilt.integer "position"- t.string "prefix_id"t.bigint "promotion_id"t.string "type"t.datetime "updated_at", precision: nilt.index ["deleted_at"], name: "index_spree_promotion_actions_on_deleted_at"t.index ["id", "type"], name: "index_spree_promotion_actions_on_id_and_type"- t.index ["prefix_id"], name: "index_spree_promotion_actions_on_prefix_id", unique: truet.index ["promotion_id"], name: "index_spree_promotion_actions_on_promotion_id"end@@ -1169,9 +1079,7 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "code"t.datetime "created_at", null: falset.string "name"- t.string "prefix_id"t.datetime "updated_at", null: false- t.index ["prefix_id"], name: "index_spree_promotion_categories_on_prefix_id", unique: trueendcreate_table "spree_promotion_rule_taxons", force: :cascade do |t|@@ -1198,13 +1106,11 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "code"t.datetime "created_at", null: falset.text "preferences"- t.string "prefix_id"t.bigint "product_group_id"t.bigint "promotion_id"t.string "type"t.datetime "updated_at", null: falset.bigint "user_id"- t.index ["prefix_id"], name: "index_spree_promotion_rules_on_prefix_id", unique: truet.index ["product_group_id"], name: "index_promotion_rules_on_product_group_id"t.index ["promotion_id"], name: "index_spree_promotion_rules_on_promotion_id"t.index ["user_id"], name: "index_promotion_rules_on_user_id"@@ -1223,7 +1129,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "name"t.integer "number_of_codes"t.string "path"- t.string "prefix_id"t.jsonb "private_metadata"t.bigint "promotion_category_id"t.jsonb "public_metadata"@@ -1237,7 +1142,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["id", "type"], name: "index_spree_promotions_on_id_and_type"t.index ["kind"], name: "index_spree_promotions_on_kind"t.index ["path"], name: "index_spree_promotions_on_path"- t.index ["prefix_id"], name: "index_spree_promotions_on_prefix_id", unique: truet.index ["promotion_category_id"], name: "index_spree_promotions_on_promotion_category_id"t.index ["starts_at"], name: "index_spree_promotions_on_starts_at"end@@ -1303,11 +1207,9 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) docreate_table "spree_prototypes", force: :cascade do |t|t.datetime "created_at", null: falset.string "name"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.datetime "updated_at", null: false- t.index ["prefix_id"], name: "index_spree_prototypes_on_prefix_id", unique: trueendcreate_table "spree_refund_reasons", force: :cascade do |t|@@ -1315,17 +1217,14 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", null: falset.boolean "mutable", default: truet.string "name"- t.string "prefix_id"t.datetime "updated_at", null: falset.index ["name"], name: "index_spree_refund_reasons_on_name", unique: true- t.index ["prefix_id"], name: "index_spree_refund_reasons_on_prefix_id", unique: trueendcreate_table "spree_refunds", force: :cascade do |t|t.decimal "amount", precision: 10, scale: 2, default: "0.0", null: falset.datetime "created_at", null: falset.bigint "payment_id"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.bigint "refund_reason_id"@@ -1334,7 +1233,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "transaction_id"t.datetime "updated_at", null: falset.index ["payment_id"], name: "index_spree_refunds_on_payment_id"- t.index ["prefix_id"], name: "index_spree_refunds_on_prefix_id", unique: truet.index ["refund_reason_id"], name: "index_refunds_on_refund_reason_id"t.index ["refunder_id"], name: "index_spree_refunds_on_refunder_id"t.index ["reimbursement_id"], name: "index_spree_refunds_on_reimbursement_id"@@ -1345,11 +1243,9 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", precision: nilt.bigint "creditable_id"t.string "creditable_type"- t.string "prefix_id"t.bigint "reimbursement_id"t.datetime "updated_at", precision: nilt.index ["creditable_id", "creditable_type"], name: "index_reimbursement_credits_on_creditable_id_and_type"- t.index ["prefix_id"], name: "index_spree_reimbursement_credits_on_prefix_id", unique: truet.index ["reimbursement_id"], name: "index_spree_reimbursement_credits_on_reimbursement_id"end@@ -1358,11 +1254,9 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", null: falset.boolean "mutable", default: truet.string "name"- t.string "prefix_id"t.string "type"t.datetime "updated_at", null: falset.index ["name"], name: "index_spree_reimbursement_types_on_name", unique: true- t.index ["prefix_id"], name: "index_spree_reimbursement_types_on_prefix_id", unique: truet.index ["type"], name: "index_spree_reimbursement_types_on_type"end@@ -1372,7 +1266,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "number"t.bigint "order_id"t.bigint "performed_by_id"- t.string "prefix_id"t.string "reimbursement_status"t.decimal "total", precision: 10, scale: 2t.datetime "updated_at", null: false@@ -1380,7 +1273,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["number"], name: "index_spree_reimbursements_on_number", unique: truet.index ["order_id"], name: "index_spree_reimbursements_on_order_id"t.index ["performed_by_id"], name: "index_spree_reimbursements_on_performed_by_id"- t.index ["prefix_id"], name: "index_spree_reimbursements_on_prefix_id", unique: trueendcreate_table "spree_reports", force: :cascade do |t|@@ -1388,12 +1280,10 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "currency"t.datetime "date_from", precision: nilt.datetime "date_to", precision: nil- t.string "prefix_id"t.bigint "store_id", null: falset.string "type"t.datetime "updated_at", null: falset.bigint "user_id"- t.index ["prefix_id"], name: "index_spree_reports_on_prefix_id", unique: truet.index ["store_id"], name: "index_spree_reports_on_store_id"t.index ["user_id"], name: "index_spree_reports_on_user_id"end@@ -1403,10 +1293,8 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", null: falset.boolean "mutable", default: truet.string "name"- t.string "prefix_id"t.datetime "updated_at", null: falset.index ["name"], name: "index_spree_return_authorization_reasons_on_name", unique: true- t.index ["prefix_id"], name: "index_spree_return_authorization_reasons_on_prefix_id", unique: trueendcreate_table "spree_return_authorizations", force: :cascade do |t|@@ -1414,14 +1302,12 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.text "memo"t.string "number"t.bigint "order_id"- t.string "prefix_id"t.bigint "return_authorization_reason_id"t.string "state"t.bigint "stock_location_id"t.datetime "updated_at", precision: nilt.index ["number"], name: "index_spree_return_authorizations_on_number", unique: truet.index ["order_id"], name: "index_spree_return_authorizations_on_order_id"- t.index ["prefix_id"], name: "index_spree_return_authorizations_on_prefix_id", unique: truet.index ["return_authorization_reason_id"], name: "index_return_authorizations_on_return_authorization_reason_id"t.index ["stock_location_id"], name: "index_spree_return_authorizations_on_stock_location_id"end@@ -1438,7 +1324,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.bigint "override_reimbursement_type_id"t.decimal "pre_tax_amount", precision: 12, scale: 4, default: "0.0", null: falset.bigint "preferred_reimbursement_type_id"- t.string "prefix_id"t.string "reception_status"t.bigint "reimbursement_id"t.boolean "resellable", default: true, null: false@@ -1449,7 +1334,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["inventory_unit_id"], name: "index_spree_return_items_on_inventory_unit_id"t.index ["override_reimbursement_type_id"], name: "index_spree_return_items_on_override_reimbursement_type_id"t.index ["preferred_reimbursement_type_id"], name: "index_spree_return_items_on_preferred_reimbursement_type_id"- t.index ["prefix_id"], name: "index_spree_return_items_on_prefix_id", unique: truet.index ["reimbursement_id"], name: "index_spree_return_items_on_reimbursement_id"t.index ["return_authorization_id"], name: "index_spree_return_items_on_return_authorization_id"end@@ -1474,10 +1358,8 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) docreate_table "spree_roles", force: :cascade do |t|t.datetime "created_at", precision: nilt.string "name"- t.string "prefix_id"t.datetime "updated_at", precision: nilt.index ["name"], name: "index_spree_roles_on_name", unique: true- t.index ["prefix_id"], name: "index_spree_roles_on_prefix_id", unique: trueendcreate_table "spree_shipments", force: :cascade do |t|@@ -1491,7 +1373,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "number"t.bigint "order_id"t.decimal "pre_tax_amount", precision: 12, scale: 4, default: "0.0", null: false- t.string "prefix_id"t.jsonb "private_metadata"t.decimal "promo_total", precision: 10, scale: 2, default: "0.0"t.jsonb "public_metadata"@@ -1504,26 +1385,21 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["address_id"], name: "index_spree_shipments_on_address_id"t.index ["number"], name: "index_spree_shipments_on_number", unique: truet.index ["order_id"], name: "index_spree_shipments_on_order_id"- t.index ["prefix_id"], name: "index_spree_shipments_on_prefix_id", unique: truet.index ["stock_location_id"], name: "index_spree_shipments_on_stock_location_id"endcreate_table "spree_shipping_categories", force: :cascade do |t|t.datetime "created_at", null: falset.string "name"- t.string "prefix_id"t.datetime "updated_at", null: falset.index ["name"], name: "index_spree_shipping_categories_on_name"- t.index ["prefix_id"], name: "index_spree_shipping_categories_on_prefix_id", unique: trueendcreate_table "spree_shipping_method_categories", force: :cascade do |t|t.datetime "created_at", null: false- t.string "prefix_id"t.bigint "shipping_category_id", null: falset.bigint "shipping_method_id", null: falset.datetime "updated_at", null: false- t.index ["prefix_id"], name: "index_spree_shipping_method_categories_on_prefix_id", unique: truet.index ["shipping_category_id", "shipping_method_id"], name: "unique_spree_shipping_method_categories", unique: truet.index ["shipping_category_id"], name: "index_spree_shipping_method_categories_on_shipping_category_id"t.index ["shipping_method_id"], name: "index_spree_shipping_method_categories_on_shipping_method_id"@@ -1547,27 +1423,23 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.integer "estimated_transit_business_days_max"t.integer "estimated_transit_business_days_min"t.string "name"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.bigint "tax_category_id"t.string "tracking_url"t.datetime "updated_at", null: falset.index ["deleted_at"], name: "index_spree_shipping_methods_on_deleted_at"- t.index ["prefix_id"], name: "index_spree_shipping_methods_on_prefix_id", unique: truet.index ["tax_category_id"], name: "index_spree_shipping_methods_on_tax_category_id"endcreate_table "spree_shipping_rates", force: :cascade do |t|t.decimal "cost", precision: 8, scale: 2, default: "0.0"t.datetime "created_at", null: false- t.string "prefix_id"t.boolean "selected", default: falset.bigint "shipment_id"t.bigint "shipping_method_id"t.bigint "tax_rate_id"t.datetime "updated_at", null: false- t.index ["prefix_id"], name: "index_spree_shipping_rates_on_prefix_id", unique: truet.index ["selected"], name: "index_spree_shipping_rates_on_selected"t.index ["shipment_id", "shipping_method_id"], name: "spree_shipping_rates_join_index", unique: truet.index ["shipment_id"], name: "index_spree_shipping_rates_on_shipment_id"@@ -1579,13 +1451,11 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", null: falset.string "name"t.string "next_state"- t.string "prefix_id"t.string "previous_state"t.bigint "stateful_id"t.string "stateful_type"t.datetime "updated_at", null: falset.bigint "user_id"- t.index ["prefix_id"], name: "index_spree_state_changes_on_prefix_id", unique: truet.index ["stateful_id", "stateful_type"], name: "index_spree_state_changes_on_stateful_id_and_stateful_type"end@@ -1603,7 +1473,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.integer "count_on_hand", default: 0, null: falset.datetime "created_at", null: falset.datetime "deleted_at", precision: nil- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.bigint "stock_location_id"@@ -1611,7 +1480,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.bigint "variant_id"t.index ["backorderable"], name: "index_spree_stock_items_on_backorderable"t.index ["deleted_at"], name: "index_spree_stock_items_on_deleted_at"- t.index ["prefix_id"], name: "index_spree_stock_items_on_prefix_id", unique: truet.index ["stock_location_id", "variant_id", "deleted_at"], name: "stock_item_by_loc_var_id_deleted_at", unique: truet.index ["stock_location_id", "variant_id"], name: "stock_item_by_loc_and_var_id"t.index ["stock_location_id"], name: "index_spree_stock_items_on_stock_location_id"@@ -1633,7 +1501,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "deleted_at", precision: nilt.string "name"t.string "phone"- t.string "prefix_id"t.boolean "propagate_all_variants", default: falset.bigint "state_id"t.string "state_name"@@ -1643,7 +1510,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["backorderable_default"], name: "index_spree_stock_locations_on_backorderable_default"t.index ["country_id"], name: "index_spree_stock_locations_on_country_id"t.index ["deleted_at"], name: "index_spree_stock_locations_on_deleted_at"- t.index ["prefix_id"], name: "index_spree_stock_locations_on_prefix_id", unique: truet.index ["propagate_all_variants"], name: "index_spree_stock_locations_on_propagate_all_variants"t.index ["state_id"], name: "index_spree_stock_locations_on_state_id"end@@ -1653,12 +1519,10 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", null: falset.bigint "originator_id"t.string "originator_type"- t.string "prefix_id"t.integer "quantity", default: 0t.bigint "stock_item_id"t.datetime "updated_at", null: falset.index ["originator_id", "originator_type"], name: "index_stock_movements_on_originator_id_and_originator_type"- t.index ["prefix_id"], name: "index_spree_stock_movements_on_prefix_id", unique: truet.index ["stock_item_id"], name: "index_spree_stock_movements_on_stock_item_id"end@@ -1666,7 +1530,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", null: falset.bigint "destination_location_id"t.string "number"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.string "reference"@@ -1675,16 +1538,13 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "updated_at", null: falset.index ["destination_location_id"], name: "index_spree_stock_transfers_on_destination_location_id"t.index ["number"], name: "index_spree_stock_transfers_on_number", unique: true- t.index ["prefix_id"], name: "index_spree_stock_transfers_on_prefix_id", unique: truet.index ["source_location_id"], name: "index_spree_stock_transfers_on_source_location_id"endcreate_table "spree_store_credit_categories", force: :cascade do |t|t.datetime "created_at", null: falset.string "name"- t.string "prefix_id"t.datetime "updated_at", null: false- t.index ["prefix_id"], name: "index_spree_store_credit_categories_on_prefix_id", unique: trueendcreate_table "spree_store_credit_events", force: :cascade do |t|@@ -1695,22 +1555,18 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "deleted_at", precision: nilt.bigint "originator_id"t.string "originator_type"- t.string "prefix_id"t.bigint "store_credit_id", null: falset.datetime "updated_at", null: falset.decimal "user_total_amount", precision: 8, scale: 2, default: "0.0", null: falset.index ["originator_id", "originator_type"], name: "spree_store_credit_events_originator"- t.index ["prefix_id"], name: "index_spree_store_credit_events_on_prefix_id", unique: truet.index ["store_credit_id"], name: "index_spree_store_credit_events_on_store_credit_id"endcreate_table "spree_store_credit_types", force: :cascade do |t|t.datetime "created_at", null: falset.string "name"- t.string "prefix_id"t.integer "priority"t.datetime "updated_at", null: false- t.index ["prefix_id"], name: "index_spree_store_credit_types_on_prefix_id", unique: truet.index ["priority"], name: "index_spree_store_credit_types_on_priority"end@@ -1726,7 +1582,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.text "memo"t.bigint "originator_id"t.string "originator_type"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.bigint "store_id"@@ -1735,7 +1590,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.bigint "user_id"t.index ["deleted_at"], name: "index_spree_store_credits_on_deleted_at"t.index ["originator_id", "originator_type"], name: "spree_store_credits_originator"- t.index ["prefix_id"], name: "index_spree_store_credits_on_prefix_id", unique: truet.index ["store_id"], name: "index_spree_store_credits_on_store_id"t.index ["type_id"], name: "index_spree_store_credits_on_type_id"t.index ["user_id"], name: "index_spree_store_credits_on_user_id"@@ -1785,7 +1639,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "name"t.string "new_order_notifications_email"t.text "preferences"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.string "seo_robots"@@ -1802,7 +1655,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["code"], name: "index_spree_stores_on_code", unique: truet.index ["default"], name: "index_spree_stores_on_default"t.index ["deleted_at"], name: "index_spree_stores_on_deleted_at"- t.index ["prefix_id"], name: "index_spree_stores_on_prefix_id", unique: truet.index ["url"], name: "index_spree_stores_on_url"end@@ -1844,12 +1696,10 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "description"t.boolean "is_default", default: falset.string "name"- t.string "prefix_id"t.string "tax_code"t.datetime "updated_at", null: falset.index ["deleted_at"], name: "index_spree_tax_categories_on_deleted_at"t.index ["is_default"], name: "index_spree_tax_categories_on_is_default"- t.index ["prefix_id"], name: "index_spree_tax_categories_on_prefix_id", unique: trueendcreate_table "spree_tax_rates", force: :cascade do |t|@@ -1858,7 +1708,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "deleted_at", precision: nilt.boolean "included_in_price", default: falset.string "name"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.boolean "show_rate_in_label", default: true@@ -1867,7 +1716,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.bigint "zone_id"t.index ["deleted_at"], name: "index_spree_tax_rates_on_deleted_at"t.index ["included_in_price"], name: "index_spree_tax_rates_on_included_in_price"- t.index ["prefix_id"], name: "index_spree_tax_rates_on_prefix_id", unique: truet.index ["show_rate_in_label"], name: "index_spree_tax_rates_on_show_rate_in_label"t.index ["tax_category_id"], name: "index_spree_tax_rates_on_tax_category_id"t.index ["zone_id"], name: "index_spree_tax_rates_on_zone_id"@@ -1876,12 +1724,10 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) docreate_table "spree_taxon_rules", force: :cascade do |t|t.datetime "created_at", null: falset.string "match_policy", default: "is_equal_to", null: false- t.string "prefix_id"t.bigint "taxon_id", null: falset.string "type", null: falset.datetime "updated_at", null: falset.string "value", null: false- t.index ["prefix_id"], name: "index_spree_taxon_rules_on_prefix_id", unique: truet.index ["taxon_id"], name: "index_spree_taxon_rules_on_taxon_id"end@@ -1906,14 +1752,12 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", null: falset.string "name", null: falset.integer "position", default: 0- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.bigint "store_id"t.datetime "updated_at", null: falset.index ["name", "store_id"], name: "index_spree_taxonomies_on_name_and_store_id", unique: truet.index ["position"], name: "index_spree_taxonomies_on_position"- t.index ["prefix_id"], name: "index_spree_taxonomies_on_prefix_id", unique: truet.index ["store_id"], name: "index_spree_taxonomies_on_store_id"end@@ -1943,7 +1787,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.bigint "parent_id"t.string "permalink"t.integer "position", default: 0- t.string "prefix_id"t.string "pretty_name"t.jsonb "private_metadata"t.jsonb "public_metadata"@@ -1961,7 +1804,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["permalink", "parent_id", "taxonomy_id"], name: "index_spree_taxons_on_permalink_and_parent_id_and_taxonomy_id", unique: truet.index ["permalink"], name: "index_taxons_on_permalink"t.index ["position"], name: "index_spree_taxons_on_position"- t.index ["prefix_id"], name: "index_spree_taxons_on_prefix_id", unique: truet.index ["pretty_name"], name: "index_spree_taxons_on_pretty_name"t.index ["rgt"], name: "index_spree_taxons_on_rgt"t.index ["taxonomy_id"], name: "index_taxons_on_taxonomy_id"@@ -1981,14 +1823,12 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "created_at", null: falset.datetime "expires_at"t.json "info"- t.string "prefix_id"t.string "provider", null: falset.string "refresh_token"t.string "uid", null: falset.datetime "updated_at", null: falset.bigint "user_id", null: falset.string "user_type", null: false- t.index ["prefix_id"], name: "index_spree_user_identities_on_prefix_id", unique: truet.index ["provider", "uid", "user_type"], name: "index_spree_user_identities_on_provider_uid_user_type", unique: truet.index ["user_type", "user_id"], name: "index_spree_user_identities_on_user"end@@ -2014,7 +1854,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "perishable_token"t.string "persistence_token"t.string "phone"- t.string "prefix_id"t.jsonb "private_metadata"t.jsonb "public_metadata"t.datetime "remember_created_at", precision: nil@@ -2028,7 +1867,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.datetime "updated_at", null: falset.index ["accepts_email_marketing"], name: "index_spree_users_on_accepts_email_marketing"t.index ["bill_address_id"], name: "index_spree_users_on_bill_address_id"- t.index ["prefix_id"], name: "index_spree_users_on_prefix_id", unique: truet.index ["ship_address_id"], name: "index_spree_users_on_ship_address_id"end@@ -2045,7 +1883,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.integer "image_count", default: 0, null: falset.boolean "is_master", default: falset.integer "position"- t.string "prefix_id"t.jsonb "private_metadata"t.bigint "product_id"t.jsonb "public_metadata"@@ -2063,7 +1900,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.index ["image_count"], name: "index_spree_variants_on_image_count"t.index ["is_master"], name: "index_spree_variants_on_is_master"t.index ["position"], name: "index_spree_variants_on_position"- t.index ["prefix_id"], name: "index_spree_variants_on_prefix_id", unique: truet.index ["product_id"], name: "index_spree_variants_on_product_id"t.index ["sku"], name: "index_spree_variants_on_sku"t.index ["tax_category_id"], name: "index_spree_variants_on_tax_category_id"@@ -2078,7 +1914,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "event_name", null: falset.integer "execution_time"t.jsonb "payload", null: false- t.string "prefix_id"t.text "request_errors"t.text "response_body"t.integer "response_code"@@ -2087,7 +1922,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.bigint "webhook_endpoint_id", null: falset.index ["delivered_at"], name: "index_spree_webhook_deliveries_on_delivered_at"t.index ["event_name"], name: "index_spree_webhook_deliveries_on_event_name"- t.index ["prefix_id"], name: "index_spree_webhook_deliveries_on_prefix_id", unique: truet.index ["response_code"], name: "index_spree_webhook_deliveries_on_response_code"t.index ["success"], name: "index_spree_webhook_deliveries_on_success"t.index ["webhook_endpoint_id"], name: "index_spree_webhook_deliveries_on_webhook_endpoint_id"@@ -2097,7 +1931,6 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.boolean "active", default: true, null: falset.datetime "created_at", null: falset.datetime "deleted_at"- t.string "prefix_id"t.string "secret_key", null: falset.bigint "store_id", null: falset.jsonb "subscriptions", null: false@@ -2105,18 +1938,15 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "url", null: falset.index ["active"], name: "index_spree_webhook_endpoints_on_active"t.index ["deleted_at"], name: "index_spree_webhook_endpoints_on_deleted_at"- t.index ["prefix_id"], name: "index_spree_webhook_endpoints_on_prefix_id", unique: truet.index ["store_id"], name: "index_spree_webhook_endpoints_on_store_id"endcreate_table "spree_wished_items", force: :cascade do |t|t.datetime "created_at", precision: nil, null: false- t.string "prefix_id"t.integer "quantity", default: 1, null: falset.datetime "updated_at", precision: nil, null: falset.bigint "variant_id"t.bigint "wishlist_id"- t.index ["prefix_id"], name: "index_spree_wished_items_on_prefix_id", unique: truet.index ["variant_id", "wishlist_id"], name: "index_spree_wished_items_on_variant_id_and_wishlist_id", unique: truet.index ["variant_id"], name: "index_spree_wished_items_on_variant_id"t.index ["wishlist_id"], name: "index_spree_wished_items_on_wishlist_id"@@ -2127,12 +1957,10 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.boolean "is_default", default: false, null: falset.boolean "is_private", default: true, null: falset.string "name"- t.string "prefix_id"t.bigint "store_id"t.string "token", null: falset.datetime "updated_at", precision: nil, null: falset.bigint "user_id"- t.index ["prefix_id"], name: "index_spree_wishlists_on_prefix_id", unique: truet.index ["store_id"], name: "index_spree_wishlists_on_store_id"t.index ["token"], name: "index_spree_wishlists_on_token", unique: truet.index ["user_id", "is_default"], name: "index_spree_wishlists_on_user_id_and_is_default"@@ -2155,12 +1983,10 @@ ActiveRecord::Schema[8.1].define(version: 2026_02_09_133654) dot.string "description"t.string "kind", default: "state"t.string "name"- t.string "prefix_id"t.datetime "updated_at", null: falset.integer "zone_members_count", default: 0t.index ["default_tax"], name: "index_spree_zones_on_default_tax"t.index ["kind"], name: "index_spree_zones_on_kind"- t.index ["prefix_id"], name: "index_spree_zones_on_prefix_id", unique: trueendadd_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"diff --git a/backend/engines/admin/app/controllers/spree/admin/invitations_controller.rb b/backend/engines/admin/app/controllers/spree/admin/invitations_controller.rbindex ee55062578..c6b3c8330b 100644--- a/backend/engines/admin/app/controllers/spree/admin/invitations_controller.rb+++ b/backend/engines/admin/app/controllers/spree/admin/invitations_controller.rb@@ -48,7 +48,8 @@ module Spree# GET /admin/invitations/:id?token=:tokendef show- @invitation = Spree::Invitation.pending.not_expired.find_by!(prefix_id: params[:id], token: params[:token])+ decoded_id = Spree::Invitation.decode_prefixed_id(params[:id])+ @invitation = Spree::Invitation.pending.not_expired.find_by!(id: decoded_id, token: params[:token])@parent = @invitation.resourceif try_spree_current_user.present?diff --git a/backend/engines/admin/app/controllers/spree/admin/products_controller.rb b/backend/engines/admin/app/controllers/spree/admin/products_controller.rbindex 9e40a640d6..543f8df803 100644--- a/backend/engines/admin/app/controllers/spree/admin/products_controller.rb+++ b/backend/engines/admin/app/controllers/spree/admin/products_controller.rb@@ -140,13 +140,13 @@ module Spreeuniq.group_by(&:option_type).each_with_index do |option, index|option_type, option_values = option- @product_options[option_type.prefix_id] = {+ @product_options[option_type.prefixed_id] = {name: option_type.presentation,position: index + 1,values: option_values.map { |ov| { value: ov.name, text: ov.presentation } }.uniq}- @product_available_options[option_type.prefix_id] = option_type.option_values.map { |ov| { id: ov.name, name: ov.presentation } }.uniq+ @product_available_options[option_type.prefixed_id] = option_type.option_values.map { |ov| { id: ov.name, name: ov.presentation } }.uniqend@product_stock = {}diff --git a/backend/engines/admin/app/controllers/spree/admin/resource_controller.rb b/backend/engines/admin/app/controllers/spree/admin/resource_controller.rbindex f5f631594f..8693af5a7b 100644--- a/backend/engines/admin/app/controllers/spree/admin/resource_controller.rb+++ b/backend/engines/admin/app/controllers/spree/admin/resource_controller.rb@@ -195,7 +195,8 @@ class Spree::Admin::ResourceController < Spree::Admin::BaseController# Skip prefix_id lookup for FriendlyId models (they use slug for to_param)uses_friendly_id = parent_model_class.respond_to?(:friendly_id_config)use_prefix_id = find_by == :prefix_id &&- parent_model_class.column_names.include?('prefix_id') &&+ parent_model_class.respond_to?(:_prefix_id_prefix) &&+ parent_model_class._prefix_id_prefix.present? &&!uses_friendly_id@parent ||= if use_prefix_id@@ -218,7 +219,9 @@ class Spree::Admin::ResourceController < Spree::Admin::BaseController# Skip prefix_id lookup for FriendlyId models (they use slug for to_param)uses_friendly_id = model_class.respond_to?(:friendly_id_config)- use_prefix_id = model_class.column_names.include?('prefix_id') && !uses_friendly_id+ use_prefix_id = model_class.respond_to?(:_prefix_id_prefix) &&+ model_class._prefix_id_prefix.present? &&+ !uses_friendly_idif use_prefix_idbase_scope.find_by_prefix_id!(params[:id])diff --git a/backend/engines/admin/app/views/spree/admin/products/form/_variants.html.erb b/backend/engines/admin/app/views/spree/admin/products/form/_variants.html.erbindex 20c6d67a24..2c20a5f64b 100644--- a/backend/engines/admin/app/views/spree/admin/products/form/_variants.html.erb+++ b/backend/engines/admin/app/views/spree/admin/products/form/_variants.html.erb@@ -3,7 +3,7 @@<div class="card-header"><h5 class="card-title"><%= Spree.t(:variants) %></h5></div>- <% option_types_for_select = @option_types.pluck(:presentation, :prefix_id) %>+ <% option_types_for_select = @option_types.map { |ot| [ot.presentation, ot.prefixed_id] } %><div class="card-body p-0"><%# Build currency format info for JavaScript %><% currency_formats = supported_currencies.each_with_object({}) do |currency, hash|@@ -38,7 +38,7 @@<div data-variants-form-target="optionsContainer" class="options-creator__options_container"><% @product.product_option_types.includes(:option_type).reorder('spree_product_option_types.position').each do |product_option_type| %><% option_type = product_option_type.option_type %>- <div class="options-creator__option" data-variants-form-target="option" id="option-<%= option_type.prefix_id %>">+ <div class="options-creator__option" data-variants-form-target="option" id="option-<%= option_type.prefixed_id %>"><% if can?(:manage_option_types, @product) %><button class="draggable" type="button"><i class="ti ti-grip-vertical"></i>@@ -48,7 +48,7 @@<div class="flex justify-between items-center"><h6 data-slot="optionName"><%= option_type.presentation %></h6><% if can?(:manage_option_types, @product) %>- <button class="btn btn-light btn-sm" type="button" data-action="variants-form#editOption" data-variants-form-option-id-param="<%= option_type.prefix_id %>"><%= Spree.t(:edit) %></button>+ <button class="btn btn-light btn-sm" type="button" data-action="variants-form#editOption" data-variants-form-option-id-param="<%= option_type.prefixed_id %>"><%= Spree.t(:edit) %></button><% end %></div><div data-slot="optionValuesContainer">diff --git a/backend/engines/admin/app/views/spree/admin/shared/_content_header.html.erb b/backend/engines/admin/app/views/spree/admin/shared/_content_header.html.erbindex fbbfcde41a..cb3b373e6f 100644--- a/backend/engines/admin/app/views/spree/admin/shared/_content_header.html.erb+++ b/backend/engines/admin/app/views/spree/admin/shared/_content_header.html.erb@@ -52,7 +52,7 @@</div><% end %><div data-controller="clipboard" data-clipboard-success-content-value='<%= icon('check') + ' ' + Spree.t(:copied) %>'>- <%= hidden_field_tag :record_id, record.respond_to?(:prefix_id) ? record.prefix_id : record.id, data: { clipboard_target: 'source' } %>+ <%= hidden_field_tag :record_id, record.respond_to?(:prefixed_id) ? record.prefixed_id : record.id, data: { clipboard_target: 'source' } %><button data-action="clipboard#copy" class="text-left dropdown-item" data-clipboard-target="button"><%= icon 'copy' %><%= Spree.t(:copy_id) %>diff --git a/backend/engines/admin/spec/features/spree/admin/products/products_spec.rb b/backend/engines/admin/spec/features/spree/admin/products/products_spec.rbindex c4f7a52a81..8a6438bde2 100644--- a/backend/engines/admin/spec/features/spree/admin/products/products_spec.rb+++ b/backend/engines/admin/spec/features/spree/admin/products/products_spec.rb@@ -274,12 +274,12 @@ describe 'Products', type: :feature docolor_option = Spree::OptionType.find_by(name: 'color')size_option = Spree::OptionType.find_by(name: 'size')- within("#option-#{color_option.prefix_id}") do+ within("#option-#{color_option.prefixed_id}") doexpect(page).to have_content('Black')expect(page).to have_content('White')end- within("#option-#{size_option.prefix_id}") do+ within("#option-#{size_option.prefixed_id}") doexpect(page).to have_content('Small')expect(page).to have_content('Medium')expect(page).to have_content('Large')@@ -355,13 +355,13 @@ describe 'Products', type: :feature docolor_option = Spree::OptionType.find_by(name: 'color')- within("#option-#{color_option.prefix_id}") do+ within("#option-#{color_option.prefixed_id}") doclick_on 'Edit'select_option_value('Red', index: 2, create: true)click_on 'Done'end- within("#option-#{color_option.prefix_id}") do+ within("#option-#{color_option.prefixed_id}") doexpect(page).to have_content('Black')expect(page).to have_content('White')expect(page).to have_content('Red')@@ -579,7 +579,7 @@ describe 'Products', type: :feature domaterial_option = Spree::OptionType.find_by(name: 'material')- within("#option-#{material_option.prefix_id}") do+ within("#option-#{material_option.prefixed_id}") doexpect(page).to have_content('Cotton')expect(page).to have_content('Polyester')end@@ -665,13 +665,13 @@ describe 'Products', type: :feature doit 'allows removing the first option' dovisit spree.edit_admin_product_path(product.reload)- within("#option-#{color_option.prefix_id}") do+ within("#option-#{color_option.prefixed_id}") doclick_on 'Edit'click_on 'Delete'end- expect(page).not_to have_css("#option-#{color_option.prefix_id}")- expect(page).to have_css("#option-#{size_option.prefix_id}")+ expect(page).not_to have_css("#option-#{color_option.prefixed_id}")+ expect(page).to have_css("#option-#{size_option.prefixed_id}")within('[data-test-id="product-variants-table"]') doexpect(page).not_to have_content('Black')@@ -759,13 +759,13 @@ describe 'Products', type: :feature doit 'allows removing the last option' dovisit spree.edit_admin_product_path(product.reload)- within("#option-#{size_option.prefix_id}") do+ within("#option-#{size_option.prefixed_id}") doclick_on 'Edit'click_on 'Delete'end- expect(page).to have_css("#option-#{color_option.prefix_id}")- expect(page).not_to have_css("#option-#{size_option.prefix_id}")+ expect(page).to have_css("#option-#{color_option.prefixed_id}")+ expect(page).not_to have_css("#option-#{size_option.prefixed_id}")within('[data-test-id="product-variants-table"]') doexpect(page).to have_content('Black')@@ -798,18 +798,18 @@ describe 'Products', type: :feature doit 'allows removing all options' dovisit spree.edit_admin_product_path(product.reload)- within("#option-#{color_option.prefix_id}") do+ within("#option-#{color_option.prefixed_id}") doclick_on 'Edit'click_on 'Delete'end- within("#option-#{size_option.prefix_id}") do+ within("#option-#{size_option.prefixed_id}") doclick_on 'Edit'click_on 'Delete'end- expect(page).not_to have_css("#option-#{color_option.prefix_id}")- expect(page).not_to have_css("#option-#{size_option.prefix_id}")+ expect(page).not_to have_css("#option-#{color_option.prefixed_id}")+ expect(page).not_to have_css("#option-#{size_option.prefixed_id}")expect(page).not_to have_css('[data-test-id="product-variants-table"]')# Update product variants@@ -823,12 +823,12 @@ describe 'Products', type: :feature doit 'allows removing all options and adding one back and a new one' dovisit spree.edit_admin_product_path(product.reload)- within("#option-#{color_option.prefix_id}") do+ within("#option-#{color_option.prefixed_id}") doclick_on 'Edit'click_on 'Delete'end- within("#option-#{size_option.prefix_id}") do+ within("#option-#{size_option.prefixed_id}") doclick_on 'Edit'click_on 'Delete'end@@ -839,7 +839,7 @@ describe 'Products', type: :feature doselect_option_value('White', index: 0)click_on 'Done'- within("#option-#{color_option.prefix_id}") do+ within("#option-#{color_option.prefixed_id}") doexpect(page).to have_content('White')end@@ -915,7 +915,7 @@ describe 'Products', type: :feature doclick_on 'Delete selected'- within("#option-#{color_option.prefix_id}") do+ within("#option-#{color_option.prefixed_id}") doexpect(page).not_to have_content('Red')expect(page).to have_content('Black')expect(page).to have_content('White')@@ -987,7 +987,7 @@ describe 'Products', type: :feature doclick_on 'Delete selected'- within("#option-#{color_option.prefix_id}") do+ within("#option-#{color_option.prefixed_id}") doexpect(page).not_to have_content('White')expect(page).to have_content('Black')end@@ -1009,12 +1009,12 @@ describe 'Products', type: :feature doexpect(page).to have_content('successfully updated')within('.alerts-container') { find('button').click }- within("#option-#{color_option.prefix_id}") do+ within("#option-#{color_option.prefixed_id}") doexpect(page).to have_content('Black')expect(page).not_to have_content('White')end- within("#option-#{size_option.prefix_id}") do+ within("#option-#{size_option.prefixed_id}") doexpect(page).to have_content('Small')expect(page).not_to have_content('Medium')expect(page).not_to have_content('Large')@@ -1038,7 +1038,7 @@ describe 'Products', type: :feature doendend- within("#option-#{size_option.prefix_id}") do+ within("#option-#{size_option.prefixed_id}") doclick_on 'Edit'select_option_value('Extra Large', index: 3, create: true)click_on 'Done'diff --git a/backend/engines/admin/spec/helpers/spree/admin/json_preview_helper_spec.rb b/backend/engines/admin/spec/helpers/spree/admin/json_preview_helper_spec.rbindex 8604cc6f4c..f210a79e4d 100644--- a/backend/engines/admin/spec/helpers/spree/admin/json_preview_helper_spec.rb+++ b/backend/engines/admin/spec/helpers/spree/admin/json_preview_helper_spec.rb@@ -33,7 +33,7 @@ RSpec.describe Spree::Admin::JsonPreviewHelper, type: :helper doexpect(json).to be_presentparsed = JSON.parse(json)expect(parsed['name']).to eq(product.name)- expect(parsed['id']).to eq(product.prefix_id)+ expect(parsed['id']).to eq(product.prefixed_id)endit 'serializes Order to JSON' do@@ -41,7 +41,7 @@ RSpec.describe Spree::Admin::JsonPreviewHelper, type: :helper doexpect(json).to be_presentparsed = JSON.parse(json)expect(parsed['number']).to eq(order.number)- expect(parsed['id']).to eq(order.prefix_id)+ expect(parsed['id']).to eq(order.prefixed_id)endenddiff --git a/backend/engines/api/app/controllers/concerns/spree/api/v3/error_handler.rb b/backend/engines/api/app/controllers/concerns/spree/api/v3/error_handler.rbindex 2509bafbbf..5eb8a0c134 100644--- a/backend/engines/api/app/controllers/concerns/spree/api/v3/error_handler.rb+++ b/backend/engines/api/app/controllers/concerns/spree/api/v3/error_handler.rb@@ -230,7 +230,7 @@ module Spree# Generate human-readable not found messagedef generate_not_found_message(exception)model_name = extract_model_name(exception)- Spree.t(:record_not_found, scope: 'api', model: model_name.humanize)+ Spree.t(:record_not_found, scope: 'api', model: model_name&.humanize || 'record')end# Extract clean model name from exceptiondiff --git a/backend/engines/api/app/controllers/concerns/spree/api/v3/order_concern.rb b/backend/engines/api/app/controllers/concerns/spree/api/v3/order_concern.rbindex 75c4fdc594..b776d1a0d3 100644--- a/backend/engines/api/app/controllers/concerns/spree/api/v3/order_concern.rb+++ b/backend/engines/api/app/controllers/concerns/spree/api/v3/order_concern.rb@@ -11,7 +11,7 @@ module Spreeenddef set_parent- @parent = current_store.orders.find_by!(prefix_id: params[:order_id]) if params[:order_id].present?+ @parent = current_store.orders.find_by_prefix_id!(params[:order_id]) if params[:order_id].present?endprotecteddiff --git a/backend/engines/api/app/controllers/spree/api/v3/store/orders/line_items_controller.rb b/backend/engines/api/app/controllers/spree/api/v3/store/orders/line_items_controller.rbindex 1ac1ed523d..4097eb6a67 100644--- a/backend/engines/api/app/controllers/spree/api/v3/store/orders/line_items_controller.rb+++ b/backend/engines/api/app/controllers/spree/api/v3/store/orders/line_items_controller.rb@@ -28,7 +28,7 @@ module Spree# PATCH /api/v3/store/orders/:order_id/line_items/:iddef update- @line_item = scope.find_by!(prefix_id: params[:id])+ @line_item = scope.find_by_prefix_id!(params[:id])if permitted_params[:quantity].present?result = Spree.cart_set_item_quantity_service.call(@@ -49,7 +49,7 @@ module Spree# DELETE /api/v3/store/orders/:order_id/line_items/:iddef destroy- @line_item = scope.find_by!(prefix_id: params[:id])+ @line_item = scope.find_by_prefix_id!(params[:id])Spree.cart_remove_line_item_service.call(order: @parent,@@ -66,7 +66,7 @@ module Spreeenddef variant- @variant ||= current_store.variants.accessible_by(current_ability).find_by!(prefix_id: permitted_params[:variant_id])+ @variant ||= current_store.variants.accessible_by(current_ability).find_by_prefix_id!(permitted_params[:variant_id])enddef model_classdiff --git a/backend/engines/api/app/controllers/spree/api/v3/store/orders/payments_controller.rb b/backend/engines/api/app/controllers/spree/api/v3/store/orders/payments_controller.rbindex 2695ded006..6be3d7d7f8 100644--- a/backend/engines/api/app/controllers/spree/api/v3/store/orders/payments_controller.rb+++ b/backend/engines/api/app/controllers/spree/api/v3/store/orders/payments_controller.rb@@ -32,7 +32,7 @@ module Spreeenddef set_payment- @payment = @parent.payments.find_by!(prefix_id: params[:id])+ @payment = @parent.payments.find_by_prefix_id!(params[:id])enddef serializer_classdiff --git a/backend/engines/api/app/controllers/spree/api/v3/store/orders_controller.rb b/backend/engines/api/app/controllers/spree/api/v3/store/orders_controller.rbindex 162b56c355..b55482f39e 100644--- a/backend/engines/api/app/controllers/spree/api/v3/store/orders_controller.rb+++ b/backend/engines/api/app/controllers/spree/api/v3/store/orders_controller.rb@@ -88,7 +88,7 @@ module Spree# Override set_resource to use friendly finder and order_token authorizationdef set_resource- @order = current_store.orders.find_by!(prefix_id: params[:id])+ @order = current_store.orders.find_by_prefix_id!(params[:id])@resource = @orderauthorize_resource!(@order)enddiff --git a/backend/engines/api/app/controllers/spree/api/v3/store/products_controller.rb b/backend/engines/api/app/controllers/spree/api/v3/store/products_controller.rbindex 0d276e3e2d..897fe90420 100644--- a/backend/engines/api/app/controllers/spree/api/v3/store/products_controller.rb+++ b/backend/engines/api/app/controllers/spree/api/v3/store/products_controller.rb@@ -19,12 +19,12 @@ module SpreeSpree.api.product_serializerend- # Find product by slug or prefix_id with i18n scope for SEO-friendly URLs+ # Find product by slug or prefixed ID with i18n scope for SEO-friendly URLs# Falls back to default locale if product is not found in the current localedef find_resourceid = params[:id]if id.to_s.start_with?('prod_')- scope.find_by!(prefix_id: id)+ scope.find_by_prefix_id!(id)elsefind_with_fallback_default_locale { scope.i18n.find_by!(slug: id) }enddiff --git a/backend/engines/api/app/controllers/spree/api/v3/store/taxons/products_controller.rb b/backend/engines/api/app/controllers/spree/api/v3/store/taxons/products_controller.rbindex 2df3dea882..e0158504eb 100644--- a/backend/engines/api/app/controllers/spree/api/v3/store/taxons/products_controller.rb+++ b/backend/engines/api/app/controllers/spree/api/v3/store/taxons/products_controller.rb@@ -31,7 +31,7 @@ module Spreetaxon_scope = taxon_scope.i18n if Spree::Taxon.include?(Spree::TranslatableResource)if id.to_s.start_with?('txn_')- taxon_scope.find_by!(prefix_id: id)+ taxon_scope.find_by_prefix_id!(id)elsefind_with_fallback_default_locale { taxon_scope.i18n.find_by!(permalink: id) }enddiff --git a/backend/engines/api/app/controllers/spree/api/v3/store/taxons_controller.rb b/backend/engines/api/app/controllers/spree/api/v3/store/taxons_controller.rbindex 3ea6ea372d..32d6ce2bf2 100644--- a/backend/engines/api/app/controllers/spree/api/v3/store/taxons_controller.rb+++ b/backend/engines/api/app/controllers/spree/api/v3/store/taxons_controller.rb@@ -13,12 +13,12 @@ module SpreeSpree.api.taxon_serializerend- # Find taxon by permalink or prefix_id with i18n scope for SEO-friendly URLs+ # Find taxon by permalink or prefixed ID with i18n scope for SEO-friendly URLs# Falls back to default locale if taxon is not found in the current localedef find_resourceid = params[:id]if id.to_s.start_with?('txn_')- scope.find_by!(prefix_id: id)+ scope.find_by_prefix_id!(id)elsefind_with_fallback_default_locale { scope.i18n.find_by!(permalink: id) }enddiff --git a/backend/engines/api/app/controllers/spree/api/v3/store/wishlist_items_controller.rb b/backend/engines/api/app/controllers/spree/api/v3/store/wishlist_items_controller.rbindex 06fbe06540..398b901b25 100644--- a/backend/engines/api/app/controllers/spree/api/v3/store/wishlist_items_controller.rb+++ b/backend/engines/api/app/controllers/spree/api/v3/store/wishlist_items_controller.rb@@ -8,7 +8,7 @@ module Spreeprotecteddef set_parent- @parent = current_user.wishlists.find_by!(prefix_id: params[:wishlist_id])+ @parent = current_user.wishlists.find_by_prefix_id!(params[:wishlist_id])enddef parent_associationdiff --git a/backend/engines/api/app/serializers/spree/api/v3/admin/price_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/admin/price_serializer.rbindex 29ad52f032..087d237584 100644--- a/backend/engines/api/app/serializers/spree/api/v3/admin/price_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/admin/price_serializer.rb@@ -10,7 +10,7 @@ module Spreeupdated_at: :stringattribute :variant_id do |price|- price&.variant&.prefix_id+ price&.variant&.prefixed_idendattributes created_at: :iso8601, updated_at: :iso8601diff --git a/backend/engines/api/app/serializers/spree/api/v3/base_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/base_serializer.rbindex 59f6629be2..09d056a099 100644--- a/backend/engines/api/app/serializers/spree/api/v3/base_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/base_serializer.rb@@ -9,11 +9,11 @@ module Spreetypelize id: :string, created_at: :string, updated_at: :string# Use prefixed IDs (Stripe-style) for all API v3 serializers- # e.g., prod_abc123, var_xyz789, or_def456+ # e.g., prod_86Rf07xd4z, variant_k5nR8xLq, or_m3Rp9wXzattribute :id do |object|- next nil unless object.respond_to?(:prefix_id)+ next nil unless object.respond_to?(:prefixed_id)- object.prefix_id+ object.prefixed_idend# Context accessorsdiff --git a/backend/engines/api/app/serializers/spree/api/v3/image_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/image_serializer.rbindex cbb464d6fb..7fc6f102c2 100644--- a/backend/engines/api/app/serializers/spree/api/v3/image_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/image_serializer.rb@@ -9,7 +9,7 @@ module Spreeog_image_url: 'string | null'attribute :viewable_id do |image|- image.viewable&.prefix_id+ image.viewable&.prefixed_idendattributes :position, :alt, :viewable_type,diff --git a/backend/engines/api/app/serializers/spree/api/v3/line_item_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/line_item_serializer.rbindex 320c4d1202..900b9c2aaa 100644--- a/backend/engines/api/app/serializers/spree/api/v3/line_item_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/line_item_serializer.rb@@ -14,7 +14,7 @@ module Spreethumbnail_url: 'string | null'attribute :variant_id do |line_item|- line_item.variant&.prefix_id+ line_item.variant&.prefixed_idendattributes :quantity, :name, :slug, :options_text,diff --git a/backend/engines/api/app/serializers/spree/api/v3/option_value_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/option_value_serializer.rbindex 35fbb19f7c..964a248c62 100644--- a/backend/engines/api/app/serializers/spree/api/v3/option_value_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/option_value_serializer.rb@@ -6,7 +6,7 @@ module Spreeoption_type_name: :string, option_type_presentation: :stringattribute :option_type_id do |option_value|- option_value.option_type&.prefix_id+ option_value.option_type&.prefixed_idendattributes :name, :presentation, :positiondiff --git a/backend/engines/api/app/serializers/spree/api/v3/order_promotion_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/order_promotion_serializer.rbindex 5ec6ca8e89..737721421e 100644--- a/backend/engines/api/app/serializers/spree/api/v3/order_promotion_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/order_promotion_serializer.rb@@ -6,7 +6,7 @@ module Spreeamount: :string, display_amount: :string, promotion_id: :stringattribute :promotion_id do |order_promotion|- order_promotion.promotion&.prefix_id+ order_promotion.promotion&.prefixed_idendattributes :name, :description, :code, :amount, :display_amountdiff --git a/backend/engines/api/app/serializers/spree/api/v3/order_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/order_serializer.rbindex c5ade54909..2f0868730e 100644--- a/backend/engines/api/app/serializers/spree/api/v3/order_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/order_serializer.rb@@ -51,8 +51,8 @@ module Spreeattribute :payment_methods do |order|pms = order.payment_methods rescue []- (pms || []).compact.select { |pm| pm.respond_to?(:prefix_id) }.map do |pm|- { id: pm.prefix_id, name: pm.name, description: pm.description, type: pm.type }+ (pms || []).compact.select { |pm| pm.respond_to?(:prefixed_id) }.map do |pm|+ { id: pm.prefixed_id, name: pm.name, description: pm.description, type: pm.type }endendenddiff --git a/backend/engines/api/app/serializers/spree/api/v3/payment_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/payment_serializer.rbindex 4b5d11c4a2..116dd452d1 100644--- a/backend/engines/api/app/serializers/spree/api/v3/payment_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/payment_serializer.rb@@ -6,7 +6,7 @@ module Spreenumber: :string, amount: :string, display_amount: :stringattribute :payment_method_id do |payment|- payment.payment_method&.prefix_id+ payment.payment_method&.prefixed_idendattributes :state, :response_code, :number, :amount, :display_amount,diff --git a/backend/engines/api/app/serializers/spree/api/v3/price_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/price_serializer.rbindex 140c5e9e71..962a399ab0 100644--- a/backend/engines/api/app/serializers/spree/api/v3/price_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/price_serializer.rb@@ -28,7 +28,7 @@ module Spreeattribute :price_list_id do |price|next nil unless price&.price_list_id.present?- price.price_list.prefix_id+ price.price_list.prefixed_idendendenddiff --git a/backend/engines/api/app/serializers/spree/api/v3/product_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/product_serializer.rbindex 1c5989ba64..1797cdfbaf 100644--- a/backend/engines/api/app/serializers/spree/api/v3/product_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/product_serializer.rb@@ -37,7 +37,7 @@ module Spreeendattribute :default_variant_id do |product|- product.default_variant&.prefix_id+ product.default_variant&.prefixed_idend# Main product image URL for listings (cached thumbnail)diff --git a/backend/engines/api/app/serializers/spree/api/v3/shipping_rate_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/shipping_rate_serializer.rbindex 2d6c570ba0..77ba07fed1 100644--- a/backend/engines/api/app/serializers/spree/api/v3/shipping_rate_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/shipping_rate_serializer.rb@@ -6,7 +6,7 @@ module Spreecost: :number, display_cost: :stringattribute :shipping_method_id do |shipping_rate|- shipping_rate.shipping_method&.prefix_id+ shipping_rate.shipping_method&.prefixed_idendattributes :name, :selecteddiff --git a/backend/engines/api/app/serializers/spree/api/v3/taxon_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/taxon_serializer.rbindex 7a0710760a..894716e223 100644--- a/backend/engines/api/app/serializers/spree/api/v3/taxon_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/taxon_serializer.rb@@ -15,11 +15,11 @@ module Spreecreated_at: :iso8601, updated_at: :iso8601attribute :parent_id do |taxon|- taxon.parent&.prefix_id+ taxon.parent&.prefixed_idendattribute :taxonomy_id do |taxon|- taxon.taxonomy&.prefix_id+ taxon.taxonomy&.prefixed_idendattribute :description do |taxon|diff --git a/backend/engines/api/app/serializers/spree/api/v3/taxonomy_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/taxonomy_serializer.rbindex f21141e159..4d8b8c85c9 100644--- a/backend/engines/api/app/serializers/spree/api/v3/taxonomy_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/taxonomy_serializer.rb@@ -8,7 +8,7 @@ module Spreecreated_at: :iso8601, updated_at: :iso8601attribute :root_id do |taxonomy|- taxonomy.root&.prefix_id+ taxonomy.root&.prefixed_idend# Conditional associationsdiff --git a/backend/engines/api/app/serializers/spree/api/v3/variant_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/variant_serializer.rbindex 86feb9143b..ef22de5e88 100644--- a/backend/engines/api/app/serializers/spree/api/v3/variant_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/variant_serializer.rb@@ -13,7 +13,7 @@ module Spreeoriginal_price: 'StorePrice | null'attribute :product_id do |variant|- variant.product&.prefix_id+ variant.product&.prefixed_idendattributes :sku, :is_master, :options_text, :track_inventory, :image_count,diff --git a/backend/engines/api/app/serializers/spree/api/v3/wished_item_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/wished_item_serializer.rbindex b52c8f97f9..032015db1c 100644--- a/backend/engines/api/app/serializers/spree/api/v3/wished_item_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/wished_item_serializer.rb@@ -5,11 +5,11 @@ module Spreetypelize variant_id: :string, wishlist_id: :string, quantity: :numberattribute :variant_id do |wished_item|- wished_item.variant&.prefix_id+ wished_item.variant&.prefixed_idendattribute :wishlist_id do |wished_item|- wished_item.wishlist&.prefix_id+ wished_item.wishlist&.prefixed_idendattributes :quantity,diff --git a/backend/engines/api/app/services/spree/api/v3/filters_aggregator.rb b/backend/engines/api/app/services/spree/api/v3/filters_aggregator.rbindex 5e637900c0..b0ec4ccc20 100644--- a/backend/engines/api/app/services/spree/api/v3/filters_aggregator.rb+++ b/backend/engines/api/app/services/spree/api/v3/filters_aggregator.rb@@ -88,7 +88,7 @@ module Spreenext if values.empty?{- id: option_type.prefix_id,+ id: option_type.prefixed_id,type: 'option',label: option_type.presentation,name: option_type.name,@@ -109,7 +109,7 @@ module Spree.count{- id: option_value.prefix_id,+ id: option_value.prefixed_id,label: option_value.presentation,name: option_value.name,position: option_value.position,@@ -144,7 +144,7 @@ module Spreecount = @scope.in_taxon(taxon).distinct.count{- id: taxon.prefix_id,+ id: taxon.prefixed_id,label: taxon.name,permalink: taxon.permalink,count: countdiff --git a/backend/engines/api/app/services/spree/api/v3/orders/update.rb b/backend/engines/api/app/services/spree/api/v3/orders/update.rbindex d71789c426..3934187aa2 100644--- a/backend/engines/api/app/services/spree/api/v3/orders/update.rb+++ b/backend/engines/api/app/services/spree/api/v3/orders/update.rb@@ -81,11 +81,12 @@ module Spreeendend- # Translate prefix_id to internal id- def resolve_address_id(prefix_id)+ # Translate prefixed ID to internal id+ def resolve_address_id(prefixed_id)return unless order.user- order.user.addresses.find_by(prefix_id: prefix_id)&.id+ decoded = Spree::Address.decode_prefixed_id(prefixed_id)+ decoded ? order.user.addresses.find_by(id: decoded)&.id : nilend# Revert order state to 'address' when address changesdiff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/customer/account_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/customer/account_controller_spec.rbindex 776e46a0cd..ce225c9a3c 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/customer/account_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/customer/account_controller_spec.rb@@ -15,7 +15,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::AccountController, type: :controget :showexpect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(user.prefix_id)+ expect(json_response['id']).to eq(user.prefixed_id)expect(json_response['email']).to eq(user.email)enddiff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/customer/addresses_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/customer/addresses_controller_spec.rbindex 21d71f619c..b88f93d274 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/customer/addresses_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/customer/addresses_controller_spec.rb@@ -36,8 +36,8 @@ RSpec.describe Spree::Api::V3::Store::Customer::AddressesController, type: :contget :indexids = json_response['data'].map { |a| a['id'] }- expect(ids).to include(address.prefix_id)- expect(ids).not_to include(other_address.prefix_id)+ expect(ids).to include(address.prefixed_id)+ expect(ids).not_to include(other_address.prefixed_id)endcontext 'without authentication' do@@ -53,14 +53,14 @@ RSpec.describe Spree::Api::V3::Store::Customer::AddressesController, type: :contdescribe 'GET #show' doit 'returns the address' do- get :show, params: { id: address.prefix_id }+ get :show, params: { id: address.prefixed_id }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(address.prefix_id)+ expect(json_response['id']).to eq(address.prefixed_id)endit 'returns address attributes' do- get :show, params: { id: address.prefix_id }+ get :show, params: { id: address.prefixed_id }expect(json_response).to include('id', 'firstname', 'lastname', 'address1', 'city', 'zipcode')end@@ -70,7 +70,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::AddressesController, type: :contlet(:other_address) { create(:address, user: other_user) }it 'returns not found' do- get :show, params: { id: other_address.prefix_id }+ get :show, params: { id: other_address.prefixed_id }expect(response).to have_http_status(:not_found)end@@ -80,7 +80,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::AddressesController, type: :contbefore { request.headers['Authorization'] = nil }it 'returns unauthorized' do- get :show, params: { id: address.prefix_id }+ get :show, params: { id: address.prefixed_id }expect(response).to have_http_status(:unauthorized)end@@ -139,14 +139,14 @@ RSpec.describe Spree::Api::V3::Store::Customer::AddressesController, type: :contdescribe 'PATCH #update' doit 'updates the address' do- patch :update, params: { id: address.prefix_id, firstname: 'Updated' }+ patch :update, params: { id: address.prefixed_id, firstname: 'Updated' }expect(response).to have_http_status(:ok)expect(address.reload.firstname).to eq('Updated')endit 'returns the updated address' do- patch :update, params: { id: address.prefix_id, firstname: 'Updated' }+ patch :update, params: { id: address.prefixed_id, firstname: 'Updated' }expect(json_response['firstname']).to eq('Updated')end@@ -156,7 +156,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::AddressesController, type: :contlet(:other_address) { create(:address, user: other_user) }it 'returns not found' do- patch :update, params: { id: other_address.prefix_id, firstname: 'Hacker' }+ patch :update, params: { id: other_address.prefixed_id, firstname: 'Hacker' }expect(response).to have_http_status(:not_found)expect(other_address.reload.firstname).not_to eq('Hacker')@@ -167,7 +167,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::AddressesController, type: :contbefore { request.headers['Authorization'] = nil }it 'returns unauthorized' do- patch :update, params: { id: address.prefix_id, firstname: 'Updated' }+ patch :update, params: { id: address.prefixed_id, firstname: 'Updated' }expect(response).to have_http_status(:unauthorized)end@@ -177,7 +177,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::AddressesController, type: :contdescribe 'DELETE #destroy' doit 'deletes the address' doexpect {- delete :destroy, params: { id: address.prefix_id }+ delete :destroy, params: { id: address.prefixed_id }}.to change { user.addresses.count }.by(-1)expect(response).to have_http_status(:no_content)@@ -189,7 +189,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::AddressesController, type: :contit 'returns not found' doexpect {- delete :destroy, params: { id: other_address.prefix_id }+ delete :destroy, params: { id: other_address.prefixed_id }}.not_to change { Spree::Address.count }expect(response).to have_http_status(:not_found)@@ -200,7 +200,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::AddressesController, type: :contbefore { request.headers['Authorization'] = nil }it 'returns unauthorized' do- delete :destroy, params: { id: address.prefix_id }+ delete :destroy, params: { id: address.prefixed_id }expect(response).to have_http_status(:unauthorized)enddiff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/customer/credit_cards_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/customer/credit_cards_controller_spec.rbindex 8f602dd54e..3153bcda96 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/customer/credit_cards_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/customer/credit_cards_controller_spec.rb@@ -34,8 +34,8 @@ RSpec.describe Spree::Api::V3::Store::Customer::CreditCardsController, type: :coget :indexids = json_response['data'].map { |c| c['id'] }- expect(ids).to include(credit_card.prefix_id)- expect(ids).not_to include(other_card.prefix_id)+ expect(ids).to include(credit_card.prefixed_id)+ expect(ids).not_to include(other_card.prefixed_id)endcontext 'without authentication' do@@ -51,10 +51,10 @@ RSpec.describe Spree::Api::V3::Store::Customer::CreditCardsController, type: :codescribe 'GET #show' doit 'returns the credit card' do- get :show, params: { id: credit_card.prefix_id }+ get :show, params: { id: credit_card.prefixed_id }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(credit_card.prefix_id)+ expect(json_response['id']).to eq(credit_card.prefixed_id)endcontext 'when credit card belongs to another user' do@@ -62,7 +62,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::CreditCardsController, type: :colet(:other_card) { create(:credit_card, user: other_user) }it 'returns not found' do- get :show, params: { id: other_card.prefix_id }+ get :show, params: { id: other_card.prefixed_id }expect(response).to have_http_status(:not_found)end@@ -72,7 +72,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::CreditCardsController, type: :cobefore { request.headers['Authorization'] = nil }it 'returns unauthorized' do- get :show, params: { id: credit_card.prefix_id }+ get :show, params: { id: credit_card.prefixed_id }expect(response).to have_http_status(:unauthorized)end@@ -82,7 +82,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::CreditCardsController, type: :codescribe 'DELETE #destroy' doit 'deletes the credit card' doexpect {- delete :destroy, params: { id: credit_card.prefix_id }+ delete :destroy, params: { id: credit_card.prefixed_id }}.to change { user.credit_cards.count }.by(-1)expect(response).to have_http_status(:no_content)@@ -94,7 +94,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::CreditCardsController, type: :coit 'returns not found' doexpect {- delete :destroy, params: { id: other_card.prefix_id }+ delete :destroy, params: { id: other_card.prefixed_id }}.not_to change { Spree::CreditCard.count }expect(response).to have_http_status(:not_found)@@ -105,7 +105,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::CreditCardsController, type: :cobefore { request.headers['Authorization'] = nil }it 'returns unauthorized' do- delete :destroy, params: { id: credit_card.prefix_id }+ delete :destroy, params: { id: credit_card.prefixed_id }expect(response).to have_http_status(:unauthorized)enddiff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/customer/gift_cards_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/customer/gift_cards_controller_spec.rbindex 9ecf6432ff..ec33cde539 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/customer/gift_cards_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/customer/gift_cards_controller_spec.rb@@ -57,8 +57,8 @@ RSpec.describe Spree::Api::V3::Store::Customer::GiftCardsController, type: :contget :indexids = json_response['data'].map { |c| c['id'] }- expect(ids).to include(gift_card.prefix_id)- expect(ids).not_to include(other_card.prefix_id)+ expect(ids).to include(gift_card.prefixed_id)+ expect(ids).not_to include(other_card.prefixed_id)endit 'only returns gift cards from the current store' do@@ -68,8 +68,8 @@ RSpec.describe Spree::Api::V3::Store::Customer::GiftCardsController, type: :contget :indexids = json_response['data'].map { |c| c['id'] }- expect(ids).to include(gift_card.prefix_id)- expect(ids).not_to include(other_store_card.prefix_id)+ expect(ids).to include(gift_card.prefixed_id)+ expect(ids).not_to include(other_store_card.prefixed_id)endit 'returns gift cards ordered by created_at desc' do@@ -79,8 +79,8 @@ RSpec.describe Spree::Api::V3::Store::Customer::GiftCardsController, type: :contget :indexids = json_response['data'].map { |c| c['id'] }- expect(ids.first).to eq(newer_card.prefix_id)- expect(ids.last).to eq(older_card.prefix_id)+ expect(ids.first).to eq(newer_card.prefixed_id)+ expect(ids.last).to eq(older_card.prefixed_id)endcontext 'with expired gift card' do@@ -90,13 +90,13 @@ RSpec.describe Spree::Api::V3::Store::Customer::GiftCardsController, type: :contget :indexids = json_response['data'].map { |c| c['id'] }- expect(ids).to include(expired_card.prefix_id)+ expect(ids).to include(expired_card.prefixed_id)endit 'shows correct expired state' doget :index- expired_data = json_response['data'].find { |c| c['id'] == expired_card.prefix_id }+ expired_data = json_response['data'].find { |c| c['id'] == expired_card.prefixed_id }expect(expired_data['expired']).to be trueexpect(expired_data['active']).to be falseexpect(expired_data['state']).to eq('expired')@@ -109,7 +109,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::GiftCardsController, type: :contit 'shows correct state and amounts' doget :index- partial_data = json_response['data'].find { |c| c['id'] == partial_card.prefix_id }+ partial_data = json_response['data'].find { |c| c['id'] == partial_card.prefixed_id }expect(partial_data['state']).to eq('partially_redeemed')expect(partial_data['amount_remaining']).to eq(30.0)end@@ -128,14 +128,14 @@ RSpec.describe Spree::Api::V3::Store::Customer::GiftCardsController, type: :contdescribe 'GET #show' doit 'returns the gift card' do- get :show, params: { id: gift_card.prefix_id }+ get :show, params: { id: gift_card.prefixed_id }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(gift_card.prefix_id)+ expect(json_response['id']).to eq(gift_card.prefixed_id)endit 'returns gift card with all attributes' do- get :show, params: { id: gift_card.prefix_id }+ get :show, params: { id: gift_card.prefixed_id }expect(json_response['code']).to eq(gift_card.display_code)expect(json_response['amount']).to eq(100.0)@@ -149,7 +149,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::GiftCardsController, type: :contlet(:other_card) { create(:gift_card, user: other_user, store: store) }it 'returns not found' do- get :show, params: { id: other_card.prefix_id }+ get :show, params: { id: other_card.prefixed_id }expect(response).to have_http_status(:not_found)end@@ -160,7 +160,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::GiftCardsController, type: :contlet(:other_store_card) { create(:gift_card, user: user, store: other_store) }it 'returns not found' do- get :show, params: { id: other_store_card.prefix_id }+ get :show, params: { id: other_store_card.prefixed_id }expect(response).to have_http_status(:not_found)end@@ -170,7 +170,7 @@ RSpec.describe Spree::Api::V3::Store::Customer::GiftCardsController, type: :contbefore { request.headers['Authorization'] = nil }it 'returns unauthorized' do- get :show, params: { id: gift_card.prefix_id }+ get :show, params: { id: gift_card.prefixed_id }expect(response).to have_http_status(:unauthorized)enddiff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/orders/line_items_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/orders/line_items_controller_spec.rbindex 58f86a045d..4f07b64bab 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/orders/line_items_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/orders/line_items_controller_spec.rb@@ -18,23 +18,23 @@ RSpec.describe Spree::Api::V3::Store::Orders::LineItemsController, type: :controdescribe 'POST #create' doit 'adds a line item to the order' doexpect do- post :create, params: { order_id: order.to_param, variant_id: variant.prefix_id, quantity: 2 }+ post :create, params: { order_id: order.to_param, variant_id: variant.prefixed_id, quantity: 2 }end.to change(Spree::LineItem, :count).by(1)expect(response).to have_http_status(:created)- expect(json_response['variant_id']).to eq(variant.prefix_id)+ expect(json_response['variant_id']).to eq(variant.prefixed_id)expect(json_response['quantity']).to eq(2)endit 'defaults quantity to 1' do- post :create, params: { order_id: order.to_param, variant_id: variant.prefix_id }+ post :create, params: { order_id: order.to_param, variant_id: variant.prefixed_id }expect(response).to have_http_status(:created)expect(json_response['quantity']).to eq(1)endit 'updates order totals' do- post :create, params: { order_id: order.to_param, variant_id: variant.prefix_id, quantity: 2 }+ post :create, params: { order_id: order.to_param, variant_id: variant.prefixed_id, quantity: 2 }expect(order.reload.item_total).to be > 0end@@ -46,13 +46,13 @@ RSpec.describe Spree::Api::V3::Store::Orders::LineItemsController, type: :controit 'adds line item with valid order token' dorequest.headers['X-Spree-Order-Token'] = guest_order.token- post :create, params: { order_id: guest_order.to_param, variant_id: variant.prefix_id, quantity: 1 }+ post :create, params: { order_id: guest_order.to_param, variant_id: variant.prefixed_id, quantity: 1 }expect(response).to have_http_status(:created)endit 'returns forbidden without order token' do- post :create, params: { order_id: guest_order.to_param, variant_id: variant.prefix_id, quantity: 1 }+ post :create, params: { order_id: guest_order.to_param, variant_id: variant.prefixed_id, quantity: 1 }expect(response).to have_http_status(:forbidden)expect(json_response['error']['code']).to eq('access_denied')@@ -72,7 +72,7 @@ RSpec.describe Spree::Api::V3::Store::Orders::LineItemsController, type: :controcontext 'error handling' doit 'returns not found for non-existent order' do- post :create, params: { order_id: 'invalid', variant_id: variant.prefix_id, quantity: 1 }+ post :create, params: { order_id: 'invalid', variant_id: variant.prefixed_id, quantity: 1 }expect(response).to have_http_status(:not_found)expect(json_response['error']['code']).to eq('order_not_found')@@ -82,7 +82,7 @@ RSpec.describe Spree::Api::V3::Store::Orders::LineItemsController, type: :controit 'returns forbidden for other users order' doother_order = create(:order, store: store)- post :create, params: { order_id: other_order.to_param, variant_id: variant.prefix_id, quantity: 1 }+ post :create, params: { order_id: other_order.to_param, variant_id: variant.prefixed_id, quantity: 1 }expect(response).to have_http_status(:forbidden)expect(json_response['error']['code']).to eq('access_denied')@@ -94,7 +94,7 @@ RSpec.describe Spree::Api::V3::Store::Orders::LineItemsController, type: :controlet!(:line_item) { create(:line_item, order: order, variant: variant, quantity: 1) }it 'updates line item quantity' do- patch :update, params: { order_id: order.to_param, id: line_item.prefix_id, quantity: 5 }+ patch :update, params: { order_id: order.to_param, id: line_item.prefixed_id, quantity: 5 }expect(response).to have_http_status(:ok)expect(line_item.reload.quantity).to eq(5)@@ -102,7 +102,7 @@ RSpec.describe Spree::Api::V3::Store::Orders::LineItemsController, type: :controit 'updates order totals' dooriginal_total = order.item_total- patch :update, params: { order_id: order.to_param, id: line_item.prefix_id, quantity: 5 }+ patch :update, params: { order_id: order.to_param, id: line_item.prefixed_id, quantity: 5 }expect(order.reload.item_total).to be > original_totalend@@ -120,7 +120,7 @@ RSpec.describe Spree::Api::V3::Store::Orders::LineItemsController, type: :controother_order = create(:order, store: store)other_line_item = create(:line_item, order: other_order, variant: variant)- patch :update, params: { order_id: other_order.to_param, id: other_line_item.prefix_id, quantity: 5 }+ patch :update, params: { order_id: other_order.to_param, id: other_line_item.prefixed_id, quantity: 5 }expect(response).to have_http_status(:forbidden)expect(json_response['error']['code']).to eq('access_denied')@@ -133,7 +133,7 @@ RSpec.describe Spree::Api::V3::Store::Orders::LineItemsController, type: :controit 'removes line item from order' doexpect do- delete :destroy, params: { order_id: order.to_param, id: line_item.prefix_id }+ delete :destroy, params: { order_id: order.to_param, id: line_item.prefixed_id }end.to change(Spree::LineItem, :count).by(-1)expect(response).to have_http_status(:no_content)@@ -141,7 +141,7 @@ RSpec.describe Spree::Api::V3::Store::Orders::LineItemsController, type: :controit 'updates order totals' doorder.update_columns(item_total: 100)- delete :destroy, params: { order_id: order.to_param, id: line_item.prefix_id }+ delete :destroy, params: { order_id: order.to_param, id: line_item.prefixed_id }expect(order.reload.item_total).to eq(0)end@@ -159,7 +159,7 @@ RSpec.describe Spree::Api::V3::Store::Orders::LineItemsController, type: :controother_order = create(:order, store: store)other_line_item = create(:line_item, order: other_order, variant: variant)- delete :destroy, params: { order_id: other_order.to_param, id: other_line_item.prefix_id }+ delete :destroy, params: { order_id: other_order.to_param, id: other_line_item.prefixed_id }expect(response).to have_http_status(:forbidden)expect(json_response['error']['code']).to eq('access_denied')diff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/orders/payment_methods_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/orders/payment_methods_controller_spec.rbindex 5392e2194c..5b2c2ab45f 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/orders/payment_methods_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/orders/payment_methods_controller_spec.rb@@ -19,13 +19,13 @@ RSpec.describe Spree::Api::V3::Store::Orders::PaymentMethodsController, type: :cget :index, params: { order_id: order.to_param }expect(response).to have_http_status(:ok)- expect(json_response['data'].map { |pm| pm['id'] }).to include(payment_method.prefix_id)+ expect(json_response['data'].map { |pm| pm['id'] }).to include(payment_method.prefixed_id)endit 'excludes backend-only payment methods' doget :index, params: { order_id: order.to_param }- expect(json_response['data'].map { |pm| pm['id'] }).not_to include(backend_only_pm.prefix_id)+ expect(json_response['data'].map { |pm| pm['id'] }).not_to include(backend_only_pm.prefixed_id)endit 'includes payment method count in meta' dodiff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/orders/payments_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/orders/payments_controller_spec.rbindex 0940eec3fb..79bb593b12 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/orders/payments_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/orders/payments_controller_spec.rb@@ -20,13 +20,13 @@ RSpec.describe Spree::Api::V3::Store::Orders::PaymentsController, type: :controlexpect(response).to have_http_status(:ok)expect(json_response['data'].size).to eq(1)- expect(json_response['data'].first['id']).to eq(payment.prefix_id)+ expect(json_response['data'].first['id']).to eq(payment.prefixed_id)endit 'includes payment method information' doget :index, params: { order_id: order.to_param }- expect(json_response['data'].first['payment_method_id']).to eq(payment_method.prefix_id)+ expect(json_response['data'].first['payment_method_id']).to eq(payment_method.prefixed_id)endcontext 'with order token (guest)' do@@ -75,7 +75,7 @@ RSpec.describe Spree::Api::V3::Store::Orders::PaymentsController, type: :controlget :show, params: { order_id: order.to_param, id: payment.to_param }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(payment.prefix_id)+ expect(json_response['id']).to eq(payment.prefixed_id)expect(json_response['state']).to eq(payment.state)expect(json_response['amount']).to eq(payment.amount.to_s)enddiff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/orders/shipments_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/orders/shipments_controller_spec.rbindex f8c089e0a1..b9eda2635c 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/orders/shipments_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/orders/shipments_controller_spec.rb@@ -26,7 +26,7 @@ RSpec.describe Spree::Api::V3::Store::Orders::ShipmentsController, type: :controexpect(response).to have_http_status(:ok)expect(json_response['data'].size).to eq(order.shipments.count)- expect(json_response['data'].first['id']).to eq(shipment.prefix_id)+ expect(json_response['data'].first['id']).to eq(shipment.prefixed_id)endcontext 'with order token (guest)' do@@ -81,7 +81,7 @@ RSpec.describe Spree::Api::V3::Store::Orders::ShipmentsController, type: :controget :show, params: { order_id: order.to_param, id: shipment.to_param }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(shipment.prefix_id)+ expect(json_response['id']).to eq(shipment.prefixed_id)expect(json_response['state']).to eq(shipment.state)enddiff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/orders/store_credits_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/orders/store_credits_controller_spec.rbindex 8787cbbc1b..aec1ef4a5d 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/orders/store_credits_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/orders/store_credits_controller_spec.rb@@ -25,7 +25,7 @@ RSpec.describe Spree::Api::V3::Store::Orders::StoreCreditsController, type: :conit 'returns the updated order' dopost :create, params: { order_id: order.to_param, amount: 10 }- expect(json_response['id']).to eq(order.prefix_id)+ expect(json_response['id']).to eq(order.prefixed_id)endcontext 'without available store credit' do@@ -79,7 +79,7 @@ RSpec.describe Spree::Api::V3::Store::Orders::StoreCreditsController, type: :condelete :destroy, params: { order_id: order.to_param }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(order.prefix_id)+ expect(json_response['id']).to eq(order.prefixed_id)endcontext 'authentication' dodiff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/orders_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/orders_controller_spec.rbindex a6a9211445..0de0eae618 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/orders_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/orders_controller_spec.rb@@ -113,7 +113,7 @@ RSpec.describe Spree::Api::V3::Store::OrdersController, type: :controller doit 'returns order with expected attributes' doget :show, params: { id: order.to_param }- expect(json_response['id']).to eq(order.prefix_id)+ expect(json_response['id']).to eq(order.prefixed_id)expect(json_response['number']).to eq(order.number)endenddiff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/products/filters_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/products/filters_controller_spec.rbindex 4869941670..e7d6ca2296 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/products/filters_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/products/filters_controller_spec.rb@@ -109,13 +109,13 @@ RSpec.describe Spree::Api::V3::Store::Products::FiltersController, type: :controcontext 'with taxon_id parameter' doit 'scopes filters to taxon' do- get :index, params: { taxon_id: child_taxon1.prefix_id }+ get :index, params: { taxon_id: child_taxon1.prefixed_id }expect(json_response['total_count']).to eq(2) # Only products in child_taxon1endit 'returns child taxons as filter options' do- get :index, params: { taxon_id: taxon.prefix_id }+ get :index, params: { taxon_id: taxon.prefixed_id }taxon_filter = json_response['filters'].find { |f| f['type'] == 'taxon' }expect(taxon_filter).to be_present@@ -127,7 +127,7 @@ RSpec.describe Spree::Api::V3::Store::Products::FiltersController, type: :controit 'returns default_sort from taxon' dotaxon.update!(sort_order: 'price-low-to-high')- get :index, params: { taxon_id: taxon.prefix_id }+ get :index, params: { taxon_id: taxon.prefixed_id }expect(json_response['default_sort']).to eq('price-low-to-high')enddiff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/products_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/products_controller_spec.rbindex 05de1992c8..70b9780d12 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/products_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/products_controller_spec.rb@@ -58,7 +58,7 @@ RSpec.describe Spree::Api::V3::Store::ProductsController, type: :controller doget :indexids = json_response['data'].map { |p| p['id'] }- expect(ids).not_to include(other_store_product.prefix_id)+ expect(ids).not_to include(other_store_product.prefixed_id)endend@@ -67,7 +67,7 @@ RSpec.describe Spree::Api::V3::Store::ProductsController, type: :controller doget :indexids = json_response['data'].map { |p| p['id'] }- expect(ids).not_to include(draft_product.prefix_id)+ expect(ids).not_to include(draft_product.prefixed_id)endend@@ -89,9 +89,9 @@ RSpec.describe Spree::Api::V3::Store::ProductsController, type: :controller doget :indexids = json_response['data'].map { |p| p['id'] }- expect(ids).to include(product.prefix_id)- expect(ids).to include(product2.prefix_id)- expect(ids).not_to include(eur_only_product.prefix_id)+ expect(ids).to include(product.prefixed_id)+ expect(ids).to include(product2.prefixed_id)+ expect(ids).not_to include(eur_only_product.prefixed_id)endit 'returns EUR products when EUR currency is requested' do@@ -99,8 +99,8 @@ RSpec.describe Spree::Api::V3::Store::ProductsController, type: :controller doget :indexids = json_response['data'].map { |p| p['id'] }- expect(ids).to include(eur_only_product.prefix_id)- expect(ids).not_to include(product.prefix_id)+ expect(ids).to include(eur_only_product.prefixed_id)+ expect(ids).not_to include(product.prefixed_id)endend@@ -110,7 +110,7 @@ RSpec.describe Spree::Api::V3::Store::ProductsController, type: :controller doexpect(response).to have_http_status(:ok)expect(json_response['data'].size).to eq(1)- expect(json_response['data'].first['id']).to eq(product.prefix_id)+ expect(json_response['data'].first['id']).to eq(product.prefixed_id)endend@@ -184,7 +184,7 @@ RSpec.describe Spree::Api::V3::Store::ProductsController, type: :controller doget :show, params: { id: product.slug }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(product.prefix_id)+ expect(json_response['id']).to eq(product.prefixed_id)expect(json_response['name']).to eq(product.name)expect(json_response['slug']).to eq(product.slug)end@@ -192,10 +192,10 @@ RSpec.describe Spree::Api::V3::Store::ProductsController, type: :controller docontext 'finding by prefix_id' doit 'returns a product by prefix_id' do- get :show, params: { id: product.prefix_id }+ get :show, params: { id: product.prefixed_id }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(product.prefix_id)+ expect(json_response['id']).to eq(product.prefixed_id)expect(json_response['name']).to eq(product.name)expect(json_response['slug']).to eq(product.slug)end@@ -237,7 +237,7 @@ RSpec.describe Spree::Api::V3::Store::ProductsController, type: :controller doit 'returns translated content based on locale header' dorequest.headers['x-spree-locale'] = 'fr'- get :show, params: { id: translated_product.prefix_id }+ get :show, params: { id: translated_product.prefixed_id }expect(response).to have_http_status(:ok)expect(json_response['name']).to eq('Produit Français')@@ -260,7 +260,7 @@ RSpec.describe Spree::Api::V3::Store::ProductsController, type: :controller doget :show, params: { id: 'english-only' }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(english_only_product.prefix_id)+ expect(json_response['id']).to eq(english_only_product.prefixed_id)# Name returns English since no French translation existsexpect(json_response['name']).to eq('English Only')end@@ -270,7 +270,7 @@ RSpec.describe Spree::Api::V3::Store::ProductsController, type: :controller doget :show, params: { id: 'english-product' }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(translated_product.prefix_id)+ expect(json_response['id']).to eq(translated_product.prefixed_id)expect(json_response['name']).to eq('Produit Français')endenddiff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/stores_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/stores_controller_spec.rbindex f8109e4537..d0f1174e61 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/stores_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/stores_controller_spec.rb@@ -14,7 +14,7 @@ RSpec.describe Spree::Api::V3::Store::StoresController, type: :controller doget :currentexpect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(store.prefix_id)+ expect(json_response['id']).to eq(store.prefixed_id)endit 'returns store attributes' dodiff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/taxonomies_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/taxonomies_controller_spec.rbindex 226d1d22a0..5021c49aec 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/taxonomies_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/taxonomies_controller_spec.rb@@ -33,7 +33,7 @@ RSpec.describe Spree::Api::V3::Store::TaxonomiesController, type: :controller doget :indexids = json_response['data'].map { |t| t['id'] }- expect(ids).not_to include(other_store_taxonomy.prefix_id)+ expect(ids).not_to include(other_store_taxonomy.prefixed_id)endit 'returns pagination metadata' do@@ -57,24 +57,24 @@ RSpec.describe Spree::Api::V3::Store::TaxonomiesController, type: :controller dodescribe 'GET #show' doit 'returns the taxonomy' do- get :show, params: { id: taxonomy.prefix_id }+ get :show, params: { id: taxonomy.prefixed_id }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(taxonomy.prefix_id)+ expect(json_response['id']).to eq(taxonomy.prefixed_id)expect(json_response['name']).to eq(taxonomy.name)endit 'returns taxonomy with its attributes' do- get :show, params: { id: taxonomy.prefix_id }+ get :show, params: { id: taxonomy.prefixed_id }- expect(json_response['id']).to eq(taxonomy.prefix_id)+ expect(json_response['id']).to eq(taxonomy.prefixed_id)expect(json_response['name']).to be_presentendit 'returns root_id for quick access to root taxon' do- get :show, params: { id: taxonomy.prefix_id }+ get :show, params: { id: taxonomy.prefixed_id }- expect(json_response['root_id']).to eq(taxonomy.root.prefix_id)+ expect(json_response['root_id']).to eq(taxonomy.root.prefixed_id)endcontext 'error handling' do@@ -87,7 +87,7 @@ RSpec.describe Spree::Api::V3::Store::TaxonomiesController, type: :controller doendit 'returns not found for taxonomy from another store' do- get :show, params: { id: other_store_taxonomy.prefix_id }+ get :show, params: { id: other_store_taxonomy.prefixed_id }expect(response).to have_http_status(:not_found)expect(json_response['error']['code']).to eq('record_not_found')diff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/taxons/products_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/taxons/products_controller_spec.rbindex f5ba0ae148..21a5f984ff 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/taxons/products_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/taxons/products_controller_spec.rb@@ -27,8 +27,8 @@ RSpec.describe Spree::Api::V3::Store::Taxons::ProductsController, type: :controlget :index, params: { taxon_id: taxon.permalink }expect(response).to have_http_status(:ok)- expect(json_response['data'].pluck('id')).to include(product_in_taxon.prefix_id)- expect(json_response['data'].pluck('id')).not_to include(product_not_in_taxon.prefix_id)+ expect(json_response['data'].pluck('id')).to include(product_in_taxon.prefixed_id)+ expect(json_response['data'].pluck('id')).not_to include(product_not_in_taxon.prefixed_id)endit 'returns products from descendant taxons' do@@ -36,25 +36,25 @@ RSpec.describe Spree::Api::V3::Store::Taxons::ProductsController, type: :controlexpect(response).to have_http_status(:ok)# Parent taxon should include products from child taxons- expect(json_response['data'].pluck('id')).to include(product_in_taxon.prefix_id)- expect(json_response['data'].pluck('id')).to include(product_in_child_taxon.prefix_id)+ expect(json_response['data'].pluck('id')).to include(product_in_taxon.prefixed_id)+ expect(json_response['data'].pluck('id')).to include(product_in_child_taxon.prefixed_id)endit 'returns only products from the specific child taxon when queried directly' doget :index, params: { taxon_id: child_taxon.permalink }expect(response).to have_http_status(:ok)- expect(json_response['data'].pluck('id')).to include(product_in_child_taxon.prefix_id)- expect(json_response['data'].pluck('id')).not_to include(product_in_taxon.prefix_id)+ expect(json_response['data'].pluck('id')).to include(product_in_child_taxon.prefixed_id)+ expect(json_response['data'].pluck('id')).not_to include(product_in_taxon.prefixed_id)endendcontext 'finding taxon by prefix_id' doit 'returns products belonging to the taxon' do- get :index, params: { taxon_id: taxon.prefix_id }+ get :index, params: { taxon_id: taxon.prefixed_id }expect(response).to have_http_status(:ok)- expect(json_response['data'].pluck('id')).to include(product_in_taxon.prefix_id)+ expect(json_response['data'].pluck('id')).to include(product_in_taxon.prefixed_id)endenddiff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/taxons_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/taxons_controller_spec.rbindex f02e01896d..23944492db 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/taxons_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/taxons_controller_spec.rb@@ -26,8 +26,8 @@ RSpec.describe Spree::Api::V3::Store::TaxonsController, type: :controller doget :indexexpect(response).to have_http_status(:ok)- expect(json_response['data'].pluck('id')).to include(taxon.prefix_id, child_taxon.prefix_id)- expect(json_response['data'].pluck('id')).not_to include(other_store_taxon.prefix_id)+ expect(json_response['data'].pluck('id')).to include(taxon.prefixed_id, child_taxon.prefixed_id)+ expect(json_response['data'].pluck('id')).not_to include(other_store_taxon.prefixed_id)endit 'returns pagination metadata' do@@ -39,7 +39,7 @@ RSpec.describe Spree::Api::V3::Store::TaxonsController, type: :controller doit 'returns taxon attributes' doget :index- taxon_data = json_response['data'].find { |t| t['id'] == taxon.prefix_id }+ taxon_data = json_response['data'].find { |t| t['id'] == taxon.prefixed_id }expect(taxon_data).to include('name', 'permalink', 'position', 'depth')expect(taxon_data).to include('taxonomy_id', 'parent_id', 'children_count')expect(taxon_data).not_to include('lft', 'rgt')@@ -51,7 +51,7 @@ RSpec.describe Spree::Api::V3::Store::TaxonsController, type: :controller doit 'returns image URLs' doget :index- taxon_data = json_response['data'].find { |t| t['id'] == taxon_with_image.prefix_id }+ taxon_data = json_response['data'].find { |t| t['id'] == taxon_with_image.prefixed_id }expect(taxon_data['image_url']).to be_presentendend@@ -64,22 +64,22 @@ RSpec.describe Spree::Api::V3::Store::TaxonsController, type: :controller doget :index, params: { q: { taxonomy_id_eq: taxonomy.id } }ids = json_response['data'].pluck('id')- expect(ids).to include(taxon.prefix_id)- expect(ids).not_to include(other_taxon.prefix_id)+ expect(ids).to include(taxon.prefixed_id)+ expect(ids).not_to include(other_taxon.prefixed_id)endit 'filters by depth' doget :index, params: { q: { depth_eq: grandchild_taxon.depth } }ids = json_response['data'].pluck('id')- expect(ids).to include(grandchild_taxon.prefix_id)+ expect(ids).to include(grandchild_taxon.prefixed_id)endit 'filters by parent_id' doget :index, params: { q: { parent_id_eq: child_taxon.id } }ids = json_response['data'].pluck('id')- expect(ids).to include(grandchild_taxon.prefix_id)+ expect(ids).to include(grandchild_taxon.prefixed_id)endend@@ -100,7 +100,7 @@ RSpec.describe Spree::Api::V3::Store::TaxonsController, type: :controller doget :show, params: { id: taxon.permalink }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(taxon.prefix_id)+ expect(json_response['id']).to eq(taxon.prefixed_id)expect(json_response['name']).to eq(taxon.name)expect(json_response['permalink']).to eq(taxon.permalink)end@@ -109,17 +109,17 @@ RSpec.describe Spree::Api::V3::Store::TaxonsController, type: :controller doget :show, params: { id: child_taxon.permalink }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(child_taxon.prefix_id)+ expect(json_response['id']).to eq(child_taxon.prefixed_id)expect(json_response['name']).to eq(child_taxon.name)endendcontext 'finding by prefix_id' doit 'returns the taxon by prefix_id' do- get :show, params: { id: taxon.prefix_id }+ get :show, params: { id: taxon.prefixed_id }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(taxon.prefix_id)+ expect(json_response['id']).to eq(taxon.prefixed_id)expect(json_response['name']).to eq(taxon.name)expect(json_response['permalink']).to eq(taxon.permalink)end@@ -135,29 +135,29 @@ RSpec.describe Spree::Api::V3::Store::TaxonsController, type: :controller doget :show, params: { id: child_taxon.permalink }expect(response).to have_http_status(:ok)- expect(json_response['parent_id']).to eq(taxon.prefix_id)+ expect(json_response['parent_id']).to eq(taxon.prefixed_id)endit 'does not include lft and rgt in store API' do- get :show, params: { id: taxon.prefix_id }+ get :show, params: { id: taxon.prefixed_id }expect(json_response).not_to include('lft', 'rgt')endcontext 'with includes=ancestors' doit 'returns ancestors for breadcrumbs' do- get :show, params: { id: grandchild_taxon.prefix_id, includes: 'ancestors' }+ get :show, params: { id: grandchild_taxon.prefixed_id, includes: 'ancestors' }expect(response).to have_http_status(:ok)expect(json_response['ancestors']).to be_an(Array)ancestor_ids = json_response['ancestors'].pluck('id')- expect(ancestor_ids).to include(taxon.prefix_id, child_taxon.prefix_id)+ expect(ancestor_ids).to include(taxon.prefixed_id, child_taxon.prefixed_id)endit 'returns empty ancestors for root taxon' doroot_taxon = taxonomy.root- get :show, params: { id: root_taxon.prefix_id, includes: 'ancestors' }+ get :show, params: { id: root_taxon.prefixed_id, includes: 'ancestors' }expect(response).to have_http_status(:ok)expect(json_response['ancestors']).to eq([])@@ -166,11 +166,11 @@ RSpec.describe Spree::Api::V3::Store::TaxonsController, type: :controller docontext 'with includes=children' doit 'returns children' do- get :show, params: { id: taxon.prefix_id, includes: 'children' }+ get :show, params: { id: taxon.prefixed_id, includes: 'children' }expect(response).to have_http_status(:ok)expect(json_response['children']).to be_an(Array)- expect(json_response['children'].pluck('id')).to include(child_taxon.prefix_id)+ expect(json_response['children'].pluck('id')).to include(child_taxon.prefixed_id)endend@@ -211,7 +211,7 @@ RSpec.describe Spree::Api::V3::Store::TaxonsController, type: :controller doit 'returns translated content based on locale header' dorequest.headers['x-spree-locale'] = 'fr'- get :show, params: { id: translated_taxon.prefix_id }+ get :show, params: { id: translated_taxon.prefixed_id }expect(response).to have_http_status(:ok)expect(json_response['name']).to eq('Vêtements')@@ -234,7 +234,7 @@ RSpec.describe Spree::Api::V3::Store::TaxonsController, type: :controller doget :show, params: { id: english_only_taxon.permalink }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(english_only_taxon.prefix_id)+ expect(json_response['id']).to eq(english_only_taxon.prefixed_id)# Name returns English since no French translation existsexpect(json_response['name']).to eq('Electronics')end@@ -244,7 +244,7 @@ RSpec.describe Spree::Api::V3::Store::TaxonsController, type: :controller doget :show, params: { id: translated_taxon.permalink }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(translated_taxon.prefix_id)+ expect(json_response['id']).to eq(translated_taxon.prefixed_id)expect(json_response['name']).to eq('Vêtements')endend@@ -296,7 +296,7 @@ RSpec.describe Spree::Api::V3::Store::TaxonsController, type: :controller doit 'sets locale from header' dorequest.headers['x-spree-locale'] = 'fr'- get :show, params: { id: taxon.prefix_id }+ get :show, params: { id: taxon.prefixed_id }expect(response).to have_http_status(:ok)expect(I18n.locale).to eq(:fr)@@ -304,7 +304,7 @@ RSpec.describe Spree::Api::V3::Store::TaxonsController, type: :controller doit 'falls back to default locale for unsupported locale' dorequest.headers['x-spree-locale'] = 'de'- get :show, params: { id: taxon.prefix_id }+ get :show, params: { id: taxon.prefixed_id }expect(response).to have_http_status(:ok)expect(I18n.locale).to eq(:en)diff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/wishlist_items_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/wishlist_items_controller_spec.rbindex 074ca990a1..6dd4157e0f 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/wishlist_items_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/wishlist_items_controller_spec.rb@@ -21,17 +21,17 @@ RSpec.describe Spree::Api::V3::Store::WishlistItemsController, type: :controllerit 'adds item to wishlist' doexpect {- post :create, params: { wishlist_id: wishlist.prefix_id, variant_id: new_variant.prefix_id, quantity: 3 }+ post :create, params: { wishlist_id: wishlist.prefixed_id, variant_id: new_variant.prefixed_id, quantity: 3 }}.to change(Spree::WishedItem, :count).by(1)expect(response).to have_http_status(:created)- expect(json_response['variant_id']).to eq(new_variant.prefix_id)+ expect(json_response['variant_id']).to eq(new_variant.prefixed_id)expect(json_response['quantity']).to eq(3)endcontext 'validation errors' doit 'returns errors for missing variant_id' do- post :create, params: { wishlist_id: wishlist.prefix_id, quantity: 1 }+ post :create, params: { wishlist_id: wishlist.prefixed_id, quantity: 1 }expect(response).to have_http_status(:unprocessable_entity)expect(json_response['error']['code']).to eq('validation_error')@@ -39,7 +39,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistItemsController, type: :controllerendit 'returns errors for invalid variant_id' do- post :create, params: { wishlist_id: wishlist.prefix_id, variant_id: 0, quantity: 1 }+ post :create, params: { wishlist_id: wishlist.prefixed_id, variant_id: 0, quantity: 1 }expect(response).to have_http_status(:unprocessable_entity)expect(json_response['error']['code']).to eq('validation_error')@@ -52,7 +52,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistItemsController, type: :controllerother_user = create(:user)other_wishlist = create(:wishlist, user: other_user, store: store)- post :create, params: { wishlist_id: other_wishlist.prefix_id, variant_id: new_variant.prefix_id, quantity: 1 }+ post :create, params: { wishlist_id: other_wishlist.prefixed_id, variant_id: new_variant.prefixed_id, quantity: 1 }expect(response).to have_http_status(:not_found)expect(json_response['error']['code']).to eq('record_not_found')@@ -60,7 +60,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistItemsController, type: :controllerendit 'returns not found for non-existent wishlist' do- post :create, params: { wishlist_id: 0, variant_id: new_variant.prefix_id, quantity: 1 }+ post :create, params: { wishlist_id: 0, variant_id: new_variant.prefixed_id, quantity: 1 }expect(response).to have_http_status(:not_found)expect(json_response['error']['code']).to eq('record_not_found')@@ -71,7 +71,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistItemsController, type: :controllerbefore { request.headers['Authorization'] = nil }it 'returns unauthorized' do- post :create, params: { wishlist_id: wishlist.prefix_id, variant_id: new_variant.prefix_id, quantity: 1 }+ post :create, params: { wishlist_id: wishlist.prefixed_id, variant_id: new_variant.prefixed_id, quantity: 1 }expect(response).to have_http_status(:unauthorized)expect(json_response['error']['code']).to eq('authentication_required')@@ -82,7 +82,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistItemsController, type: :controllerdescribe 'PATCH #update' doit 'updates wished item quantity' do- patch :update, params: { wishlist_id: wishlist.prefix_id, id: wished_item.prefix_id, quantity: 5 }+ patch :update, params: { wishlist_id: wishlist.prefixed_id, id: wished_item.prefixed_id, quantity: 5 }expect(response).to have_http_status(:ok)expect(wished_item.reload.quantity).to eq(5)@@ -90,7 +90,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistItemsController, type: :controllercontext 'validation errors' doit 'returns errors for invalid quantity' do- patch :update, params: { wishlist_id: wishlist.prefix_id, id: wished_item.prefix_id, quantity: 0 }+ patch :update, params: { wishlist_id: wishlist.prefixed_id, id: wished_item.prefixed_id, quantity: 0 }expect(response).to have_http_status(:unprocessable_entity)expect(json_response['error']['code']).to eq('validation_error')@@ -100,7 +100,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistItemsController, type: :controllercontext 'error handling' doit 'returns not found for non-existent item' do- patch :update, params: { wishlist_id: wishlist.prefix_id, id: 0, quantity: 5 }+ patch :update, params: { wishlist_id: wishlist.prefixed_id, id: 0, quantity: 5 }expect(response).to have_http_status(:not_found)expect(json_response['error']['code']).to eq('record_not_found')@@ -112,7 +112,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistItemsController, type: :controllerother_wishlist = create(:wishlist, user: other_user, store: store)other_item = create(:wished_item, wishlist: other_wishlist, variant: variant)- patch :update, params: { wishlist_id: other_wishlist.prefix_id, id: other_item.prefix_id, quantity: 5 }+ patch :update, params: { wishlist_id: other_wishlist.prefixed_id, id: other_item.prefixed_id, quantity: 5 }expect(response).to have_http_status(:not_found)expect(json_response['error']['code']).to eq('record_not_found')@@ -123,7 +123,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistItemsController, type: :controllerdescribe 'DELETE #destroy' doit 'removes item from wishlist' doexpect {- delete :destroy, params: { wishlist_id: wishlist.prefix_id, id: wished_item.prefix_id }+ delete :destroy, params: { wishlist_id: wishlist.prefixed_id, id: wished_item.prefixed_id }}.to change(Spree::WishedItem, :count).by(-1)expect(response).to have_http_status(:no_content)@@ -131,7 +131,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistItemsController, type: :controllercontext 'error handling' doit 'returns not found for non-existent item' do- delete :destroy, params: { wishlist_id: wishlist.prefix_id, id: 0 }+ delete :destroy, params: { wishlist_id: wishlist.prefixed_id, id: 0 }expect(response).to have_http_status(:not_found)expect(json_response['error']['code']).to eq('record_not_found')@@ -143,7 +143,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistItemsController, type: :controllerother_wishlist = create(:wishlist, user: other_user, store: store)other_item = create(:wished_item, wishlist: other_wishlist, variant: variant)- delete :destroy, params: { wishlist_id: other_wishlist.prefix_id, id: other_item.prefix_id }+ delete :destroy, params: { wishlist_id: other_wishlist.prefixed_id, id: other_item.prefixed_id }expect(response).to have_http_status(:not_found)expect(json_response['error']['code']).to eq('record_not_found')diff --git a/backend/engines/api/spec/controllers/spree/api/v3/store/wishlists_controller_spec.rb b/backend/engines/api/spec/controllers/spree/api/v3/store/wishlists_controller_spec.rbindex e515d76ac1..39c62ae2cc 100644--- a/backend/engines/api/spec/controllers/spree/api/v3/store/wishlists_controller_spec.rb+++ b/backend/engines/api/spec/controllers/spree/api/v3/store/wishlists_controller_spec.rb@@ -18,7 +18,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistsController, type: :controller doexpect(response).to have_http_status(:ok)expect(json_response['data'].size).to eq(1)- expect(json_response['data'].first['id']).to eq(wishlist.prefix_id)+ expect(json_response['data'].first['id']).to eq(wishlist.prefixed_id)endit 'does not return other users wishlists' do@@ -28,7 +28,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistsController, type: :controller doget :indexids = json_response['data'].map { |w| w['id'] }- expect(ids).not_to include(other_wishlist.prefix_id)+ expect(ids).not_to include(other_wishlist.prefixed_id)endit 'returns pagination metadata' do@@ -52,10 +52,10 @@ RSpec.describe Spree::Api::V3::Store::WishlistsController, type: :controller dodescribe 'GET #show' doit 'returns the wishlist' do- get :show, params: { id: wishlist.prefix_id }+ get :show, params: { id: wishlist.prefixed_id }expect(response).to have_http_status(:ok)- expect(json_response['id']).to eq(wishlist.prefix_id)+ expect(json_response['id']).to eq(wishlist.prefixed_id)expect(json_response['name']).to eq(wishlist.name)end@@ -72,7 +72,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistsController, type: :controller doother_user = create(:user)other_wishlist = create(:wishlist, user: other_user, store: store)- get :show, params: { id: other_wishlist.prefix_id }+ get :show, params: { id: other_wishlist.prefixed_id }expect(response).to have_http_status(:not_found)expect(json_response['error']['code']).to eq('record_not_found')@@ -127,7 +127,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistsController, type: :controller dodescribe 'PATCH #update' doit 'updates the wishlist name' do- patch :update, params: { id: wishlist.prefix_id, name: 'Updated Name' }+ patch :update, params: { id: wishlist.prefixed_id, name: 'Updated Name' }expect(response).to have_http_status(:ok)expect(wishlist.reload.name).to eq('Updated Name')@@ -135,7 +135,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistsController, type: :controller docontext 'validation errors' doit 'returns errors for blank name' do- patch :update, params: { id: wishlist.prefix_id, name: '' }+ patch :update, params: { id: wishlist.prefixed_id, name: '' }expect(response).to have_http_status(:unprocessable_entity)expect(json_response['error']['code']).to eq('validation_error')@@ -148,7 +148,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistsController, type: :controller doother_user = create(:user)other_wishlist = create(:wishlist, user: other_user, store: store)- patch :update, params: { id: other_wishlist.prefix_id, name: 'Hacked' }+ patch :update, params: { id: other_wishlist.prefixed_id, name: 'Hacked' }expect(response).to have_http_status(:not_found)expect(json_response['error']['code']).to eq('record_not_found')@@ -159,7 +159,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistsController, type: :controller dodescribe 'DELETE #destroy' doit 'deletes the wishlist' doexpect {- delete :destroy, params: { id: wishlist.prefix_id }+ delete :destroy, params: { id: wishlist.prefixed_id }}.to change(Spree::Wishlist, :count).by(-1)expect(response).to have_http_status(:no_content)@@ -178,7 +178,7 @@ RSpec.describe Spree::Api::V3::Store::WishlistsController, type: :controller doother_user = create(:user)other_wishlist = create(:wishlist, user: other_user, store: store)- delete :destroy, params: { id: other_wishlist.prefix_id }+ delete :destroy, params: { id: other_wishlist.prefixed_id }expect(response).to have_http_status(:not_found)expect(json_response['error']['code']).to eq('record_not_found')diff --git a/backend/engines/api/spec/integration/spree/api/v3/store/line_items_spec.rb b/backend/engines/api/spec/integration/spree/api/v3/store/line_items_spec.rbindex e919c2e72f..45eba4f3d9 100644--- a/backend/engines/api/spec/integration/spree/api/v3/store/line_items_spec.rb+++ b/backend/engines/api/spec/integration/spree/api/v3/store/line_items_spec.rb@@ -40,7 +40,7 @@ RSpec.describe 'Line Items API', type: :request, swagger_doc: 'api-reference/stolet(:'x-spree-api-key') { api_key.token }let(:'Authorization') { "Bearer #{jwt_token}" }let(:order_id) { order.to_param }- let(:body) { { variant_id: new_variant.prefix_id, quantity: 2 } }+ let(:body) { { variant_id: new_variant.prefixed_id, quantity: 2 } }schema '$ref' => '#/components/schemas/StoreLineItem'@@ -65,7 +65,7 @@ RSpec.describe 'Line Items API', type: :request, swagger_doc: 'api-reference/stolet(:'x-spree-api-key') { api_key.token }let(:'Authorization') { "Bearer #{jwt_token}" }let(:order_id) { 'non-existent' }- let(:body) { { variant_id: variant.prefix_id, quantity: 1 } }+ let(:body) { { variant_id: variant.prefixed_id, quantity: 1 } }schema '$ref' => '#/components/schemas/ErrorResponse'diff --git a/backend/engines/api/spec/integration/spree/api/v3/store/payment_methods_spec.rb b/backend/engines/api/spec/integration/spree/api/v3/store/payment_methods_spec.rbindex e79394371f..89c1562c25 100644--- a/backend/engines/api/spec/integration/spree/api/v3/store/payment_methods_spec.rb+++ b/backend/engines/api/spec/integration/spree/api/v3/store/payment_methods_spec.rb@@ -41,8 +41,8 @@ RSpec.describe 'Payment Methods API', type: :request, swagger_doc: 'api-referencrun_test! do |response|data = JSON.parse(response.body)# Only frontend-visible payment methods should be returned- expect(data['data'].map { |pm| pm['id'] }).to include(payment_method.prefix_id)- expect(data['data'].map { |pm| pm['id'] }).not_to include(backend_only_pm.prefix_id)+ expect(data['data'].map { |pm| pm['id'] }).to include(payment_method.prefixed_id)+ expect(data['data'].map { |pm| pm['id'] }).not_to include(backend_only_pm.prefixed_id)endenddiff --git a/backend/engines/api/spec/integration/spree/api/v3/store/payments_spec.rb b/backend/engines/api/spec/integration/spree/api/v3/store/payments_spec.rbindex c8c3e2987b..07a32394bd 100644--- a/backend/engines/api/spec/integration/spree/api/v3/store/payments_spec.rb+++ b/backend/engines/api/spec/integration/spree/api/v3/store/payments_spec.rb@@ -37,7 +37,7 @@ RSpec.describe 'Payments API', type: :request, swagger_doc: 'api-reference/storerun_test! do |response|data = JSON.parse(response.body)expect(data['data'].length).to eq(1)- expect(data['data'].first['id']).to eq(payment.prefix_id)+ expect(data['data'].first['id']).to eq(payment.prefixed_id)endend@@ -73,7 +73,7 @@ RSpec.describe 'Payments API', type: :request, swagger_doc: 'api-reference/storerun_test! do |response|data = JSON.parse(response.body)- expect(data['id']).to eq(payment.prefix_id)+ expect(data['id']).to eq(payment.prefixed_id)expect(data['state']).to eq(payment.state)endenddiff --git a/backend/engines/api/spec/integration/spree/api/v3/store/products_spec.rb b/backend/engines/api/spec/integration/spree/api/v3/store/products_spec.rbindex 76dcca9d85..28f4aeede7 100644--- a/backend/engines/api/spec/integration/spree/api/v3/store/products_spec.rb+++ b/backend/engines/api/spec/integration/spree/api/v3/store/products_spec.rb@@ -95,7 +95,7 @@ RSpec.describe 'Products API', type: :request, swagger_doc: 'api-reference/storerun_test! do |response|data = JSON.parse(response.body)- expect(data['id']).to eq(product.prefix_id)+ expect(data['id']).to eq(product.prefixed_id)expect(data['name']).to eq(product.name)expect(data['slug']).to eq(product.slug)end@@ -109,7 +109,7 @@ RSpec.describe 'Products API', type: :request, swagger_doc: 'api-reference/storerun_test! do |response|data = JSON.parse(response.body)- expect(data['id']).to eq(product.prefix_id)+ expect(data['id']).to eq(product.prefixed_id)endend@@ -228,7 +228,7 @@ RSpec.describe 'Products API', type: :request, swagger_doc: 'api-reference/storeresponse '200', 'filters scoped to taxon' dolet(:'x-spree-api-key') { api_key.token }- let(:taxon_id) { taxon.prefix_id }+ let(:taxon_id) { taxon.prefixed_id }schema type: :object,properties: {diff --git a/backend/engines/api/spec/integration/spree/api/v3/store/wishlists_spec.rb b/backend/engines/api/spec/integration/spree/api/v3/store/wishlists_spec.rbindex 13ef6c1d4d..52281cbcbe 100644--- a/backend/engines/api/spec/integration/spree/api/v3/store/wishlists_spec.rb+++ b/backend/engines/api/spec/integration/spree/api/v3/store/wishlists_spec.rb@@ -203,7 +203,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/storlet(:'x-spree-api-key') { api_key.token }let(:'Authorization') { "Bearer #{jwt_token}" }let(:wishlist_id) { wishlist.to_param }- let(:body) { { variant_id: new_variant.prefix_id, quantity: 1 } }+ let(:body) { { variant_id: new_variant.prefixed_id, quantity: 1 } }schema '$ref' => '#/components/schemas/StoreWishedItem'diff --git a/backend/engines/api/spec/serializers/spree/api/v3/line_item_serializer_spec.rb b/backend/engines/api/spec/serializers/spree/api/v3/line_item_serializer_spec.rbindex 7bbc33f128..dee54795af 100644--- a/backend/engines/api/spec/serializers/spree/api/v3/line_item_serializer_spec.rb+++ b/backend/engines/api/spec/serializers/spree/api/v3/line_item_serializer_spec.rb@@ -13,8 +13,8 @@ RSpec.describe Spree::Api::V3::LineItemSerializer dodescribe 'serialized attributes' doit 'includes standard attributes' doexpect(subject).to include(- 'id' => line_item.prefix_id,- 'variant_id' => variant.prefix_id,+ 'id' => line_item.prefixed_id,+ 'variant_id' => variant.prefixed_id,'quantity' => 2,'name' => product.name,'slug' => product.slugdiff --git a/backend/engines/api/spec/serializers/spree/api/v3/price_serializer_spec.rb b/backend/engines/api/spec/serializers/spree/api/v3/price_serializer_spec.rbindex 091448c332..bdf2e0ca76 100644--- a/backend/engines/api/spec/serializers/spree/api/v3/price_serializer_spec.rb+++ b/backend/engines/api/spec/serializers/spree/api/v3/price_serializer_spec.rb@@ -36,7 +36,7 @@ RSpec.describe Spree::Api::V3::PriceSerializer doprice_list = create(:price_list, :active, store: store)price_with_list = create(:price, variant: variant, amount: 14.99, currency: 'USD', price_list: price_list)result = described_class.new(price_with_list, params: base_params).to_h- expect(result['price_list_id']).to eq(price_list.prefix_id)+ expect(result['price_list_id']).to eq(price_list.prefixed_id)endendend@@ -52,7 +52,7 @@ RSpec.describe Spree::Api::V3::Admin::PriceSerializer dosubject { described_class.new(price, params: base_params).to_h }it 'includes admin-only variant_id and timestamps' do- expect(subject['variant_id']).to eq(variant.prefix_id)+ expect(subject['variant_id']).to eq(variant.prefixed_id)expect(subject.keys).to include('created_at', 'updated_at')endenddiff --git a/backend/engines/api/spec/serializers/spree/api/v3/product_serializer_spec.rb b/backend/engines/api/spec/serializers/spree/api/v3/product_serializer_spec.rbindex c9ebe54f93..a77086d583 100644--- a/backend/engines/api/spec/serializers/spree/api/v3/product_serializer_spec.rb+++ b/backend/engines/api/spec/serializers/spree/api/v3/product_serializer_spec.rb@@ -10,10 +10,10 @@ RSpec.describe Spree::Api::V3::ProductSerializer doit 'includes standard attributes' doexpect(subject).to include(- 'id' => product.prefix_id,+ 'id' => product.prefixed_id,'name' => product.name,'slug' => product.slug,- 'default_variant_id' => product.default_variant.prefix_id+ 'default_variant_id' => product.default_variant.prefixed_id)expect(subject).to have_key('thumbnail_url')expect(subject).to have_key('price')diff --git a/backend/engines/api/spec/serializers/spree/api/v3/variant_serializer_spec.rb b/backend/engines/api/spec/serializers/spree/api/v3/variant_serializer_spec.rbindex e5269a77ba..f219c5c6a0 100644--- a/backend/engines/api/spec/serializers/spree/api/v3/variant_serializer_spec.rb+++ b/backend/engines/api/spec/serializers/spree/api/v3/variant_serializer_spec.rb@@ -11,9 +11,9 @@ RSpec.describe Spree::Api::V3::VariantSerializer doit 'includes standard attributes' doexpect(subject).to include(- 'id' => variant.prefix_id,+ 'id' => variant.prefixed_id,'sku' => variant.sku,- 'product_id' => product.prefix_id+ 'product_id' => product.prefixed_id)expect(subject).to have_key('price')enddiff --git a/backend/engines/api/spec/services/spree/api/v3/orders/update_spec.rb b/backend/engines/api/spec/services/spree/api/v3/orders/update_spec.rbindex a9a6e93b26..26f338bac0 100644--- a/backend/engines/api/spec/services/spree/api/v3/orders/update_spec.rb+++ b/backend/engines/api/spec/services/spree/api/v3/orders/update_spec.rb@@ -129,7 +129,7 @@ RSpec.describe Spree::Api::V3::Orders::Update docontext 'with existing address by nested id' dolet(:existing_address) { create(:address, user: user) }- let(:params) { { address_key => { id: existing_address.prefix_id } } }+ let(:params) { { address_key => { id: existing_address.prefixed_id } } }it 'uses the existing address' doexpect(subject).to be_success@@ -139,7 +139,7 @@ RSpec.describe Spree::Api::V3::Orders::Update docontext 'with top-level address_id parameter' dolet(:existing_address) { create(:address, user: user) }- let(:params) { { address_id_key => existing_address.prefix_id } }+ let(:params) { { address_id_key => existing_address.prefixed_id } }it 'uses the existing address' doexpect(subject).to be_success@@ -163,7 +163,7 @@ RSpec.describe Spree::Api::V3::Orders::Update doshared_examples 'ignores other users address' do |address_type|context "when using another user's address for #{address_type}" do- let(:params) { { address_type => { id: other_users_address.prefix_id } } }+ let(:params) { { address_type => { id: other_users_address.prefixed_id } } }it 'ignores the address and keeps original' dooriginal_address_id = order.public_send(:"#{address_type}_id")@@ -174,7 +174,7 @@ RSpec.describe Spree::Api::V3::Orders::Update doendcontext "when using another user's address via #{address_type}_id" do- let(:params) { { :"#{address_type}_id" => other_users_address.prefix_id } }+ let(:params) { { :"#{address_type}_id" => other_users_address.prefixed_id } }it 'ignores the address and keeps original' dooriginal_address_id = order.public_send(:"#{address_type}_id")@@ -190,7 +190,7 @@ RSpec.describe Spree::Api::V3::Orders::Update docontext 'when order has no user (guest order)' dolet(:order) { create(:order_with_line_items, user: nil, store: store) }- let(:params) { { ship_address_id: other_users_address.prefix_id } }+ let(:params) { { ship_address_id: other_users_address.prefixed_id } }it 'ignores address_id params and keeps existing address' dooriginal_address_id = order.ship_address_iddiff --git a/backend/engines/core/app/finders/spree/orders/find_complete.rb b/backend/engines/core/app/finders/spree/orders/find_complete.rbindex efba8063cb..f895cc02d5 100644--- a/backend/engines/core/app/finders/spree/orders/find_complete.rb+++ b/backend/engines/core/app/finders/spree/orders/find_complete.rb@@ -76,15 +76,20 @@ module Spreedef by_prefix_id(orders)return orders unless prefix_id?- orders.where(prefix_id: prefix_id)+ decoded = Spree::Order.decode_prefixed_id(prefix_id)+ orders.where(id: decoded)end- # Find by param - tries prefix_id first, then number for backwards compatibility+ # Find by param - tries prefixed ID first, then number for backwards compatibilitydef by_param(orders)return orders unless param?- # Try prefix_id first, then number- orders.where(prefix_id: param).or(orders.where(number: param))+ decoded = Spree::Order.decode_prefixed_id(param)+ if decoded+ orders.where(id: decoded)+ else+ orders.where(number: param)+ endenddef by_token(orders)diff --git a/backend/engines/core/app/models/concerns/spree/admin_user_methods.rb b/backend/engines/core/app/models/concerns/spree/admin_user_methods.rbindex b60e8e23bd..6d6c7b0018 100644--- a/backend/engines/core/app/models/concerns/spree/admin_user_methods.rb+++ b/backend/engines/core/app/models/concerns/spree/admin_user_methods.rb@@ -2,6 +2,7 @@ module Spreemodule AdminUserMethodsextend ActiveSupport::Concern+ include Spree::PrefixedIdinclude Spree::UserRolesinclude Spree::RansackableAttributesdiff --git a/backend/engines/core/app/models/concerns/spree/number_as_param.rb b/backend/engines/core/app/models/concerns/spree/number_as_param.rbindex f96964d78a..52f7d2e7c1 100644--- a/backend/engines/core/app/models/concerns/spree/number_as_param.rb+++ b/backend/engines/core/app/models/concerns/spree/number_as_param.rb@@ -5,7 +5,7 @@ module Spreeincluded doSpree::Deprecation.warn('Spree::NumberAsParam is deprecated and will be removed in Spree 6.0. ' \- 'Models now use Spree::PrefixedId with prefix_id column instead. ' \+ 'Models now use Spree::PrefixedId with Sqids-based prefixed_id method instead. ' \'This concern no longer provides any functionality and can be safely removed.')enddiff --git a/backend/engines/core/app/models/concerns/spree/prefixed_id.rb b/backend/engines/core/app/models/concerns/spree/prefixed_id.rbindex b3aa4b2367..af948414d1 100644--- a/backend/engines/core/app/models/concerns/spree/prefixed_id.rb+++ b/backend/engines/core/app/models/concerns/spree/prefixed_id.rb@@ -1,95 +1,82 @@# frozen_string_literal: true+require 'sqids'+module Spree- # Adds Stripe-style prefixed IDs to Spree models- # e.g., prod_abc123, order_xyz789, var_def456+ # Adds Stripe-style prefixed IDs to Spree models using Sqids encoding.+ # IDs are computed on the fly from integer primary keys -- no database column needed.+ #+ # e.g., Product with id=12345 -> "prod_86Rf07xd4z"#- # Usage in models:# class Product < Spree.base_class# has_prefix_id :prod# end- #- # This stores a prefix_id column in the database (e.g., "prod_abc123")- # that can be used as the primary identifier in API v3.- #- # The prefix_id is auto-generated on record creation and is immutable.module PrefixedIdextend ActiveSupport::Concern- ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.freeze- ID_LENGTH = 24+ SQIDS = Sqids.new(min_length: 10)included doclass_attribute :_prefix_id_prefix, instance_writer: falseend- # Clear prefix_id when duplicating records so a new one is generated- def initialize_dup(other)- super- self.prefix_id = nil if respond_to?(:prefix_id=)+ # Returns the Stripe-style prefixed ID, or nil for unsaved records.+ def prefixed_id+ return nil unless id.present?++ "#{self.class._prefix_id_prefix}_#{Spree::PrefixedId::SQIDS.encode([id])}"end- # Use prefix_id for URL params when available- # Skip if FriendlyId is used (it has its own to_param using slug)- # Skip if model doesn't have the prefix_id column+ # Use prefixed_id for URL params when available.+ # Skip if FriendlyId is used (it has its own to_param using slug).def to_paramreturn super if self.class.respond_to?(:friendly_id_config)- return super unless self.class.column_names.include?('prefix_id')- prefix_id.presence || super+ return super unless self.class._prefix_id_prefix.present?++ prefixed_id.presence || superendclass_methods dodef has_prefix_id(prefix)self._prefix_id_prefix = prefix.to_s+ end- before_create :generate_prefix_id, if: -> { prefix_id.blank? }-- validates :prefix_id, uniqueness: true, allow_nil: true+ def find_by_prefix_id!(prefixed_id)+ decoded = decode_prefixed_id(prefixed_id)+ raise ActiveRecord::RecordNotFound.new("Couldn't find #{name} with prefixed id=#{prefixed_id}", name) unless decoded- # Class method to find by prefix_id- scope :find_by_prefix_id, ->(id) { find_by(prefix_id: id) }+ find(decoded)end- def find_by_prefix_id!(id)- find_by!(prefix_id: id)+ def find_by_prefix_id(prefixed_id)+ decoded = decode_prefixed_id(prefixed_id)+ return nil unless decoded++ find_by(id: decoded)end- def prefix_id_prefix- _prefix_id_prefix+ # Decode a prefixed ID string (e.g., "prod_86Rf07xd4z") to the integer primary key.+ def decode_prefixed_id(prefixed_id_string)+ return nil if prefixed_id_string.blank?++ parts = prefixed_id_string.to_s.split('_', 2)+ return nil if parts.length != 2++ _prefix, encoded = parts+ ids = Spree::PrefixedId::SQIDS.decode(encoded)+ ids.firstend- # Find a record by prefix_id first, falling back to id for backwards compatibility- # @param param [String] the prefix_id or id to search for- # @return [ActiveRecord::Base, nil] the found record or nil+ # Find by prefixed ID first, falling back to integer id for backwards compatibility.def find_by_param(param)return nil if param.blank?- # Try prefix_id first (new format)- record = find_by(prefix_id: param)- return record if record-- # Fall back to id (legacy format) - only if param looks like an integer- find_by(id: param) if param.to_s.match?(/\A\d+\z/)+ find_by_prefix_id(param) || (find_by(id: param) if param.to_s.match?(/\A\d+\z/))end- # Find a record by prefix_id first, falling back to id for backwards compatibility- # Raises ActiveRecord::RecordNotFound if not found- # @param param [String] the prefix_id or id to search for- # @return [ActiveRecord::Base] the found record- # @raise [ActiveRecord::RecordNotFound] if record not founddef find_by_param!(param)- find_by_param(param) || raise(ActiveRecord::RecordNotFound.new("Couldn't find #{name} with param=#{param}"))+ find_by_param(param) || raise(ActiveRecord::RecordNotFound.new("Couldn't find #{name} with param=#{param}", name))endend-- def generate_prefix_id- self.prefix_id = "#{self.class._prefix_id_prefix}_#{random_id}"- end-- private-- def random_id- Array.new(ID_LENGTH) { ALPHABET[SecureRandom.random_number(ALPHABET.length)] }.join- endendenddiff --git a/backend/engines/core/app/models/concerns/spree/product_scopes.rb b/backend/engines/core/app/models/concerns/spree/product_scopes.rbindex 1576584b64..0d895b6f58 100644--- a/backend/engines/core/app/models/concerns/spree/product_scopes.rb+++ b/backend/engines/core/app/models/concerns/spree/product_scopes.rb@@ -215,9 +215,9 @@ module Spreeids = ids.flatten.compactreturn none if ids.empty?- # Handle prefix IDs (optval_xxx) by extracting the actual IDs+ # Handle prefixed IDs (optval_xxx) by decoding to actual IDsactual_ids = ids.map do |id|- id.to_s.start_with?('optval_') ? OptionValue.find_by(prefix_id: id)&.id : id+ id.to_s.include?('_') ? OptionValue.decode_prefixed_id(id) : idend.compactreturn none if actual_ids.empty?diff --git a/backend/engines/core/app/models/concerns/spree/user_methods.rb b/backend/engines/core/app/models/concerns/spree/user_methods.rbindex a62d3aa068..58459b19b8 100644--- a/backend/engines/core/app/models/concerns/spree/user_methods.rb+++ b/backend/engines/core/app/models/concerns/spree/user_methods.rb@@ -2,6 +2,7 @@ module Spreemodule UserMethodsextend ActiveSupport::Concern+ include Spree::PrefixedIdinclude Spree::Metafieldsinclude Spree::UserPaymentSourceinclude Spree::UserReportingdiff --git a/backend/engines/core/app/models/spree/address.rb b/backend/engines/core/app/models/spree/address.rbindex 9bfb3eb6a0..171c2ec0b1 100644--- a/backend/engines/core/app/models/spree/address.rb+++ b/backend/engines/core/app/models/spree/address.rb@@ -26,7 +26,7 @@ module Spree# we're not freezing this on purpose so developers can extend and manage# those attributes depending of the logic of their applicationsADDRESS_FIELDS = %w(firstname lastname company address1 address2 city state zipcode country phone)- EXCLUDED_KEYS_FOR_COMPARISON = %w(id prefix_id updated_at created_at deleted_at label user_id public_metadata private_metadata)+ EXCLUDED_KEYS_FOR_COMPARISON = %w(id updated_at created_at deleted_at label user_id public_metadata private_metadata)FIELDS_TO_NORMALIZE = %w(firstname lastname phone alternative_phone company address1 address2 city zipcode)if defined?(Spree::Security::Addresses)diff --git a/backend/engines/core/app/models/spree/base.rb b/backend/engines/core/app/models/spree/base.rbindex 416a02a033..f729badec7 100644--- a/backend/engines/core/app/models/spree/base.rb+++ b/backend/engines/core/app/models/spree/base.rb@@ -62,7 +62,7 @@ class Spree::Base < ApplicationRecordenddef self.json_api_permitted_attributes- skipped_attributes = %w[id prefix_id]+ skipped_attributes = %w[id]if included_modules.include?(CollectiveIdea::Acts::NestedSet::Model)skipped_attributes.push('lft', 'rgt', 'depth')diff --git a/backend/engines/core/app/models/spree/order.rb b/backend/engines/core/app/models/spree/order.rbindex 3c464c69ce..0298f4ec0b 100644--- a/backend/engines/core/app/models/spree/order.rb+++ b/backend/engines/core/app/models/spree/order.rb@@ -237,15 +237,18 @@ module Spreeleft_joins(:bill_address).where(arel_table[:email].lower.eq(query.downcase)).or(where(conditions.reduce(:or)))end- # Find an order by prefix_id first, falling back to number, then id for backwards compatibility- # @param param [String] the prefix_id, number, or id to search for+ # Find an order by prefixed ID first, falling back to number, then integer id for backwards compatibility+ # @param param [String] the prefixed ID, number, or integer id to search for# @return [Spree::Order, nil] the found order or nildef self.find_by_param(param)return nil if param.blank?- # Try prefix_id first (new format)- order = find_by(prefix_id: param)- return order if order+ # Try prefixed ID first (new format)+ if param.to_s.include?('_')+ decoded = decode_prefixed_id(param)+ order = find_by(id: decoded) if decoded+ return order if order+ end# Try number (legacy format)order = find_by(number: param)@@ -255,9 +258,9 @@ module Spreefind_by(id: param) if param.to_s.match?(/\A\d+\z/)end- # Find an order by prefix_id first, falling back to number, then id for backwards compatibility+ # Find an order by prefixed ID first, falling back to number, then integer id for backwards compatibility# Raises ActiveRecord::RecordNotFound if not found- # @param param [String] the prefix_id, number, or id to search for+ # @param param [String] the prefixed ID, number, or integer id to search for# @return [Spree::Order] the found order# @raise [ActiveRecord::RecordNotFound] if order not founddef self.find_by_param!(param)diff --git a/backend/engines/core/app/models/spree/wished_item.rb b/backend/engines/core/app/models/spree/wished_item.rbindex 6208d547d9..42130bf896 100644--- a/backend/engines/core/app/models/spree/wished_item.rb+++ b/backend/engines/core/app/models/spree/wished_item.rb@@ -22,7 +22,8 @@ module Spree# @param id [String] the prefixed ID of the variantdef variant_id=(id)if id.to_s.include?('_')- self.variant_id = Spree::Variant.find_by(prefix_id: id)&.id+ decoded = Spree::Variant.decode_prefixed_id(id)+ super(decoded)elsesuper(id)enddiff --git a/backend/engines/core/app/serializers/spree/events/base_serializer.rb b/backend/engines/core/app/serializers/spree/events/base_serializer.rbindex a52def6dd8..652772dd95 100644--- a/backend/engines/core/app/serializers/spree/events/base_serializer.rb+++ b/backend/engines/core/app/serializers/spree/events/base_serializer.rb@@ -39,12 +39,12 @@ module Spreeend# Returns the public-facing ID for a record.- # Prefers prefix_id when available (handles FriendlyId models that+ # Prefers prefixed_id when available (handles FriendlyId models that# return slugs from to_param), falls back to to_param.def public_id(record)return nil if record.nil?- record.try(:prefix_id).presence || record.to_param+ record.try(:prefixed_id).presence || record.to_paramend# Attribute helpersdiff --git a/backend/engines/core/db/migrate/20260124000000_add_prefix_id_to_spree_tables.rb b/backend/engines/core/db/migrate/20260124000000_add_prefix_id_to_spree_tables.rbdeleted file mode 100644index 0cce692d79..0000000000--- a/backend/engines/core/db/migrate/20260124000000_add_prefix_id_to_spree_tables.rb+++ /dev/null@@ -1,104 +0,0 @@-# frozen_string_literal: true--class AddPrefixIdToSpreeTables < ActiveRecord::Migration[7.2]- def change- # Tables that need prefix_id for API v3- tables = %i[- spree_addresses- spree_adjustments- spree_api_keys- spree_assets- spree_calculators- spree_coupon_codes- spree_credit_cards- spree_custom_domains- spree_customer_groups- spree_customer_returns- spree_data_feeds- spree_digital_links- spree_digitals- spree_exports- spree_gateway_customers- spree_gift_card_batches- spree_gift_cards- spree_import_mappings- spree_import_rows- spree_imports- spree_integrations- spree_inventory_units- spree_invitations- spree_line_items- spree_log_entries- spree_metafield_definitions- spree_metafields- spree_newsletter_subscribers- spree_option_types- spree_option_values- spree_orders- spree_payment_capture_events- spree_payment_methods- spree_payment_sources- spree_payments- spree_policies- spree_post_categories- spree_posts- spree_price_lists- spree_price_rules- spree_prices- spree_products- spree_products_stores- spree_promotion_actions- spree_promotion_categories- spree_promotion_rules- spree_promotions- spree_prototypes- spree_refund_reasons- spree_refunds- spree_reimbursement_credits- spree_reimbursement_types- spree_reimbursements- spree_reports- spree_return_authorization_reasons- spree_return_authorizations- spree_return_items- spree_roles- spree_shipments- spree_shipping_categories- spree_shipping_method_categories- spree_shipping_methods- spree_shipping_rates- spree_state_changes- spree_stock_items- spree_stock_locations- spree_stock_movements- spree_stock_transfers- spree_store_credit_categories- spree_store_credit_events- spree_store_credit_types- spree_store_credits- spree_stores- spree_tax_categories- spree_tax_rates- spree_taxon_rules- spree_taxons- spree_taxonomies- spree_user_identities- spree_variants- spree_webhook_deliveries- spree_webhook_endpoints- spree_wished_items- spree_wishlists- spree_zones- ]-- tables.each do |table|- add_column table, :prefix_id, :string unless column_exists?(table, :prefix_id)- add_index table, :prefix_id, unique: true unless index_exists?(table, :prefix_id)- end-- [Spree.user_class, Spree.admin_user_class].compact.each do |user_class|- add_column user_class.table_name, :prefix_id, :string unless column_exists?(user_class.table_name, :prefix_id)- add_index user_class.table_name, :prefix_id, unique: true unless index_exists?(user_class.table_name, :prefix_id)- end- end-enddiff --git a/backend/engines/core/lib/spree/core.rb b/backend/engines/core/lib/spree/core.rbindex e70251ba0a..59559e14b3 100644--- a/backend/engines/core/lib/spree/core.rb+++ b/backend/engines/core/lib/spree/core.rb@@ -32,6 +32,7 @@ require 'geocoder'require 'oembed'require 'safely_block'require 'ar_lazy_preload'+require 'sqids'# This is required because ActiveModel::Validations#invalid? conflicts with the# invalid state of a Payment. In the future this should be removed.diff --git a/backend/engines/core/lib/tasks/prefix_ids.rake b/backend/engines/core/lib/tasks/prefix_ids.rakedeleted file mode 100644index 9586c75687..0000000000--- a/backend/engines/core/lib/tasks/prefix_ids.rake+++ /dev/null@@ -1,105 +0,0 @@-# frozen_string_literal: true--namespace :spree do- namespace :prefix_ids do- desc 'Backfill prefix_id for all existing records. Use MODEL=Spree::Order to backfill a single model. BATCH_SIZE=1000 to control batch size.'- task backfill: :environment do- batch_size = (ENV['BATCH_SIZE'] || 1000).to_i- models = prefixed_id_models-- if ENV['MODEL'].present?- model = ENV['MODEL'].constantize- unless models.include?(model)- puts "Error: #{ENV['MODEL']} does not have prefix_id support"- exit 1- end- models = [model]- end-- models.each do |model|- backfill_model(model, batch_size)- end-- puts 'Done!'- end-- desc 'Show backfill status for all models with prefix_id'- task status: :environment do- models = prefixed_id_models- total_remaining = 0- max_name_length = models.map { |m| m.name.length }.max-- models.each do |model|- remaining = model.unscoped.where(prefix_id: nil).count- total_remaining += remaining- status = remaining.zero? ? 'done' : "#{remaining} remaining"- puts " #{model.name.ljust(max_name_length)} #{status}"- end-- puts "\n Total: #{total_remaining} remaining"- end-- def prefixed_id_models- Rails.application.eager_load!-- models = Spree::Base.descendants.select do |model|- model.respond_to?(:_prefix_id_prefix) &&- model._prefix_id_prefix.present? &&- model.table_exists? &&- model.column_names.include?('prefix_id')- end-- [Spree.user_class, Spree.admin_user_class].compact.uniq.each do |user_class|- next if models.include?(user_class)- next unless user_class.respond_to?(:_prefix_id_prefix) && user_class._prefix_id_prefix.present?- next unless user_class.table_exists? && user_class.column_names.include?('prefix_id')-- models << user_class- end-- models.sort_by(&:name)- end-- def backfill_model(model, batch_size)- total = model.unscoped.where(prefix_id: nil).count- if total.zero?- puts "#{model.name}: all records already backfilled"- return- end-- prefix = model._prefix_id_prefix- puts "#{model.name}: backfilling #{total} records..."- start_time = Time.current- processed = 0-- model.unscoped.where(prefix_id: nil).in_batches(of: batch_size) do |batch|- ids = batch.pluck(:id)- values = ids.map do |id|- prefix_id = "#{prefix}_#{random_id}"- quoted_id = model.connection.quote(id)- quoted_prefix_id = model.connection.quote(prefix_id)- "WHEN #{quoted_id} THEN #{quoted_prefix_id}"- end-- sql = <<~SQL.squish- UPDATE #{model.table_name}- SET prefix_id = CASE id #{values.join(' ')} END- WHERE id IN (#{ids.map { |id| model.connection.quote(id) }.join(',')})- SQL-- model.connection.execute(sql)- processed += ids.size- printf " %d / %d (%.0f%%)\r", processed, total, (processed.to_f / total * 100)- end-- elapsed = (Time.current - start_time).round(1)- puts " #{model.name}: #{processed} records backfilled in #{elapsed}s"- end-- def random_id- alphabet = Spree::PrefixedId::ALPHABET- length = Spree::PrefixedId::ID_LENGTH- Array.new(length) { alphabet[SecureRandom.random_number(alphabet.length)] }.join- end- end-enddiff --git a/backend/engines/core/spec/models/spree/concerns/admin_user_methods_spec.rb b/backend/engines/core/spec/models/spree/concerns/admin_user_methods_spec.rbindex 11da39762b..dd15b5b487 100644--- a/backend/engines/core/spec/models/spree/concerns/admin_user_methods_spec.rb+++ b/backend/engines/core/spec/models/spree/concerns/admin_user_methods_spec.rb@@ -19,13 +19,13 @@ describe Spree::AdminUserMethods doit { expect(admin_user).to have_many(:exports) }end- describe 'prefix_id' do- it 'generates a prefix_id starting with admin_' do- expect(admin_user.prefix_id).to start_with('admin_')+ describe 'prefixed_id' do+ it 'generates a prefixed_id starting with admin_' do+ expect(admin_user.prefixed_id).to start_with('admin_')end- it 'uses prefix_id as to_param' do- expect(admin_user.to_param).to eq(admin_user.prefix_id)+ it 'uses prefixed_id as to_param' do+ expect(admin_user.to_param).to eq(admin_user.prefixed_id)endenddiff --git a/backend/engines/core/spec/models/spree/order/address_spec.rb b/backend/engines/core/spec/models/spree/order/address_spec.rbindex 21755f4435..0b7d66e575 100644--- a/backend/engines/core/spec/models/spree/order/address_spec.rb+++ b/backend/engines/core/spec/models/spree/order/address_spec.rb@@ -102,8 +102,7 @@ describe Spree::Order, type: :model do'private_metadata','latitude','longitude',- 'preferences',- 'prefix_id'+ 'preferences')})diff --git a/backend/engines/core/spec/models/spree/promotion_handler/promotion_duplicator_spec.rb b/backend/engines/core/spec/models/spree/promotion_handler/promotion_duplicator_spec.rbindex 1b3fe18911..cf4a21bf83 100644--- a/backend/engines/core/spec/models/spree/promotion_handler/promotion_duplicator_spec.rb+++ b/backend/engines/core/spec/models/spree/promotion_handler/promotion_duplicator_spec.rb@@ -30,7 +30,7 @@ describe Spree::PromotionHandler::PromotionDuplicator dolet!(:new_promotion) { subject.duplicate }context 'model fields' do- let(:excluded_fields) { ['code', 'name', 'path', 'id', 'prefix_id', 'created_at', 'updated_at', 'deleted_at'] }+ let(:excluded_fields) { ['code', 'name', 'path', 'id', 'created_at', 'updated_at', 'deleted_at'] }it 'returns a duplicate of a promotion with the path, name and code fields changed' doexpect("New #{promotion.name}").to eq new_promotion.name@@ -46,7 +46,7 @@ describe Spree::PromotionHandler::PromotionDuplicator doendcontext 'model associations - rules' do- let(:excluded_fields) { ['promotion_id', 'id', 'prefix_id', 'created_at', 'updated_at', 'deleted_at'] }+ let(:excluded_fields) { ['promotion_id', 'id', 'created_at', 'updated_at', 'deleted_at'] }it 'copies all promotion rules' doexpect(promotion.promotion_rules.size).to eq new_promotion.promotion_rules.size@@ -67,7 +67,7 @@ describe Spree::PromotionHandler::PromotionDuplicator doendcontext 'model associations - actions' do- let(:excluded_fields) { ['promotion_id', 'id', 'prefix_id', 'created_at', 'updated_at', 'deleted_at'] }+ let(:excluded_fields) { ['promotion_id', 'id', 'created_at', 'updated_at', 'deleted_at'] }it 'copies all promotion actions' doexpect(promotion.promotion_actions.size).to eq new_promotion.promotion_actions.size@@ -92,7 +92,7 @@ describe Spree::PromotionHandler::PromotionDuplicator doendcontext "model associations - action's calculator" do- let(:excluded_fields) { ['calculable_id', 'id', 'prefix_id', 'created_at', 'updated_at', 'deleted_at'] }+ let(:excluded_fields) { ['calculable_id', 'id', 'created_at', 'updated_at', 'deleted_at'] }it "copies promotion action's calculator" donew_calc = new_promotion.promotion_actions.first.calculatordiff --git a/backend/engines/core/spec/serializers/spree/events/asset_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/asset_serializer_spec.rbindex 2ba5b389f3..9a280a92c1 100644--- a/backend/engines/core/spec/serializers/spree/events/asset_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/asset_serializer_spec.rb@@ -11,13 +11,13 @@ RSpec.describe Spree::Events::AssetSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(asset.prefix_id)+ expect(subject[:id]).to eq(asset.prefixed_id)expect(subject[:type]).to eq(asset.type)endit 'includes viewable polymorphic reference' doexpect(subject[:viewable_type]).to eq('Spree::Variant')- expect(subject[:viewable_id]).to eq(variant.prefix_id)+ expect(subject[:viewable_id]).to eq(variant.prefixed_id)endit 'includes position' dodiff --git a/backend/engines/core/spec/serializers/spree/events/customer_return_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/customer_return_serializer_spec.rbindex affa739fa2..c44e232bc6 100644--- a/backend/engines/core/spec/serializers/spree/events/customer_return_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/customer_return_serializer_spec.rb@@ -9,12 +9,12 @@ RSpec.describe Spree::Events::CustomerReturnSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(customer_return.prefix_id)+ expect(subject[:id]).to eq(customer_return.prefixed_id)expect(subject[:number]).to eq(customer_return.number)endit 'includes foreign keys' do- expect(subject[:stock_location_id]).to eq(customer_return.stock_location&.prefix_id)+ expect(subject[:stock_location_id]).to eq(customer_return.stock_location&.prefixed_id)expect(subject).to have_key(:store_id)enddiff --git a/backend/engines/core/spec/serializers/spree/events/digital_link_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/digital_link_serializer_spec.rbindex 2dd4c43540..4bc0536172 100644--- a/backend/engines/core/spec/serializers/spree/events/digital_link_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/digital_link_serializer_spec.rb@@ -9,12 +9,12 @@ RSpec.describe Spree::Events::DigitalLinkSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(digital_link.prefix_id)+ expect(subject[:id]).to eq(digital_link.prefixed_id)endit 'includes foreign keys' do- expect(subject[:digital_id]).to eq(digital_link.digital&.prefix_id)- expect(subject[:line_item_id]).to eq(digital_link.line_item&.prefix_id)+ expect(subject[:digital_id]).to eq(digital_link.digital&.prefixed_id)+ expect(subject[:line_item_id]).to eq(digital_link.line_item&.prefixed_id)endit 'includes access_counter' dodiff --git a/backend/engines/core/spec/serializers/spree/events/digital_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/digital_serializer_spec.rbindex 13f01e3568..3069d84893 100644--- a/backend/engines/core/spec/serializers/spree/events/digital_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/digital_serializer_spec.rb@@ -10,11 +10,11 @@ RSpec.describe Spree::Events::DigitalSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(digital.prefix_id)+ expect(subject[:id]).to eq(digital.prefixed_id)endit 'includes variant_id' do- expect(subject[:variant_id]).to eq(variant.prefix_id)+ expect(subject[:variant_id]).to eq(variant.prefixed_id)endit 'includes timestamps' dodiff --git a/backend/engines/core/spec/serializers/spree/events/export_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/export_serializer_spec.rbindex 93f876a92b..c58740f6e4 100644--- a/backend/engines/core/spec/serializers/spree/events/export_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/export_serializer_spec.rb@@ -11,7 +11,7 @@ RSpec.describe Spree::Events::ExportSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(export.prefix_id)+ expect(subject[:id]).to eq(export.prefixed_id)expect(subject[:number]).to eq(export.number)end@@ -24,8 +24,8 @@ RSpec.describe Spree::Events::ExportSerializer doendit 'includes foreign keys' do- expect(subject[:user_id]).to eq(admin_user.prefix_id)- expect(subject[:store_id]).to eq(store.prefix_id)+ expect(subject[:user_id]).to eq(admin_user.prefixed_id)+ expect(subject[:store_id]).to eq(store.prefixed_id)endit 'includes timestamps' dodiff --git a/backend/engines/core/spec/serializers/spree/events/gift_card_batch_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/gift_card_batch_serializer_spec.rbindex 2565f50db5..9d1c216932 100644--- a/backend/engines/core/spec/serializers/spree/events/gift_card_batch_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/gift_card_batch_serializer_spec.rb@@ -19,7 +19,7 @@ RSpec.describe Spree::Events::GiftCardBatchSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(gift_card_batch.prefix_id)+ expect(subject[:id]).to eq(gift_card_batch.prefixed_id)endit 'includes codes_count' do@@ -40,8 +40,8 @@ RSpec.describe Spree::Events::GiftCardBatchSerializer doendit 'includes foreign keys' do- expect(subject[:store_id]).to eq(store.prefix_id)- expect(subject[:created_by_id]).to eq(admin_user.prefix_id)+ expect(subject[:store_id]).to eq(store.prefixed_id)+ expect(subject[:created_by_id]).to eq(admin_user.prefixed_id)endit 'includes timestamps' dodiff --git a/backend/engines/core/spec/serializers/spree/events/gift_card_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/gift_card_serializer_spec.rbindex 48e2d02dfe..8d7d381543 100644--- a/backend/engines/core/spec/serializers/spree/events/gift_card_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/gift_card_serializer_spec.rb@@ -17,7 +17,7 @@ RSpec.describe Spree::Events::GiftCardSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(gift_card.prefix_id)+ expect(subject[:id]).to eq(gift_card.prefixed_id)expect(subject[:code]).to eq(gift_card.code)end@@ -37,7 +37,7 @@ RSpec.describe Spree::Events::GiftCardSerializer doendit 'includes foreign keys' do- expect(subject[:store_id]).to eq(store.prefix_id)+ expect(subject[:store_id]).to eq(store.prefixed_id)expect(subject).to have_key(:user_id)expect(subject).to have_key(:gift_card_batch_id)enddiff --git a/backend/engines/core/spec/serializers/spree/events/import_row_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/import_row_serializer_spec.rbindex b25b799ab3..8c4295f50d 100644--- a/backend/engines/core/spec/serializers/spree/events/import_row_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/import_row_serializer_spec.rb@@ -21,11 +21,11 @@ RSpec.describe Spree::Events::ImportRowSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(import_row.prefix_id)+ expect(subject[:id]).to eq(import_row.prefixed_id)endit 'includes import reference' do- expect(subject[:import_id]).to eq(import.prefix_id)+ expect(subject[:import_id]).to eq(import.prefixed_id)endit 'includes row_number' do@@ -42,7 +42,7 @@ RSpec.describe Spree::Events::ImportRowSerializer doit 'includes item polymorphic reference' doexpect(subject[:item_type]).to eq('Spree::Product')- expect(subject[:item_id]).to eq(product.prefix_id)+ expect(subject[:item_id]).to eq(product.prefixed_id)endit 'includes timestamps' dodiff --git a/backend/engines/core/spec/serializers/spree/events/import_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/import_serializer_spec.rbindex 3e176d084a..b6d5a82d92 100644--- a/backend/engines/core/spec/serializers/spree/events/import_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/import_serializer_spec.rb@@ -11,7 +11,7 @@ RSpec.describe Spree::Events::ImportSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(import.prefix_id)+ expect(subject[:id]).to eq(import.prefixed_id)expect(subject[:number]).to eq(import.number)end@@ -25,11 +25,11 @@ RSpec.describe Spree::Events::ImportSerializer doit 'includes owner polymorphic reference' doexpect(subject[:owner_type]).to eq('Spree::Store')- expect(subject[:owner_id]).to eq(store.prefix_id)+ expect(subject[:owner_id]).to eq(store.prefixed_id)endit 'includes user_id' do- expect(subject[:user_id]).to eq(admin_user.prefix_id)+ expect(subject[:user_id]).to eq(admin_user.prefixed_id)endit 'includes rows_count' dodiff --git a/backend/engines/core/spec/serializers/spree/events/invitation_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/invitation_serializer_spec.rbindex 5920c340ce..40c9dedd30 100644--- a/backend/engines/core/spec/serializers/spree/events/invitation_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/invitation_serializer_spec.rb@@ -9,7 +9,7 @@ RSpec.describe Spree::Events::InvitationSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(invitation.prefix_id)+ expect(subject[:id]).to eq(invitation.prefixed_id)expect(subject[:email]).to eq(invitation.email)end@@ -19,12 +19,12 @@ RSpec.describe Spree::Events::InvitationSerializer doit 'includes resource polymorphic reference' doexpect(subject[:resource_type]).to eq(invitation.resource_type)- expect(subject[:resource_id]).to eq(invitation.resource&.prefix_id)+ expect(subject[:resource_id]).to eq(invitation.resource&.prefixed_id)endit 'includes inviter polymorphic reference' doexpect(subject[:inviter_type]).to eq(invitation.inviter_type)- expect(subject[:inviter_id]).to eq(invitation.inviter&.prefix_id)+ expect(subject[:inviter_id]).to eq(invitation.inviter&.prefixed_id)endit 'includes invitee polymorphic reference' do@@ -33,7 +33,7 @@ RSpec.describe Spree::Events::InvitationSerializer doendit 'includes role_id' do- expect(subject[:role_id]).to eq(invitation.role&.prefix_id)+ expect(subject[:role_id]).to eq(invitation.role&.prefixed_id)endit 'includes dates' dodiff --git a/backend/engines/core/spec/serializers/spree/events/line_item_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/line_item_serializer_spec.rbindex e08705d723..dcf5ac3770 100644--- a/backend/engines/core/spec/serializers/spree/events/line_item_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/line_item_serializer_spec.rb@@ -10,7 +10,7 @@ RSpec.describe Spree::Events::LineItemSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(line_item.prefix_id)+ expect(subject[:id]).to eq(line_item.prefixed_id)endit 'includes quantity' do@@ -34,8 +34,8 @@ RSpec.describe Spree::Events::LineItemSerializer doendit 'includes foreign keys' do- expect(subject[:variant_id]).to eq(line_item.variant&.prefix_id)- expect(subject[:order_id]).to eq(order.prefix_id)+ expect(subject[:variant_id]).to eq(line_item.variant&.prefixed_id)+ expect(subject[:order_id]).to eq(order.prefixed_id)expect(subject).to have_key(:tax_category_id)enddiff --git a/backend/engines/core/spec/serializers/spree/events/newsletter_subscriber_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/newsletter_subscriber_serializer_spec.rbindex cd6c851edb..56b41f43fa 100644--- a/backend/engines/core/spec/serializers/spree/events/newsletter_subscriber_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/newsletter_subscriber_serializer_spec.rb@@ -13,7 +13,7 @@ RSpec.describe Spree::Events::NewsletterSubscriberSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(subscriber.prefix_id)+ expect(subject[:id]).to eq(subscriber.prefixed_id)expect(subject[:email]).to eq('[email protected]')enddiff --git a/backend/engines/core/spec/serializers/spree/events/order_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/order_serializer_spec.rbindex 2b4a1a9a0d..3eac6ce3e3 100644--- a/backend/engines/core/spec/serializers/spree/events/order_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/order_serializer_spec.rb@@ -15,7 +15,7 @@ RSpec.describe Spree::Events::OrderSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(order.prefix_id)+ expect(subject[:id]).to eq(order.prefixed_id)expect(subject[:number]).to eq(order.number)end@@ -48,8 +48,8 @@ RSpec.describe Spree::Events::OrderSerializer doendit 'includes foreign keys' do- expect(subject[:user_id]).to eq(user.prefix_id)- expect(subject[:store_id]).to eq(store.prefix_id)+ expect(subject[:user_id]).to eq(user.prefixed_id)+ expect(subject[:store_id]).to eq(store.prefixed_id)endit 'includes timestamps' dodiff --git a/backend/engines/core/spec/serializers/spree/events/payment_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/payment_serializer_spec.rbindex e756825e7c..30be50f00f 100644--- a/backend/engines/core/spec/serializers/spree/events/payment_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/payment_serializer_spec.rb@@ -17,7 +17,7 @@ RSpec.describe Spree::Events::PaymentSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(payment.prefix_id)+ expect(subject[:id]).to eq(payment.prefixed_id)expect(subject[:number]).to eq(payment.number)end@@ -30,8 +30,8 @@ RSpec.describe Spree::Events::PaymentSerializer doendit 'includes foreign keys' do- expect(subject[:order_id]).to eq(order.prefix_id)- expect(subject[:payment_method_id]).to eq(payment_method.prefix_id)+ expect(subject[:order_id]).to eq(order.prefixed_id)+ expect(subject[:payment_method_id]).to eq(payment_method.prefixed_id)endit 'includes source polymorphic reference' dodiff --git a/backend/engines/core/spec/serializers/spree/events/post_category_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/post_category_serializer_spec.rbindex 6c5251688d..6d981660fa 100644--- a/backend/engines/core/spec/serializers/spree/events/post_category_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/post_category_serializer_spec.rb@@ -10,13 +10,13 @@ RSpec.describe Spree::Events::PostCategorySerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(post_category.prefix_id)+ expect(subject[:id]).to eq(post_category.prefixed_id)expect(subject[:title]).to eq('News')expect(subject[:slug]).to eq(post_category.slug)endit 'includes store_id' do- expect(subject[:store_id]).to eq(store.prefix_id)+ expect(subject[:store_id]).to eq(store.prefixed_id)endit 'includes timestamps' dodiff --git a/backend/engines/core/spec/serializers/spree/events/post_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/post_serializer_spec.rbindex a3b153a797..f5cc37bd0f 100644--- a/backend/engines/core/spec/serializers/spree/events/post_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/post_serializer_spec.rb@@ -19,7 +19,7 @@ RSpec.describe Spree::Events::PostSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(post.prefix_id)+ expect(subject[:id]).to eq(post.prefixed_id)expect(subject[:title]).to eq('Test Post')expect(subject[:slug]).to eq(post.slug)end@@ -38,9 +38,9 @@ RSpec.describe Spree::Events::PostSerializer doendit 'includes foreign keys' do- expect(subject[:author_id]).to eq(author.prefix_id)- expect(subject[:post_category_id]).to eq(post_category.prefix_id)- expect(subject[:store_id]).to eq(store.prefix_id)+ expect(subject[:author_id]).to eq(author.prefixed_id)+ expect(subject[:post_category_id]).to eq(post_category.prefixed_id)+ expect(subject[:store_id]).to eq(store.prefixed_id)endit 'includes timestamps' dodiff --git a/backend/engines/core/spec/serializers/spree/events/price_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/price_serializer_spec.rbindex ff7a9b4493..980ca5d2cf 100644--- a/backend/engines/core/spec/serializers/spree/events/price_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/price_serializer_spec.rb@@ -10,7 +10,7 @@ RSpec.describe Spree::Events::PriceSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(price.prefix_id)+ expect(subject[:id]).to eq(price.prefixed_id)endit 'includes amount fields' do@@ -20,7 +20,7 @@ RSpec.describe Spree::Events::PriceSerializer doendit 'includes variant_id' do- expect(subject[:variant_id]).to eq(variant.prefix_id)+ expect(subject[:variant_id]).to eq(variant.prefixed_id)endit 'includes deleted_at' dodiff --git a/backend/engines/core/spec/serializers/spree/events/product_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/product_serializer_spec.rbindex 5d6d7899dc..9018467370 100644--- a/backend/engines/core/spec/serializers/spree/events/product_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/product_serializer_spec.rb@@ -16,7 +16,7 @@ RSpec.describe Spree::Events::ProductSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(product.prefix_id)+ expect(subject[:id]).to eq(product.prefixed_id)expect(subject[:name]).to eq('Test Product')expect(subject[:slug]).to eq(product.slug)enddiff --git a/backend/engines/core/spec/serializers/spree/events/promotion_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/promotion_serializer_spec.rbindex 9df057c17e..a636c0cddf 100644--- a/backend/engines/core/spec/serializers/spree/events/promotion_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/promotion_serializer_spec.rb@@ -15,7 +15,7 @@ RSpec.describe Spree::Events::PromotionSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(promotion.prefix_id)+ expect(subject[:id]).to eq(promotion.prefixed_id)expect(subject[:name]).to eq('Test Promotion')enddiff --git a/backend/engines/core/spec/serializers/spree/events/refund_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/refund_serializer_spec.rbindex d0b6630477..f3c492c199 100644--- a/backend/engines/core/spec/serializers/spree/events/refund_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/refund_serializer_spec.rb@@ -10,7 +10,7 @@ RSpec.describe Spree::Events::RefundSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(refund.prefix_id)+ expect(subject[:id]).to eq(refund.prefixed_id)endit 'includes amount' do@@ -22,7 +22,7 @@ RSpec.describe Spree::Events::RefundSerializer doendit 'includes foreign keys' do- expect(subject[:payment_id]).to eq(refund.payment&.prefix_id)+ expect(subject[:payment_id]).to eq(refund.payment&.prefixed_id)expect(subject).to have_key(:refund_reason_id)expect(subject).to have_key(:reimbursement_id)expect(subject).to have_key(:refunder_id)diff --git a/backend/engines/core/spec/serializers/spree/events/reimbursement_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/reimbursement_serializer_spec.rbindex 4d8e72c2cb..580517cc4e 100644--- a/backend/engines/core/spec/serializers/spree/events/reimbursement_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/reimbursement_serializer_spec.rb@@ -9,7 +9,7 @@ RSpec.describe Spree::Events::ReimbursementSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(reimbursement.prefix_id)+ expect(subject[:id]).to eq(reimbursement.prefixed_id)expect(subject[:number]).to eq(reimbursement.number)end@@ -22,8 +22,8 @@ RSpec.describe Spree::Events::ReimbursementSerializer doendit 'includes foreign keys' do- expect(subject[:order_id]).to eq(reimbursement.order&.prefix_id)- expect(subject[:customer_return_id]).to eq(reimbursement.customer_return&.prefix_id)+ expect(subject[:order_id]).to eq(reimbursement.order&.prefixed_id)+ expect(subject[:customer_return_id]).to eq(reimbursement.customer_return&.prefixed_id)endit 'includes timestamps' dodiff --git a/backend/engines/core/spec/serializers/spree/events/report_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/report_serializer_spec.rbindex 3398b6f3ab..4825b46440 100644--- a/backend/engines/core/spec/serializers/spree/events/report_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/report_serializer_spec.rb@@ -19,16 +19,16 @@ RSpec.describe Spree::Events::ReportSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(report.prefix_id)+ expect(subject[:id]).to eq(report.prefixed_id)expect(subject[:type]).to eq(report.type)endit 'includes store reference' do- expect(subject[:store_id]).to eq(store.prefix_id)+ expect(subject[:store_id]).to eq(store.prefixed_id)endit 'includes user reference' do- expect(subject[:user_id]).to eq(user.prefix_id)+ expect(subject[:user_id]).to eq(user.prefixed_id)endit 'includes currency' dodiff --git a/backend/engines/core/spec/serializers/spree/events/return_authorization_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/return_authorization_serializer_spec.rbindex 71e7369d9d..5b87dcdec6 100644--- a/backend/engines/core/spec/serializers/spree/events/return_authorization_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/return_authorization_serializer_spec.rb@@ -9,7 +9,7 @@ RSpec.describe Spree::Events::ReturnAuthorizationSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(return_authorization.prefix_id)+ expect(subject[:id]).to eq(return_authorization.prefixed_id)expect(subject[:number]).to eq(return_authorization.number)end@@ -18,8 +18,8 @@ RSpec.describe Spree::Events::ReturnAuthorizationSerializer doendit 'includes foreign keys' do- expect(subject[:order_id]).to eq(return_authorization.order&.prefix_id)- expect(subject[:stock_location_id]).to eq(return_authorization.stock_location&.prefix_id)+ expect(subject[:order_id]).to eq(return_authorization.order&.prefixed_id)+ expect(subject[:stock_location_id]).to eq(return_authorization.stock_location&.prefixed_id)expect(subject).to have_key(:return_authorization_reason_id)enddiff --git a/backend/engines/core/spec/serializers/spree/events/return_item_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/return_item_serializer_spec.rbindex 90c556e71b..c72615b2e1 100644--- a/backend/engines/core/spec/serializers/spree/events/return_item_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/return_item_serializer_spec.rb@@ -9,7 +9,7 @@ RSpec.describe Spree::Events::ReturnItemSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(return_item.prefix_id)+ expect(subject[:id]).to eq(return_item.prefixed_id)endit 'includes status fields' do@@ -24,8 +24,8 @@ RSpec.describe Spree::Events::ReturnItemSerializer doendit 'includes foreign keys' do- expect(subject[:inventory_unit_id]).to eq(return_item.inventory_unit&.prefix_id)- expect(subject[:return_authorization_id]).to eq(return_item.return_authorization&.prefix_id)+ expect(subject[:inventory_unit_id]).to eq(return_item.inventory_unit&.prefixed_id)+ expect(subject[:return_authorization_id]).to eq(return_item.return_authorization&.prefixed_id)expect(subject).to have_key(:customer_return_id)expect(subject).to have_key(:reimbursement_id)expect(subject).to have_key(:exchange_variant_id)diff --git a/backend/engines/core/spec/serializers/spree/events/shipment_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/shipment_serializer_spec.rbindex 51172333b1..a770b06111 100644--- a/backend/engines/core/spec/serializers/spree/events/shipment_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/shipment_serializer_spec.rb@@ -9,7 +9,7 @@ RSpec.describe Spree::Events::ShipmentSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(shipment.prefix_id)+ expect(subject[:id]).to eq(shipment.prefixed_id)expect(subject[:number]).to eq(shipment.number)end@@ -26,8 +26,8 @@ RSpec.describe Spree::Events::ShipmentSerializer doendit 'includes foreign keys' do- expect(subject[:order_id]).to eq(shipment.order&.prefix_id)- expect(subject[:stock_location_id]).to eq(shipment.stock_location&.prefix_id)+ expect(subject[:order_id]).to eq(shipment.order&.prefixed_id)+ expect(subject[:stock_location_id]).to eq(shipment.stock_location&.prefixed_id)endit 'includes timestamps' dodiff --git a/backend/engines/core/spec/serializers/spree/events/stock_item_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/stock_item_serializer_spec.rbindex 21d0e8eb12..af0a53f4d0 100644--- a/backend/engines/core/spec/serializers/spree/events/stock_item_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/stock_item_serializer_spec.rb@@ -11,7 +11,7 @@ RSpec.describe Spree::Events::StockItemSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(stock_item.prefix_id)+ expect(subject[:id]).to eq(stock_item.prefixed_id)endit 'includes count_on_hand' do@@ -23,8 +23,8 @@ RSpec.describe Spree::Events::StockItemSerializer doendit 'includes foreign keys' do- expect(subject[:stock_location_id]).to eq(stock_item.stock_location&.prefix_id)- expect(subject[:variant_id]).to eq(stock_item.variant&.prefix_id)+ expect(subject[:stock_location_id]).to eq(stock_item.stock_location&.prefixed_id)+ expect(subject[:variant_id]).to eq(stock_item.variant&.prefixed_id)endit 'includes deleted_at' dodiff --git a/backend/engines/core/spec/serializers/spree/events/stock_movement_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/stock_movement_serializer_spec.rbindex bb7153c41b..f0588c293d 100644--- a/backend/engines/core/spec/serializers/spree/events/stock_movement_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/stock_movement_serializer_spec.rb@@ -12,7 +12,7 @@ RSpec.describe Spree::Events::StockMovementSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(stock_movement.prefix_id)+ expect(subject[:id]).to eq(stock_movement.prefixed_id)endit 'includes quantity' do@@ -29,7 +29,7 @@ RSpec.describe Spree::Events::StockMovementSerializer doendit 'includes stock_item_id' do- expect(subject[:stock_item_id]).to eq(stock_item.prefix_id)+ expect(subject[:stock_item_id]).to eq(stock_item.prefixed_id)endit 'includes timestamps' dodiff --git a/backend/engines/core/spec/serializers/spree/events/stock_transfer_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/stock_transfer_serializer_spec.rbindex 9a47832d08..22a305e766 100644--- a/backend/engines/core/spec/serializers/spree/events/stock_transfer_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/stock_transfer_serializer_spec.rb@@ -16,7 +16,7 @@ RSpec.describe Spree::Events::StockTransferSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(stock_transfer.prefix_id)+ expect(subject[:id]).to eq(stock_transfer.prefixed_id)expect(subject[:number]).to eq(stock_transfer.number)end@@ -29,8 +29,8 @@ RSpec.describe Spree::Events::StockTransferSerializer doendit 'includes location foreign keys' do- expect(subject[:source_location_id]).to eq(source_location.prefix_id)- expect(subject[:destination_location_id]).to eq(destination_location.prefix_id)+ expect(subject[:source_location_id]).to eq(source_location.prefixed_id)+ expect(subject[:destination_location_id]).to eq(destination_location.prefixed_id)endit 'includes timestamps' dodiff --git a/backend/engines/core/spec/serializers/spree/events/store_credit_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/store_credit_serializer_spec.rbindex 47c9ff63fe..0effaa9445 100644--- a/backend/engines/core/spec/serializers/spree/events/store_credit_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/store_credit_serializer_spec.rb@@ -19,7 +19,7 @@ RSpec.describe Spree::Events::StoreCreditSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(store_credit.prefix_id)+ expect(subject[:id]).to eq(store_credit.prefixed_id)endit 'includes amount fields' do@@ -34,8 +34,8 @@ RSpec.describe Spree::Events::StoreCreditSerializer doendit 'includes user foreign keys' do- expect(subject[:user_id]).to eq(user.prefix_id)- expect(subject[:created_by_id]).to eq(admin_user.prefix_id)+ expect(subject[:user_id]).to eq(user.prefixed_id)+ expect(subject[:created_by_id]).to eq(admin_user.prefixed_id)endit 'includes category and type ids' do@@ -44,7 +44,7 @@ RSpec.describe Spree::Events::StoreCreditSerializer doendit 'includes store_id' do- expect(subject[:store_id]).to eq(store.prefix_id)+ expect(subject[:store_id]).to eq(store.prefixed_id)endit 'includes originator polymorphic reference' dodiff --git a/backend/engines/core/spec/serializers/spree/events/user_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/user_serializer_spec.rbindex 5cf9cb7c38..72695025e0 100644--- a/backend/engines/core/spec/serializers/spree/events/user_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/user_serializer_spec.rb@@ -9,7 +9,7 @@ RSpec.describe Spree::Events::UserSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(user.prefix_id)+ expect(subject[:id]).to eq(user.prefixed_id)expect(subject[:email]).to eq('[email protected]')enddiff --git a/backend/engines/core/spec/serializers/spree/events/variant_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/variant_serializer_spec.rbindex 0061336996..22409f287e 100644--- a/backend/engines/core/spec/serializers/spree/events/variant_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/variant_serializer_spec.rb@@ -10,7 +10,7 @@ RSpec.describe Spree::Events::VariantSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(variant.prefix_id)+ expect(subject[:id]).to eq(variant.prefixed_id)expect(subject[:sku]).to eq('TEST-SKU-001')end@@ -45,7 +45,7 @@ RSpec.describe Spree::Events::VariantSerializer doendit 'includes foreign keys' do- expect(subject[:product_id]).to eq(product.prefix_id)+ expect(subject[:product_id]).to eq(product.prefixed_id)expect(subject).to have_key(:tax_category_id)enddiff --git a/backend/engines/core/spec/serializers/spree/events/wished_item_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/wished_item_serializer_spec.rbindex 10a6217282..37c8e9c5a9 100644--- a/backend/engines/core/spec/serializers/spree/events/wished_item_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/wished_item_serializer_spec.rb@@ -12,7 +12,7 @@ RSpec.describe Spree::Events::WishedItemSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(wished_item.prefix_id)+ expect(subject[:id]).to eq(wished_item.prefixed_id)endit 'includes quantity' do@@ -20,8 +20,8 @@ RSpec.describe Spree::Events::WishedItemSerializer doendit 'includes foreign keys' do- expect(subject[:variant_id]).to eq(variant.prefix_id)- expect(subject[:wishlist_id]).to eq(wishlist.prefix_id)+ expect(subject[:variant_id]).to eq(variant.prefixed_id)+ expect(subject[:wishlist_id]).to eq(wishlist.prefixed_id)endit 'includes timestamps' dodiff --git a/backend/engines/core/spec/serializers/spree/events/wishlist_serializer_spec.rb b/backend/engines/core/spec/serializers/spree/events/wishlist_serializer_spec.rbindex cea30888a9..cf71a34e9e 100644--- a/backend/engines/core/spec/serializers/spree/events/wishlist_serializer_spec.rb+++ b/backend/engines/core/spec/serializers/spree/events/wishlist_serializer_spec.rb@@ -18,7 +18,7 @@ RSpec.describe Spree::Events::WishlistSerializer dodescribe '#as_json' doit 'includes identity attributes' do- expect(subject[:id]).to eq(wishlist.prefix_id)+ expect(subject[:id]).to eq(wishlist.prefixed_id)expect(subject[:name]).to eq('My Wishlist')end@@ -28,8 +28,8 @@ RSpec.describe Spree::Events::WishlistSerializer doendit 'includes foreign keys' do- expect(subject[:user_id]).to eq(user.prefix_id)- expect(subject[:store_id]).to eq(store.prefix_id)+ expect(subject[:user_id]).to eq(user.prefixed_id)+ expect(subject[:store_id]).to eq(store.prefixed_id)endit 'includes timestamps' dodiff --git a/backend/engines/core/spree_core.gemspec b/backend/engines/core/spree_core.gemspecindex 0cb542fbc0..6b24f9f7ce 100644--- a/backend/engines/core/spree_core.gemspec+++ b/backend/engines/core/spree_core.gemspec@@ -68,4 +68,5 @@ Gem::Specification.new do |s|s.add_dependency 'phonelib', '~> 0.10's.add_dependency 'ar_lazy_preload', '~> 2.0's.add_dependency 'bcrypt', '~> 3.1'+ s.add_dependency 'sqids', '~> 0.2'enddiff --git a/docs/api-reference/store.yaml b/docs/api-reference/store.yamlindex 1bc41c38d5..764d506b2e 100644--- a/docs/api-reference/store.yaml+++ b/docs/api-reference/store.yaml@@ -77,7 +77,7 @@ paths:application/json:example:data:- - id: addr_ZNhLV0xUvP36zAH1LakLXq4M+ - id: addr_EfhxLZ9ck8firstname: Johnlastname: Doefull_name: John Doe@@ -92,7 +92,7 @@ paths:state_text: STATE_ABBR_1state_abbr: STATE_ABBR_1state_name: STATE_NAME_1- - id: addr_vKS4u0ZCREWvdwHmM2wcvhqg+ - id: addr_gbHJdmfrXBfirstname: Johnlastname: Doefull_name: John Doe@@ -107,7 +107,7 @@ paths:state_text: STATE_ABBR_3state_abbr: STATE_ABBR_3state_name: STATE_NAME_3- - id: addr_Az6zD9DTWhqFr8WwHhZqgFJ1+ - id: addr_UkLWZg9DAJfirstname: Johnlastname: Doefull_name: John Doe@@ -176,7 +176,7 @@ paths:content:application/json:example:- id: addr_vy6itI6sKzdMAMJCyiflSgJU+ id: addr_VqXmZF31wYfirstname: Johnlastname: Doefull_name: John Doe@@ -287,7 +287,7 @@ paths:content:application/json:example:- id: addr_4VMxh84UBkTe1S2oFwXtXFhN+ id: addr_EfhxLZ9ck8firstname: Johnlastname: Doefull_name: John Doe@@ -343,7 +343,7 @@ paths:content:application/json:example:- id: addr_GGg1FfpKDjtxayLtKxPJuMCY+ id: addr_EfhxLZ9ck8firstname: Johnlastname: Doefull_name: John Doe@@ -431,14 +431,14 @@ paths:content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImV4cCI6MTc3MDQ3NTE1NX0.58iUJLBlh1kluINIjYX74HUkXaZvE2odbrL20BD4E6E+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImV4cCI6MTc3MDk4NDA3N30.UTgp8XrwFuQZ_7KTg0AYecB9LvHplvyzrHaqgDBaAlAuser:- id: cus_rnB7cR7rC2ru1M8jkujsyADD+ id: cus_UkLWZg9DAJemail: [email protected]- first_name: Joanie- last_name: Predovic- created_at: '2026-02-06T14:39:15.423Z'- updated_at: '2026-02-06T14:39:15.423Z'+ first_name: Zachariah+ last_name: Feil+ created_at: '2026-02-12T12:01:17.708Z'+ updated_at: '2026-02-12T12:01:17.708Z'addresses: []default_billing_address:default_shipping_address:@@ -494,14 +494,14 @@ paths:content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImV4cCI6MTc3MDQ3NTE1Nn0.gTyJ9-__DGw0vxz7tQ7DtIys2jyPaMrVJcvRqHFdZqU+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImV4cCI6MTc3MDk4NDA3OX0.7oxQrkVi2iavVcX7RxAIGhseyEuR9ioeiBJ8YGFcgzUuser:- id: cus_eGy4KhMMZeH7oPo9dfaDS09K+ id: cus_UkLWZg9DAJemail: [email protected]first_name: Johnlast_name: Doe- created_at: '2026-02-06T14:39:16.851Z'- updated_at: '2026-02-06T14:39:16.851Z'+ created_at: '2026-02-12T12:01:19.141Z'+ updated_at: '2026-02-12T12:01:19.141Z'addresses: []default_billing_address:default_shipping_address:@@ -568,14 +568,14 @@ paths:content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImV4cCI6MTc3MDQ3NTE1N30.--gMF4H_YUty_RqvPkRCZX7g9bK0qmA8BNbl-HUmh0s+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImV4cCI6MTc3MDk4NDA3OX0.7oxQrkVi2iavVcX7RxAIGhseyEuR9ioeiBJ8YGFcgzUuser:- id: cus_JBRRgUTP1UV3nr11QC1hY2aC+ id: cus_UkLWZg9DAJemail: [email protected]- first_name: Michaela- last_name: Murray- created_at: '2026-02-06T14:39:17.410Z'- updated_at: '2026-02-06T14:39:17.410Z'+ first_name: Elli+ last_name: Turner+ created_at: '2026-02-12T12:01:19.701Z'+ updated_at: '2026-02-12T12:01:19.701Z'addresses: []default_billing_address:default_shipping_address:@@ -626,11 +626,11 @@ paths:content:application/json:example:- id: or_ayD9n2RZmO1QIzzLS4yAvjRu- number: R110073427+ id: or_UkLWZg9DAJ+ number: R621744257state: cart- token: soV6RAT79Yuf5t5oy9qPdw7E5XUnqfwvXE7- email: [email protected]+ token: 2oRCupfh9SwBjaQ8z2JFBQQkQHT8eXcTP82+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -653,14 +653,14 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-06T14:39:19.244Z'- updated_at: '2026-02-06T14:39:19.346Z'+ created_at: '2026-02-12T12:01:20.760Z'+ updated_at: '2026-02-12T12:01:20.905Z'line_items:- - id: li_ItjslIkIPj61F9YiVQzRXTeD- variant_id: variant_dhHcPFuiQW24m5MxvbQVxWpW+ - id: li_UkLWZg9DAJ+ variant_id: variant_UkLWZg9DAJquantity: 1- name: Product 25705- slug: product-25705+ name: Product 23408+ slug: product-23408options_text: ''price: '10.0'display_price: "$10.00"@@ -679,8 +679,8 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-02-06T14:39:19.305Z'- updated_at: '2026-02-06T14:39:19.305Z'+ created_at: '2026-02-12T12:01:20.851Z'+ updated_at: '2026-02-12T12:01:20.851Z'compare_at_amount:thumbnail_url:option_values: []@@ -745,11 +745,11 @@ paths:content:application/json:example:- id: or_3v09HOdRMy9IyXtEsXpTRY4h- number: R290614948+ id: or_UkLWZg9DAJ+ number: R613235347state: cart- token: Xk3xRPLFyZPYWZWQGakd5DXJnoJHW6c5Brv- email: [email protected]+ token: tGJ4WakKZLc9LF5cYSG5LsyGJfZPuFKHYUC+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -772,14 +772,14 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-06T14:39:19.369Z'- updated_at: '2026-02-06T14:39:19.475Z'+ created_at: '2026-02-12T12:01:20.929Z'+ updated_at: '2026-02-12T12:01:21.040Z'line_items:- - id: li_2tYo1J7fFubgnEuKgWSYL003- variant_id: variant_iYvpP0xYgp8smOByN9sRPINE+ - id: li_UkLWZg9DAJ+ variant_id: variant_UkLWZg9DAJquantity: 1- name: Product 39634- slug: product-39634+ name: Product 39116+ slug: product-39116options_text: ''price: '10.0'display_price: "$10.00"@@ -798,8 +798,8 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-02-06T14:39:19.431Z'- updated_at: '2026-02-06T14:39:19.431Z'+ created_at: '2026-02-12T12:01:20.993Z'+ updated_at: '2026-02-12T12:01:20.993Z'compare_at_amount:thumbnail_url:option_values: []@@ -875,7 +875,7 @@ paths:example:data:- iso: DE- iso3: IS10+ iso3: IS16name: Germanystates_required: falsezipcode_required: true@@ -1036,14 +1036,14 @@ paths:content:application/json:example:- id: cus_oV2QWMbqTuPkHO6gNqACm9eQ- email: [email protected]- first_name: Kris- last_name: Leannon- created_at: '2026-02-06T14:39:25.082Z'- updated_at: '2026-02-06T14:39:25.893Z'+ id: cus_UkLWZg9DAJ+ email: [email protected]+ first_name: Una+ last_name: Bruen+ created_at: '2026-02-12T12:01:24.464Z'+ updated_at: '2026-02-12T12:01:24.748Z'addresses:- - id: addr_XYyceeOXqZSvtTCXJYadhGhd+ - id: addr_gbHJdmfrXBfirstname: Johnlastname: Doefull_name: John Doe@@ -1058,7 +1058,7 @@ paths:state_text: STATE_ABBR_51state_abbr: STATE_ABBR_51state_name: STATE_NAME_51- - id: addr_XXZGzSO26PXPWAPjS2jZ2dlf+ - id: addr_UkLWZg9DAJfirstname: Johnlastname: Doefull_name: John Doe@@ -1074,7 +1074,7 @@ paths:state_abbr: STATE_ABBR_50state_name: STATE_NAME_50default_billing_address:- id: addr_XYyceeOXqZSvtTCXJYadhGhd+ id: addr_gbHJdmfrXBfirstname: Johnlastname: Doefull_name: John Doe@@ -1090,7 +1090,7 @@ paths:state_abbr: STATE_ABBR_51state_name: STATE_NAME_51default_shipping_address:- id: addr_XXZGzSO26PXPWAPjS2jZ2dlf+ id: addr_UkLWZg9DAJfirstname: Johnlastname: Doefull_name: John Doe@@ -1106,7 +1106,7 @@ paths:state_abbr: STATE_ABBR_50state_name: STATE_NAME_50schema:- "$ref": "#/components/schemas/StoreUser"+ "$ref": "#/components/schemas/StoreCustomer"'401':description: unauthorized - invalid tokencontent:@@ -1142,14 +1142,14 @@ paths:content:application/json:example:- id: cus_ixalQUXazLV3YEhOFj42NHX4- email: [email protected]+ id: cus_UkLWZg9DAJ+ email: [email protected]first_name: Updatedlast_name: Name- created_at: '2026-02-06T14:39:26.181Z'- updated_at: '2026-02-06T14:39:27.013Z'+ created_at: '2026-02-12T12:01:25.043Z'+ updated_at: '2026-02-12T12:01:25.338Z'addresses:- - id: addr_x1dblf2GS6UQtnLjE9RedfuY+ - id: addr_gbHJdmfrXBfirstname: Johnlastname: Doefull_name: John Doe@@ -1164,7 +1164,7 @@ paths:state_text: STATE_ABBR_53state_abbr: STATE_ABBR_53state_name: STATE_NAME_53- - id: addr_N9e54LeWWAPJsnBgUC568UBs+ - id: addr_UkLWZg9DAJfirstname: Johnlastname: Doefull_name: John Doe@@ -1180,7 +1180,7 @@ paths:state_abbr: STATE_ABBR_52state_name: STATE_NAME_52default_billing_address:- id: addr_x1dblf2GS6UQtnLjE9RedfuY+ id: addr_gbHJdmfrXBfirstname: Johnlastname: Doefull_name: John Doe@@ -1196,7 +1196,7 @@ paths:state_abbr: STATE_ABBR_53state_name: STATE_NAME_53default_shipping_address:- id: addr_N9e54LeWWAPJsnBgUC568UBs+ id: addr_UkLWZg9DAJfirstname: Johnlastname: Doefull_name: John Doe@@ -1212,7 +1212,7 @@ paths:state_abbr: STATE_ABBR_52state_name: STATE_NAME_52schema:- "$ref": "#/components/schemas/StoreUser"+ "$ref": "#/components/schemas/StoreCustomer"'422':description: validation errorcontent:@@ -1283,11 +1283,11 @@ paths:content:application/json:example:- id: li_nsU2dEDLNuQSJRt8jgrEqtpj- variant_id: variant_vb4JDpFsTmPlUxOmohHDDZau+ id: li_gbHJdmfrXB+ variant_id: variant_gbHJdmfrXBquantity: 2- name: Product 98285- slug: product-98285+ name: Product 82573+ slug: product-82573options_text: ''price: '19.99'display_price: "$19.99"@@ -1306,8 +1306,8 @@ paths:discounted_amount: '39.98'display_discounted_amount: "$39.98"display_compare_at_amount: "$0.00"- created_at: '2026-02-06T14:39:29.621Z'- updated_at: '2026-02-06T14:39:29.621Z'+ created_at: '2026-02-12T12:01:26.888Z'+ updated_at: '2026-02-12T12:01:26.888Z'compare_at_amount:thumbnail_url:option_values: []@@ -1379,11 +1379,11 @@ paths:content:application/json:example:- id: li_us39T4wsohWyhZKWrTrfgPOV- variant_id: variant_HbNOF1aLaujZxPwviGyIbwAS+ id: li_UkLWZg9DAJ+ variant_id: variant_UkLWZg9DAJquantity: 5- name: Product 145400- slug: product-145400+ name: Product 111098+ slug: product-111098options_text: ''price: '19.99'display_price: "$19.99"@@ -1402,8 +1402,8 @@ paths:discounted_amount: '99.95'display_discounted_amount: "$99.95"display_compare_at_amount: "$0.00"- created_at: '2026-02-06T14:39:33.302Z'- updated_at: '2026-02-06T14:39:33.329Z'+ created_at: '2026-02-12T12:01:29.277Z'+ updated_at: '2026-02-12T12:01:29.315Z'compare_at_amount:thumbnail_url:option_values: []@@ -1516,11 +1516,11 @@ paths:application/json:example:data:- - id: or_zivmaWd2vkxehVqLOyYeLEa1- number: R651948911+ - id: or_UkLWZg9DAJ+ number: R308915205state: cart- token: bkyZErT2Nvh6ANRbjiBqXj1mcsNV2yhgoDh- email: [email protected]+ token: G2KeojDZ9bTU9AX2tSMgV32W3EdwsFL9E4T+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -1543,8 +1543,8 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-06T14:39:37.094Z'- updated_at: '2026-02-06T14:39:37.203Z'+ created_at: '2026-02-12T12:01:31.560Z'+ updated_at: '2026-02-12T12:01:31.723Z'payment_methods: []meta:page: 1@@ -1602,11 +1602,11 @@ paths:content:application/json:example:- id: or_GshAScU6hJrHhXNLHXM0wkWT- number: R390620060+ id: or_gbHJdmfrXB+ number: R415666692state: cart- token: 2atUXcu7jSXgm9oL3W1Ak57ej8STQWpt1Me- email: [email protected]+ token: 25fbjtyUstrxVcTgpPLwUbiwKMX5UxWr7dB+ email: [email protected]special_instructions:currency: USDitem_count: 0@@ -1629,10 +1629,10 @@ paths:total: '0.0'display_total: "$0.00"completed_at:- created_at: '2026-02-06T14:39:41.091Z'- updated_at: '2026-02-06T14:39:41.091Z'+ created_at: '2026-02-12T12:01:33.924Z'+ updated_at: '2026-02-12T12:01:33.924Z'payment_methods: []- order_token: 2atUXcu7jSXgm9oL3W1Ak57ej8STQWpt1Me+ order_token: 25fbjtyUstrxVcTgpPLwUbiwKMX5UxWr7dBschema:type: objectallOf:@@ -1695,10 +1695,10 @@ paths:content:application/json:example:- id: or_3VTbyt5op00YZiUYjczX58KR- number: R956168772+ id: or_gbHJdmfrXB+ number: R788423057state: cart- token: jAmRfszxCKdwLG1g8ieeCbxs6ELQ2qy2zRh+ token: 3Z5Hf1DzMqVspYYBCcDfxVmsYS2ybmVwgwBemail:special_instructions:currency: USD@@ -1722,8 +1722,8 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-06T14:39:44.861Z'- updated_at: '2026-02-06T14:39:44.960Z'+ created_at: '2026-02-12T12:01:36.101Z'+ updated_at: '2026-02-12T12:01:36.217Z'payment_methods: []schema:"$ref": "#/components/schemas/StoreOrder"@@ -1782,11 +1782,11 @@ paths:content:application/json:example:- id: or_tofCw7CEn4XXadLcfxFMS5ST- number: R656300099+ id: or_UkLWZg9DAJ+ number: R568714910state: cart- token: zx6BXUrNj1jzYzPZA1Y554PFKcB1m7y4a4C- email: [email protected]+ token: zXQczwpByWbNZTja5GJi9e8tiMjhXGH7ttm+ email: [email protected]special_instructions: Leave at doorcurrency: USDitem_count: 1@@ -1809,8 +1809,8 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-06T14:39:48.929Z'- updated_at: '2026-02-06T14:39:49.043Z'+ created_at: '2026-02-12T12:01:38.471Z'+ updated_at: '2026-02-12T12:01:38.584Z'payment_methods: []schema:"$ref": "#/components/schemas/StoreOrder"@@ -1875,11 +1875,11 @@ paths:content:application/json:example:- id: or_P244PTzh7DyhntWUnRIyoKde- number: R942935541+ id: or_gbHJdmfrXB+ number: R611142150state: address- token: Ju3SkcCDJh1R6DgT5nw1P7Qf247jaZvzNNV- email: [email protected]+ token: uDS48wbVBZJWogktodRzJgX5mZjg2cFy8Fd+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -1902,8 +1902,8 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-06T14:39:51.678Z'- updated_at: '2026-02-06T14:39:51.796Z'+ created_at: '2026-02-12T12:01:40.077Z'+ updated_at: '2026-02-12T12:01:40.186Z'payment_methods: []schema:"$ref": "#/components/schemas/StoreOrder"@@ -1954,11 +1954,11 @@ paths:content:application/json:example:- id: or_gdvE0hz3kd3NYOnWuHHdv4OV- number: R584890334+ id: or_gbHJdmfrXB+ number: R484016559state: payment- token: igQyaZgRmaG65KYkgU7eoLVz16fPb2kRukF- email: [email protected]+ token: Z8fdbw9k9ER7QmCkLrRRtiPknXG8vV4AMbR+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -1981,8 +1981,8 @@ paths:total: '29.99'display_total: "$29.99"completed_at:- created_at: '2026-02-06T14:39:54.299Z'- updated_at: '2026-02-06T14:39:54.517Z'+ created_at: '2026-02-12T12:01:41.656Z'+ updated_at: '2026-02-12T12:01:41.862Z'payment_methods: []schema:"$ref": "#/components/schemas/StoreOrder"@@ -2022,11 +2022,11 @@ paths:content:application/json:example:- id: or_VTXtZIfGydypMyJUEnA8rKbB- number: R288539193+ id: or_gbHJdmfrXB+ number: R977818618state: complete- token: DZPCTu9cXWUet19XvkUbSXXLESfPi3Mo9fP- email: [email protected]+ token: P2Npkby9hC5BjzE6kopRZPFjLpbwDggNy1x+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -2048,15 +2048,15 @@ paths:display_additional_tax_total: "$0.00"total: '29.99'display_total: "$29.99"- completed_at: '2026-02-06T14:39:56.302Z'- created_at: '2026-02-06T14:39:55.889Z'- updated_at: '2026-02-06T14:39:56.302Z'+ completed_at: '2026-02-12T12:01:42.881Z'+ created_at: '2026-02-12T12:01:42.540Z'+ updated_at: '2026-02-12T12:01:42.881Z'payment_methods:- - id: pm_pX4evwnh8ZAStY2Td5n9dDa4+ - id: pm_UkLWZg9DAJname: Checkdescription:type: Spree::PaymentMethod::Check- - id: pm_O4KhDNP4oU4gIO6YkRD2nUwZ+ - id: pm_gbHJdmfrXBname: Credit Carddescription:type: Spree::Gateway::Bogus@@ -2108,11 +2108,11 @@ paths:content:application/json:example:- id: or_aYugr8rjbUE3MadD0VZAZ7fx- number: R720149238+ id: or_UkLWZg9DAJ+ number: R797287437state: cart- token: nifnTryb4LWiiVMzLPptHgHdfZoVJAD7Gu2- email: [email protected]+ token: ybdfTsbTA7dwrNseXNnG19hKbCJZMBQwmSd+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -2135,10 +2135,10 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-06T14:39:58.869Z'- updated_at: '2026-02-06T14:39:59.324Z'+ created_at: '2026-02-12T12:01:44.440Z'+ updated_at: '2026-02-12T12:01:44.919Z'payment_methods:- - id: pm_xnsmLWCFdx9S7kzCt1E5bttY+ - id: pm_UkLWZg9DAJname: Store Creditdescription: Store Credittype: Spree::PaymentMethod::StoreCredit@@ -2198,11 +2198,11 @@ paths:content:application/json:example:- id: or_HM81zTOT2ogNCrUL0Y05LKaV- number: R430357526+ id: or_UkLWZg9DAJ+ number: R899215587state: cart- token: vFsiXaGm9BSLFXNZ9Bu445vqUyiAn2uvpDF- email: [email protected]+ token: znikM7MHtXLZpqjnWzk1X3eBKXny7mfgaNW+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -2225,8 +2225,8 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-06T14:40:01.788Z'- updated_at: '2026-02-06T14:40:01.905Z'+ created_at: '2026-02-12T12:01:46.184Z'+ updated_at: '2026-02-12T12:01:46.290Z'payment_methods: []schema:"$ref": "#/components/schemas/StoreOrder"@@ -2268,7 +2268,7 @@ paths:application/json:example:data:- - id: pm_f4f4uamTqq9a2AJZeO3Lf1yK+ - id: pm_UkLWZg9DAJname: Credit Carddescription:type: Spree::Gateway::Bogus@@ -2339,17 +2339,17 @@ paths:application/json:example:data:- - id: py_WTYcnANbKaARS29hOABZUKXU- payment_method_id: pm_MBsj14IV663HNUBenHZ555yp+ - id: py_UkLWZg9DAJ+ payment_method_id: pm_UkLWZg9DAJstate: checkoutresponse_code: '12345'- number: P1IOJWPN+ number: POIHPG01amount: '110.0'display_amount: "$110.00"- created_at: '2026-02-06T14:40:04.756Z'- updated_at: '2026-02-06T14:40:04.756Z'+ created_at: '2026-02-12T12:01:48.250Z'+ updated_at: '2026-02-12T12:01:48.250Z'payment_method:- id: pm_MBsj14IV663HNUBenHZ555yp+ id: pm_UkLWZg9DAJname: Credit Carddescription:type: Spree::Gateway::Bogus@@ -2411,17 +2411,17 @@ paths:content:application/json:example:- id: py_iwVxL96ppAg6c28JYdKVeIVm- payment_method_id: pm_Qj4pLtVavzJYixFGUi18P8OW+ id: py_UkLWZg9DAJ+ payment_method_id: pm_UkLWZg9DAJstate: checkoutresponse_code: '12345'- number: PMBKTRX2+ number: PTVUMDFNamount: '110.0'display_amount: "$110.00"- created_at: '2026-02-06T14:40:07.267Z'- updated_at: '2026-02-06T14:40:07.267Z'+ created_at: '2026-02-12T12:01:49.699Z'+ updated_at: '2026-02-12T12:01:49.699Z'payment_method:- id: pm_Qj4pLtVavzJYixFGUi18P8OW+ id: pm_UkLWZg9DAJname: Credit Carddescription:type: Spree::Gateway::Bogus@@ -2490,30 +2490,28 @@ paths:application/json:example:data:- - id: prod_ZFuwEco4OJjJXEykYbzYOf00- name: Product 521171+ - id: prod_UkLWZg9DAJ+ name: Product 462639description: |-- Consequatur quae ad numquam error aliquam iure incidunt. Ea dicta distinctio facere eaque ipsam eum fugiat deleniti. Magni totam omnis aliquid maiores. Asperiores rerum sunt in tempora nihil eveniet dolores. Error quos labore provident velit libero ut ducimus voluptatum.- Eos esse quia nam iure. Possimus nihil facilis modi aliquid fugit. Similique accusamus autem maiores dicta aut commodi ut nam. Earum a corrupti consectetur reprehenderit esse expedita consequatur cumque. Iusto debitis nemo velit eius accusamus.- Perspiciatis porro nostrum assumenda aut dignissimos temporibus consectetur. Rerum sequi ea non at id nobis. Odio odit quibusdam ab ea inventore laborum illum. Consectetur quam dolorem eligendi iste asperiores ut quo sunt. Excepturi unde omnis mollitia numquam voluptas odit.- Aliquam perspiciatis illum necessitatibus consequuntur. Ullam harum tempore explicabo quae excepturi voluptatibus. Consequuntur suscipit exercitationem eveniet aut quibusdam. Delectus quis dicta harum doloremque dolorum debitis atque eos.- Esse voluptatibus suscipit odio quas quae aut. Ullam consequuntur impedit at alias corrupti nostrum facere eius. Unde ducimus quo repellat voluptatum et nihil. Atque ad accusamus quia iure natus consequuntur.- slug: product-521171+ Inventore excepturi error doloremque provident cumque. Dignissimos aut rerum maiores odio libero non occaecati. Cumque doloremque hic autem magni tempora. Blanditiis eligendi voluptatibus illum qui modi alias voluptas.+ Commodi saepe rem numquam aspernatur tempore. Accusantium esse quaerat officia eos. Maxime quae earum animi dolorem totam. Ipsa nam maxime exercitationem rem facere quasi earum possimus.+ Impedit incidunt aliquid inventore iste sit laboriosam. Qui natus ducimus iusto sed quam. Ut quia dicta hic veniam magnam nam molestias asperiores.+ slug: product-462639meta_description:meta_keywords:variant_count: 1- available_on: '2025-02-06T14:40:08.735Z'- created_at: '2026-02-06T14:40:08.754Z'- updated_at: '2026-02-06T14:40:08.841Z'+ available_on: '2025-02-12T12:01:50.449Z'+ created_at: '2026-02-12T12:01:50.473Z'+ updated_at: '2026-02-12T12:01:50.564Z'purchasable: truein_stock: falsebackorderable: trueavailable: true- default_variant_id: variant_smhHpMENT5U5l46NqnS7cENU+ default_variant_id: variant_gbHJdmfrXBthumbnail_url:tags: []price:- id: price_P2mal7DhqVRQQCoB8jPQnhGd+ id: price_gbHJdmfrXBamount: '19.99'amount_in_cents: 1999compare_at_amount:@@ -2523,27 +2521,30 @@ paths:display_compare_at_amount:price_list_id:original_price:- - id: prod_3GnP4KK0lNiaufg7Lbv7iy6H- name: Product 534138+ - id: prod_gbHJdmfrXB+ name: Product 477231description: |-- Repellat quos quas asperiores laborum rerum excepturi maxime rem. Dolor numquam quo non vel tempore iste. Corporis praesentium voluptates neque iusto. Eum quas eaque voluptates magni voluptas nobis.- Animi nobis nostrum laborum magni voluptas. Facilis rem cumque libero eligendi ratione. Dolorum culpa possimus vitae optio.- slug: product-534138+ Consequuntur maxime culpa tempore eius expedita dolorum cupiditate. Eligendi inventore odio consequatur soluta est nulla. Earum delectus occaecati sit aliquam commodi. Explicabo cupiditate doloremque itaque nostrum nam veritatis et iusto.+ Ipsum impedit saepe explicabo quo repellendus. Cumque necessitatibus veniam quisquam corrupti repudiandae qui. Tempore autem alias corrupti dolores quos eius repudiandae repellat.+ Dignissimos facere ratione animi et. Consequuntur quod perferendis itaque odio voluptatibus. Inventore rem quisquam aut repellat magnam. Dolores voluptatem eum fugit quis.+ Minus provident ex distinctio laudantium ab soluta eum. A commodi natus exercitationem nobis sunt nam. Nulla quaerat consequuntur omnis illum consequatur.+ Temporibus quo in minus fugit saepe hic pariatur. Asperiores officia vel explicabo voluptates eius voluptatibus repudiandae. Unde tenetur rem tempore voluptatibus earum velit sint. Officiis repellendus iste deleniti iure ipsum aspernatur error.+ slug: product-477231meta_description:meta_keywords:variant_count: 0- available_on: '2025-02-06T14:40:08.860Z'- created_at: '2026-02-06T14:40:08.871Z'- updated_at: '2026-02-06T14:40:08.897Z'+ available_on: '2025-02-12T12:01:50.583Z'+ created_at: '2026-02-12T12:01:50.594Z'+ updated_at: '2026-02-12T12:01:50.623Z'purchasable: truein_stock: falsebackorderable: trueavailable: true- default_variant_id: variant_OfFahP6ojxOxGfqSU5qwbwXG+ default_variant_id: variant_EfhxLZ9ck8thumbnail_url:tags: []price:- id: price_0tgapseC6knzp3YtUxrp3k9Q+ id: price_EfhxLZ9ck8amount: '19.99'amount_in_cents: 1999compare_at_amount:@@ -2618,27 +2619,28 @@ paths:content:application/json:example:- id: prod_ANWSdNCpMJ6W3wLtBa1V8S5y- name: Product 641415+ id: prod_UkLWZg9DAJ+ name: Product 581164description: |-- Et distinctio ipsum suscipit quos ratione nobis modi optio. Sapiente sed voluptate explicabo ipsa aliquid. Modi unde a ipsa perferendis velit fuga. In qui explicabo temporibus distinctio fuga atque harum rerum. Incidunt vero repellendus illo accusantium eius.- Ducimus necessitatibus ab nesciunt eveniet dolorum doloremque. Placeat corrupti repellat quas minus. Voluptate numquam eaque aliquam nulla inventore dignissimos iste itaque.- slug: product-641415+ Quos perferendis veritatis beatae sint. Natus laboriosam blanditiis minima nemo quae accusamus. Error quos aut sit magni illo. Mollitia voluptate ex aperiam culpa nostrum consequuntur cupiditate a.+ Provident aut nemo tempore amet. Aspernatur possimus explicabo adipisci iure rem dolorum molestiae itaque. Illum provident consequatur amet ea. Temporibus magnam atque totam ut. Blanditiis esse culpa distinctio numquam porro quam unde.+ Quod modi perferendis id magnam. Odio laborum ex reiciendis amet. Voluptatem consectetur dolores id incidunt.+ slug: product-581164meta_description:meta_keywords:variant_count: 1- available_on: '2025-02-06T14:40:10.262Z'- created_at: '2026-02-06T14:40:10.287Z'- updated_at: '2026-02-06T14:40:10.375Z'+ available_on: '2025-02-12T12:01:51.957Z'+ created_at: '2026-02-12T12:01:51.974Z'+ updated_at: '2026-02-12T12:01:52.056Z'purchasable: truein_stock: falsebackorderable: trueavailable: true- default_variant_id: variant_VAXq5GbqbIR4bAMchWaUdCiz+ default_variant_id: variant_gbHJdmfrXBthumbnail_url:tags: []price:- id: price_QMMhpVxPbqqRi4u1OoTj0EMT+ id: price_gbHJdmfrXBamount: '19.99'amount_in_cents: 1999compare_at_amount:@@ -2715,12 +2717,12 @@ paths:- id: out_of_stocklabel: Out of Stockcount: 2- - id: opt_xxSOhQloZqEBuONniwwmcnnV+ - id: opt_UkLWZg9DAJtype: optionlabel: Sizename: sizeoptions:- - id: optval_Y3CRmRoQGkz9N0g56RJOTe6W+ - id: optval_UkLWZg9DAJlabel: Sname: smallposition: 1@@ -2729,7 +2731,7 @@ paths:type: taxonlabel: Categoryoptions:- - id: txn_GaxjI1AUCGu12KWdZskGTWdt+ - id: txn_p6klVeMgbnlabel: Shirtspermalink: taxonomy-9/taxon-9/shirtscount: 2@@ -2833,24 +2835,24 @@ paths:application/json:example:data:- - id: ship_vPe4SWF89FFYxRWEKoyPYe6N- number: H98009449688+ - id: ship_UkLWZg9DAJ+ number: H05918360238state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-06T14:40:14.826Z'- updated_at: '2026-02-06T14:40:14.850Z'+ created_at: '2026-02-12T12:01:55.994Z'+ updated_at: '2026-02-12T12:01:56.044Z'shipping_method:- id: shpm_Pv5BcdnraG5ITlj4p3RZiMmS+ id: shpm_UkLWZg9DAJname: UPS Groundcode: UPS_GROUNDstock_location:- id: sloc_M2ASP4YyLd8vJKuo5LrkDohH+ id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_195- name: Nigel Beahan+ name: Whitney Boyleaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -2858,14 +2860,14 @@ paths:country_name: United States of Americastate_text: STATE_ABBR_195shipping_rates:- - id: shpr_1mOgHm4J4vy4zOFTxcZSrwM5- shipping_method_id: shpm_Pv5BcdnraG5ITlj4p3RZiMmS+ - id: shpr_UkLWZg9DAJ+ shipping_method_id: shpm_UkLWZg9DAJname: UPS Groundselected: truecost: 100.0display_cost: "$100.00"shipping_method:- id: shpm_Pv5BcdnraG5ITlj4p3RZiMmS+ id: shpm_UkLWZg9DAJname: UPS Groundcode: UPS_GROUNDmeta:@@ -2946,24 +2948,24 @@ paths:content:application/json:example:- id: ship_do7Doe7PhwEYP10ZTpuC22za- number: H25706191715+ id: ship_UkLWZg9DAJ+ number: H85986231539state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-06T14:40:17.251Z'- updated_at: '2026-02-06T14:40:17.270Z'+ created_at: '2026-02-12T12:01:57.508Z'+ updated_at: '2026-02-12T12:01:57.537Z'shipping_method:- id: shpm_1IoSYUNYqvbjmCWCi5kxYfPA+ id: shpm_UkLWZg9DAJname: UPS Groundcode: UPS_GROUNDstock_location:- id: sloc_59A8wug2JpRHFsuxMibAarxB+ id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_203- name: Verda Fay+ name: Janette Towneaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -2971,14 +2973,14 @@ paths:country_name: United States of Americastate_text: STATE_ABBR_203shipping_rates:- - id: shpr_nB313PNootpccMQGqmEe62AK- shipping_method_id: shpm_1IoSYUNYqvbjmCWCi5kxYfPA+ - id: shpr_UkLWZg9DAJ+ shipping_method_id: shpm_UkLWZg9DAJname: UPS Groundselected: truecost: 100.0display_cost: "$100.00"shipping_method:- id: shpm_1IoSYUNYqvbjmCWCi5kxYfPA+ id: shpm_UkLWZg9DAJname: UPS Groundcode: UPS_GROUNDschema:@@ -3035,24 +3037,24 @@ paths:content:application/json:example:- id: ship_AKBrQDGUIwQhN6v2ICGdQSI3- number: H89729538697+ id: ship_UkLWZg9DAJ+ number: H40007257236state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-06T14:40:19.742Z'- updated_at: '2026-02-06T14:40:19.809Z'+ created_at: '2026-02-12T12:01:58.892Z'+ updated_at: '2026-02-12T12:01:58.944Z'shipping_method:- id: shpm_1iM08v42LavmUi7FMxtUya9W+ id: shpm_UkLWZg9DAJname: UPS Groundcode: UPS_GROUNDstock_location:- id: sloc_zAO1RgJl3gZdKqHTj6OCVUdt+ id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_211- name: Wendy Padberg+ name: Felice Kulasaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -3060,14 +3062,14 @@ paths:country_name: United States of Americastate_text: STATE_ABBR_211shipping_rates:- - id: shpr_F3YEik5Q8tXphsiCljcHyfxi- shipping_method_id: shpm_1iM08v42LavmUi7FMxtUya9W+ - id: shpr_UkLWZg9DAJ+ shipping_method_id: shpm_UkLWZg9DAJname: UPS Groundselected: truecost: 100.0display_cost: "$100.00"shipping_method:- id: shpm_1iM08v42LavmUi7FMxtUya9W+ id: shpm_UkLWZg9DAJname: UPS Groundcode: UPS_GROUNDschema:@@ -3113,22 +3115,22 @@ paths:content:application/json:example:- id: store_Z2FhNADEv8Zs1xlhw3qlDs1o+ id: store_UkLWZg9DAJname: Spree Test Storeurl: www.example.commeta_description: Sample store description.meta_keywords:seo_title:default_currency: USD- code: spree_22+ code: spree_1default: truefacebook: spreecommercetwitter: spreecommerceinstagram: spreecommercecustomer_support_email: [email protected]default_locale: en- created_at: '2026-02-06T14:40:21.080Z'- updated_at: '2026-02-06T14:40:21.160Z'+ created_at: '2026-02-12T12:01:11.353Z'+ updated_at: '2026-02-12T12:01:11.454Z'default_country_iso: USsupported_currencies:- USD@@ -3190,36 +3192,36 @@ paths:application/json:example:data:- - id: txnmy_hWtD79RfBAY4ZoZ7vUaIPUSy+ - id: txnmy_UkLWZg9DAJname: Categoriesposition: 1- created_at: '2026-02-06T14:40:21.239Z'- updated_at: '2026-02-06T14:40:21.247Z'- root_id: txn_4BWQYKBMZZG4Ser9RSPscf0F- - id: txnmy_fduZHUpl336hiC961gYxd11h+ created_at: '2026-02-12T12:01:11.361Z'+ updated_at: '2026-02-12T12:01:11.380Z'+ root_id: txn_UkLWZg9DAJ+ - id: txnmy_gbHJdmfrXBname: Brandsposition: 2- created_at: '2026-02-06T14:40:21.247Z'- updated_at: '2026-02-06T14:40:21.255Z'- root_id: txn_Cp4h3ZKu0GVoGDaMYNE5dcU3- - id: txnmy_S5FLY6bunlIhNTCwmLiIJo6L+ created_at: '2026-02-12T12:01:11.381Z'+ updated_at: '2026-02-12T12:01:11.390Z'+ root_id: txn_gbHJdmfrXB+ - id: txnmy_EfhxLZ9ck8name: Collectionsposition: 3- created_at: '2026-02-06T14:40:21.256Z'- updated_at: '2026-02-06T14:40:21.312Z'- root_id: txn_ZI3XmqntBvAkjsyi3nn4newy- - id: txnmy_goQaz0338Hg8TODIKotIhBcm+ created_at: '2026-02-12T12:01:11.391Z'+ updated_at: '2026-02-12T12:01:11.460Z'+ root_id: txn_EfhxLZ9ck8+ - id: txnmy_VqXmZF31wYname: taxonomy_11position: 4- created_at: '2026-02-06T14:40:21.326Z'- updated_at: '2026-02-06T14:40:21.336Z'- root_id: txn_kLaonWhXaayXw6vhd3Enh8FK- - id: txnmy_13gC4u12PVSR4HQ2uE0HdoqO+ created_at: '2026-02-12T12:01:59.654Z'+ updated_at: '2026-02-12T12:01:59.667Z'+ root_id: txn_OIJLhNcSbf+ - id: txnmy_uw2YK1rnl0name: taxonomy_12position: 5- created_at: '2026-02-06T14:40:21.337Z'- updated_at: '2026-02-06T14:40:21.346Z'- root_id: txn_7yKUdv2B7NyWOFgWrvCE0QRV+ created_at: '2026-02-12T12:01:59.668Z'+ updated_at: '2026-02-12T12:01:59.677Z'+ root_id: txn_AXs1igzRC6meta:page: 1limit: 25@@ -3281,12 +3283,12 @@ paths:content:application/json:example:- id: txnmy_JUfSWASNJHGbpMzPhIxkvwz4+ id: txnmy_VqXmZF31wYname: taxonomy_17position: 4- created_at: '2026-02-06T14:40:21.611Z'- updated_at: '2026-02-06T14:40:21.619Z'- root_id: txn_EM67DRCfcllt6yPfzWAvVW6U+ created_at: '2026-02-12T12:01:59.951Z'+ updated_at: '2026-02-12T12:01:59.963Z'+ root_id: txn_OIJLhNcSbfschema:"$ref": "#/components/schemas/StoreTaxonomy"'404':@@ -3332,7 +3334,7 @@ paths:content:application/json:example:- id: txn_3fhrDGLdjw1Gp8W44z6Oc0cC+ id: txn_AXs1igzRC6name: taxon_14permalink: taxonomy-28/taxon-14position: 0@@ -3341,10 +3343,10 @@ paths:meta_description:meta_keywords:children_count: 1- created_at: '2026-02-06T14:40:22.482Z'- updated_at: '2026-02-06T14:40:22.498Z'- parent_id: txn_SsSkddzjmZ7jeYP7iIuusqu8- taxonomy_id: txnmy_VPIGSARWH8rv27gPn4XPmSYt+ created_at: '2026-02-12T12:02:00.680Z'+ updated_at: '2026-02-12T12:02:00.696Z'+ parent_id: txn_OIJLhNcSbf+ taxonomy_id: txnmy_VqXmZF31wYdescription: ''description_html: ''image_url:@@ -3411,11 +3413,11 @@ paths:application/json:example:data:- - id: wl_3brok9utIgSHVtVqTjlfNiFZ+ - id: wl_UkLWZg9DAJname: My Wishlist- token: h96L9CnJgB7jCEgBnPh4ficE- created_at: '2026-02-06T14:40:24.437Z'- updated_at: '2026-02-06T14:40:24.437Z'+ token: UvaZYH7qd34iTRLAW4CMFhN6+ created_at: '2026-02-12T12:02:01.850Z'+ updated_at: '2026-02-12T12:02:01.850Z'is_default: falseis_private: truemeta:@@ -3472,11 +3474,11 @@ paths:content:application/json:example:- id: wl_iaJZLNNLwC4MFMks6S8vGx64+ id: wl_gbHJdmfrXBname: Birthday Ideas- token: cDMkXtCwRorG9hDgY6fGES5w- created_at: '2026-02-06T14:40:26.854Z'- updated_at: '2026-02-06T14:40:26.854Z'+ token: n6itndWq5FQYHLWpRLbv2dmu+ created_at: '2026-02-12T12:02:03.277Z'+ updated_at: '2026-02-12T12:02:03.277Z'is_default: falseis_private: trueschema:@@ -3544,11 +3546,11 @@ paths:content:application/json:example:- id: wl_RPnMJAp4xbcF8M1Jh4VcEBgH+ id: wl_UkLWZg9DAJname: My Wishlist- token: E9BBjjDnxcsfbBsdZPfQEsmb- created_at: '2026-02-06T14:40:29.181Z'- updated_at: '2026-02-06T14:40:29.181Z'+ token: m9PJ39Zvmxupu4cSYNxcUrCm+ created_at: '2026-02-12T12:02:04.472Z'+ updated_at: '2026-02-12T12:02:04.472Z'is_default: falseis_private: trueschema:@@ -3592,11 +3594,11 @@ paths:content:application/json:example:- id: wl_iDXgQGAjVTvFEDsRx3Unqfpk+ id: wl_UkLWZg9DAJname: Updated Name- token: 4AJMCvgYsikQgkTE8GtDHSKW- created_at: '2026-02-06T14:40:31.638Z'- updated_at: '2026-02-06T14:40:31.712Z'+ token: XVxn838i1XSfvgstzRL4JcoC+ created_at: '2026-02-12T12:02:05.720Z'+ updated_at: '2026-02-12T12:02:05.805Z'is_default: falseis_private: trueschema:@@ -3670,22 +3672,22 @@ paths:content:application/json:example:- id: wi_dDnOZT7txSNeNKBM8ZbOyJUI- variant_id: variant_ym5Y7cpcImVCSZhU93Q1zWfq- wishlist_id: wl_5tHQCEPuHlaGfEf75A6bXOJR+ id: wi_gbHJdmfrXB+ variant_id: variant_gbHJdmfrXB+ wishlist_id: wl_UkLWZg9DAJquantity: 1- created_at: '2026-02-06T14:40:34.112Z'- updated_at: '2026-02-06T14:40:34.112Z'+ created_at: '2026-02-12T12:02:07.117Z'+ updated_at: '2026-02-12T12:02:07.117Z'variant:- id: variant_ym5Y7cpcImVCSZhU93Q1zWfq- product_id: prod_ZIkSWXwuNPjicfnulsuQEsIm- sku: SKU-117+ id: variant_gbHJdmfrXB+ product_id: prod_gbHJdmfrXB+ sku: SKU-111is_master: trueoptions_text: ''track_inventory: trueimage_count: 0- created_at: '2026-02-06T14:40:34.066Z'- updated_at: '2026-02-06T14:40:34.089Z'+ created_at: '2026-02-12T12:02:07.072Z'+ updated_at: '2026-02-12T12:02:07.095Z'thumbnail:purchasable: truein_stock: false@@ -3695,7 +3697,7 @@ paths:width:depth:price:- id: price_iagNhXtzcVXih6ETsNczEb0W+ id: price_gbHJdmfrXBamount: '19.99'amount_in_cents: 1999compare_at_amount:@@ -3874,7 +3876,7 @@ components:type: stringdescription: JWT access tokenuser:- "$ref": "#/components/schemas/StoreUser"+ "$ref": "#/components/schemas/StoreCustomer"required:- token- user@@ -3928,6 +3930,73 @@ components:- full_name- country_name- country_iso+ AdminCustomer:+ type: object+ properties:+ id:+ type: string+ email:+ type: string+ first_name:+ type: string+ nullable: true+ last_name:+ type: string+ nullable: true+ created_at:+ type: string+ updated_at:+ type: string+ addresses:+ type: array+ items:+ "$ref": "#/components/schemas/StoreAddress"+ default_billing_address:+ allOf:+ - "$ref": "#/components/schemas/StoreAddress"+ nullable: true+ default_shipping_address:+ allOf:+ - "$ref": "#/components/schemas/StoreAddress"+ nullable: true+ phone:+ type: string+ nullable: true+ login:+ type: string+ nullable: true+ accepts_email_marketing:+ type: boolean+ last_sign_in_at:+ type: string+ nullable: true+ current_sign_in_at:+ type: string+ nullable: true+ sign_in_count:+ type: number+ failed_attempts:+ type: number+ last_sign_in_ip:+ type: string+ nullable: true+ current_sign_in_ip:+ type: string+ nullable: true+ orders:+ type: array+ items:+ "$ref": "#/components/schemas/AdminOrder"+ x-typelizer: true+ required:+ - id+ - created_at+ - updated_at+ - addresses+ - accepts_email_marketing+ - sign_in_count+ - failed_attemptsAdminMetafield:type: objectproperties:@@ -4072,7 +4141,7 @@ components:type: stringnullable: trueuser:- "$ref": "#/components/schemas/AdminUser"+ "$ref": "#/components/schemas/AdminCustomer"x-typelizer: truerequired:- id@@ -4369,73 +4438,6 @@ components:- position- created_at- updated_at- AdminUser:- type: object- properties:- id:- type: string- email:- type: string- first_name:- type: string- nullable: true- last_name:- type: string- nullable: true- created_at:- type: string- updated_at:- type: string- addresses:- type: array- items:- "$ref": "#/components/schemas/StoreAddress"- default_billing_address:- allOf:- - "$ref": "#/components/schemas/StoreAddress"- nullable: true- default_shipping_address:- allOf:- - "$ref": "#/components/schemas/StoreAddress"- nullable: true- phone:- type: string- nullable: true- login:- type: string- nullable: true- accepts_email_marketing:- type: boolean- last_sign_in_at:- type: string- nullable: true- current_sign_in_at:- type: string- nullable: true- sign_in_count:- type: number- failed_attempts:- type: number- last_sign_in_ip:- type: string- nullable: true- current_sign_in_ip:- type: string- nullable: true- orders:- type: array- items:- "$ref": "#/components/schemas/AdminOrder"- x-typelizer: true- required:- - id- - created_at- - updated_at- - addresses- - accepts_email_marketing- - sign_in_count- - failed_attemptsAdminVariant:type: objectproperties:@@ -4598,6 +4600,42 @@ components:- month- year- default+ StoreCustomer:+ type: object+ properties:+ id:+ type: string+ email:+ type: string+ first_name:+ type: string+ nullable: true+ last_name:+ type: string+ nullable: true+ created_at:+ type: string+ updated_at:+ type: string+ addresses:+ type: array+ items:+ "$ref": "#/components/schemas/StoreAddress"+ default_billing_address:+ allOf:+ - "$ref": "#/components/schemas/StoreAddress"+ nullable: true+ default_shipping_address:+ allOf:+ - "$ref": "#/components/schemas/StoreAddress"+ nullable: true+ x-typelizer: true+ required:+ - id+ - created_at+ - updated_at+ - addressesStoreDigitalLink:type: objectproperties:@@ -5524,42 +5562,6 @@ components:- position- created_at- updated_at- StoreUser:- type: object- properties:- id:- type: string- email:- type: string- first_name:- type: string- nullable: true- last_name:- type: string- nullable: true- created_at:- type: string- updated_at:- type: string- addresses:- type: array- items:- "$ref": "#/components/schemas/StoreAddress"- default_billing_address:- allOf:- - "$ref": "#/components/schemas/StoreAddress"- nullable: true- default_shipping_address:- allOf:- - "$ref": "#/components/schemas/StoreAddress"- nullable: true- x-typelizer: true- required:- - id- - created_at- - updated_at- - addressesStoreVariant:type: objectproperties:diff --git a/docs/developer/upgrades/5.3-to-5.4.mdx b/docs/developer/upgrades/5.3-to-5.4.mdxindex 807be065c7..be2efb16b2 100644--- a/docs/developer/upgrades/5.3-to-5.4.mdx+++ b/docs/developer/upgrades/5.3-to-5.4.mdx@@ -21,28 +21,11 @@ description: This guide covers upgrading a Spree 5.3 application to Spree 5.4.bin/rake spree:install:migrations && bin/rails db:migrate```-### Backfill Prefix IDs+### Prefixed IDs-Spree 5.4 improves security by masking real IDs, enhancing data privacy and security. Prefixed IDs are also easier to read and understand, eg. Product ID is `prod_ZFuwEco4OJjJXEykYbzYOf00` and order ID is `or_zivmaWd2vkxehVqLOyYeLEa1`.+Spree 5.4 improves security by masking real database IDs with Stripe-style prefixed IDs, enhancing data privacy and preventing enumeration attacks. Prefixed IDs are also easier to read and understand, eg. Product ID is `prod_86Rf07xd4z` and order ID is `or_k5nR8xLq02`.-However this requires a one-time backfill of IDs for existing records. This can be done by running the following command:-- ```bash- bin/rails spree:prefix_ids:backfill- ```--For large databases, you can backfill a single model at a time, which allows you to run multiple backfills in parallel across separate terminals:-- ```bash- bin/rails spree:prefix_ids:backfill MODEL=Spree::Order- bin/rails spree:prefix_ids:backfill MODEL=Spree::LineItem- ```--To check progress at any time:-- ```bash- bin/rails spree:prefix_ids:status- ```+Prefixed IDs are computed on the fly using [Sqids](https://sqids.org/) encoding of integer primary keys. No database migration or backfill is required — they work automatically for all existing records.Both new API and Admin Dashboard will use these IDs. `spree_storefront` still uses the old IDs so this update won't disrupt your existing storefront.