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
Deprecate `checkout_zone` on Store in favor of Markets (#13638)
Damian Legawiec52a8364a9d08
diff --git a/backend/engines/admin/app/controllers/spree/admin/markets_controller.rb b/backend/engines/admin/app/controllers/spree/admin/markets_controller.rbindex 2499388c36..b2fab1fca7 100644--- a/backend/engines/admin/app/controllers/spree/admin/markets_controller.rb+++ b/backend/engines/admin/app/controllers/spree/admin/markets_controller.rb@@ -9,7 +9,7 @@ module Spreeprotecteddef load_data- @countries = Spree::Country.order(:name)+ @countries = current_store.countries_with_shipping_coverageenddef permitted_resource_paramsdiff --git a/backend/engines/admin/app/controllers/spree/admin/shipping_methods_controller.rb b/backend/engines/admin/app/controllers/spree/admin/shipping_methods_controller.rbindex b471f22ef8..32cb5c78c7 100644--- a/backend/engines/admin/app/controllers/spree/admin/shipping_methods_controller.rb+++ b/backend/engines/admin/app/controllers/spree/admin/shipping_methods_controller.rb@@ -20,7 +20,7 @@ module Spreeenddef load_data- @available_zones = current_store.supported_shipping_zones+ @available_zones = Spree::Zone.all@tax_categories = Spree::TaxCategory.order(:name)@calculators = Spree::ShippingMethod.calculators@shipping_categories = Spree::ShippingCategory.alldiff --git a/backend/engines/admin/app/controllers/spree/admin/stores_controller.rb b/backend/engines/admin/app/controllers/spree/admin/stores_controller.rbindex 1a9815f21b..1b0a00e8e3 100644--- a/backend/engines/admin/app/controllers/spree/admin/stores_controller.rb+++ b/backend/engines/admin/app/controllers/spree/admin/stores_controller.rb@@ -7,7 +7,6 @@ module Spreebefore_action :normalize_supported_currencies, only: [:update]before_action :normalize_supported_locales, only: [:update]before_action :load_all_countries, only: [:edit, :update]- before_action :load_all_zones, only: [:edit, :update]def editif params[:section] == 'emails'@@ -62,11 +61,6 @@ module Spree@countries = Spree::Country.pluck(:name, :id)end- def load_all_zones- @zones = Spree::Zone.pluck(:name, :id)- @zones.prepend([Spree.t(:no_limits_zone), ' '])- end-def normalize_supported_currenciesif params.dig(:store, :supported_currencies)&.is_a?(Array)params[:store][:supported_currencies] = params[:store][:supported_currencies].compact.uniq.reject(&:blank?).join(',')diff --git a/backend/engines/admin/app/views/spree/admin/promotion_rules/forms/_country.html.erb b/backend/engines/admin/app/views/spree/admin/promotion_rules/forms/_country.html.erbindex 411de7e6ad..086633604e 100644--- a/backend/engines/admin/app/views/spree/admin/promotion_rules/forms/_country.html.erb+++ b/backend/engines/admin/app/views/spree/admin/promotion_rules/forms/_country.html.erb@@ -2,6 +2,6 @@<%= f.label :preferred_country_iso, Spree.t(:country) %><%= f.select :preferred_country_iso,available_countries_iso.map { |iso| [Spree.t(iso, scope: 'country_names', default: iso), iso] },- { selected: f.object.preferred_country_iso || current_store.default_country_iso },+ { selected: f.object.preferred_country_iso || current_store.default_market&.default_country&.iso },{ data: { controller: 'autocomplete-select' } } %></div>diff --git a/backend/engines/admin/app/views/spree/admin/stores/form/_checkout.html.erb b/backend/engines/admin/app/views/spree/admin/stores/form/_checkout.html.erbindex 96e674fab7..36c42c550a 100644--- a/backend/engines/admin/app/views/spree/admin/stores/form/_checkout.html.erb+++ b/backend/engines/admin/app/views/spree/admin/stores/form/_checkout.html.erb@@ -8,15 +8,12 @@</div><div class="card-body">- <%= f.spree_select :checkout_zone_id, options_for_select(@zones, @store.checkout_zone_id), { label: Spree.t(:shipping_zone), autocomplete: true } %>- <span class="form-text mb-4">- <%= Spree.t(:shipping_zone_help) %>- <%= link_to Spree.t('admin.manage_zones'), spree.admin_zones_path, class: 'text-blue' %>- </span>+ <p class="text-muted mb-4">+ <%= Spree.t('admin.checkout_settings.countries_managed_by_markets_html',+ link: link_to(Spree.t('admin.markets.list'), spree.admin_markets_path)).html_safe %>+ </p>- <%= f.spree_select :default_country_iso, Spree::Country.pluck(:name, :iso).map { |name, iso| ["#{Spree::Country.iso_to_emoji_flag(iso)} #{name}", iso] }, { include_blank: false, label: Spree.t(:default_country), autocomplete: true, help: Spree.t(:default_country_help) } %>-- <hr class="my-6" />+ <hr class="my-6"><%= f.spree_check_box :preferred_guest_checkout, label: Spree.t('admin.checkout_settings.guest_checkout.label'), help: Spree.t('admin.checkout_settings.guest_checkout.description') %><%= f.spree_check_box :preferred_company_field_enabled, label: Spree.t('admin.store_form.company_field.label'), help: Spree.t('admin.store_form.company_field.description') %>diff --git a/backend/engines/admin/config/locales/en.yml b/backend/engines/admin/config/locales/en.ymlindex 30c3d5d943..efadaf82e3 100644--- a/backend/engines/admin/config/locales/en.yml+++ b/backend/engines/admin/config/locales/en.yml@@ -74,6 +74,7 @@ en:description: Links to these pages will be displayed in the checkout footer.label: Checkout linkscheckout_message_description: Visible to your customers on the checkout page in the right sidebar.+ countries_managed_by_markets_html: Countries and shipping zones are managed through %{link}.guest_checkout:description: Allow customers to checkout without creating an account.label: Allow guest checkoutdiff --git a/backend/engines/admin/spec/controllers/spree/admin/markets_controller_spec.rb b/backend/engines/admin/spec/controllers/spree/admin/markets_controller_spec.rbindex 9720eb12c2..90b867d4cc 100644--- a/backend/engines/admin/spec/controllers/spree/admin/markets_controller_spec.rb+++ b/backend/engines/admin/spec/controllers/spree/admin/markets_controller_spec.rb@@ -5,8 +5,16 @@ RSpec.describe Spree::Admin::MarketsController, type: :controller dostub_authorization!let(:store) { @default_store }+ let(:shipping_zone) do+ zone = create(:zone, name: 'Test Shipping Zone', kind: 'country')+ zone.zone_members.create!(zoneable: country)+ create(:shipping_method, zones: [zone])+ zone+ endlet(:country) { create(:country) }+ before { shipping_zone }+describe 'GET #index' dolet!(:market) { create(:market, store: store, countries: [country]) }diff --git a/backend/engines/admin/spec/controllers/spree/admin/shipping_methods_controller_spec.rb b/backend/engines/admin/spec/controllers/spree/admin/shipping_methods_controller_spec.rbindex ea87afe5ff..0437258269 100644--- a/backend/engines/admin/spec/controllers/spree/admin/shipping_methods_controller_spec.rb+++ b/backend/engines/admin/spec/controllers/spree/admin/shipping_methods_controller_spec.rb@@ -20,7 +20,7 @@ describe Spree::Admin::ShippingMethodsController, type: :controller doget :newexpect(assigns(:shipping_method).display_on).to eq('both')expect(assigns(:shipping_method).shipping_categories).to eq([shipping_category])- expect(assigns(:shipping_method).zone_ids).to match_array(store.supported_shipping_zones.map(&:id))+ expect(assigns(:shipping_method).zone_ids).to match_array(Spree::Zone.pluck(:id))expect(assigns(:shipping_method).calculator_type).to eq(Spree::ShippingMethod.calculators.first.name)endenddiff --git a/backend/engines/admin/spec/controllers/spree/admin/stores_controller_spec.rb b/backend/engines/admin/spec/controllers/spree/admin/stores_controller_spec.rbindex 6406dbc54f..02da09c49d 100644--- a/backend/engines/admin/spec/controllers/spree/admin/stores_controller_spec.rb+++ b/backend/engines/admin/spec/controllers/spree/admin/stores_controller_spec.rb@@ -42,7 +42,6 @@ describe Spree::Admin::StoresController do{name: 'New Store Name',default_currency: 'GBR',- default_country_iso: 'GB',default_locale: 'pl',preferred_timezone: 'Europe/Warsaw',preferred_weight_unit: 'kg',@@ -52,16 +51,11 @@ describe Spree::Admin::StoresController dolet(:other_params) { {} }- before do- store.update!(checkout_zone: nil)- end-it 'updates the store data' dosubjectexpect(store.reload.name).to eq('New Store Name')expect(store.default_currency).to eq('GBR')- expect(store.default_country).to eq(uk_country)expect(store.default_locale).to eq('pl')expect(store.preferred_timezone).to eq('Europe/Warsaw')diff --git a/backend/engines/api/app/serializers/spree/api/v3/store_serializer.rb b/backend/engines/api/app/serializers/spree/api/v3/store_serializer.rbindex a7562ebcd2..06044236c0 100644--- a/backend/engines/api/app/serializers/spree/api/v3/store_serializer.rb+++ b/backend/engines/api/app/serializers/spree/api/v3/store_serializer.rb@@ -4,26 +4,17 @@ module Spreeclass StoreSerializer < BaseSerializertypelize name: :string, url: :string, meta_description: [:string, nullable: true],meta_keywords: [:string, nullable: true], seo_title: [:string, nullable: true],- default_currency: :string, code: :string, default: :boolean,+ code: :string,facebook: [:string, nullable: true], twitter: [:string, nullable: true], instagram: [:string, nullable: true],- customer_support_email: [:string, nullable: true], default_locale: :string,- supported_currencies: [:string, multi: true], favicon_image_url: [:string, nullable: true],- logo_image_url: [:string, nullable: true], social_image_url: [:string, nullable: true],- supported_locales: [:string, multi: true], default_country_iso: [:string, nullable: true]+ customer_support_email: [:string, nullable: true],+ favicon_image_url: [:string, nullable: true],+ logo_image_url: [:string, nullable: true], social_image_url: [:string, nullable: true]attributes :name, :url, :meta_description, :meta_keywords, :seo_title,- :default_currency, :code, :default, :facebook, :twitter,- :instagram, :customer_support_email, :default_locale,+ :code, :facebook, :twitter,+ :instagram, :customer_support_email,created_at: :iso8601, updated_at: :iso8601- attribute :default_country_iso do |store|- store.default_country&.iso- end-- attribute :supported_currencies do |store|- store.supported_currencies_list.map(&:iso_code)- end-attribute :favicon_image_url do |store|image_url_for(store.favicon_image)end@@ -36,10 +27,6 @@ module Spreeimage_url_for(store.social_image)end- attribute :supported_locales do |store|- store.supported_locales_list- end-many :payment_methods,proc { |payment_methods, _params|payment_methods.select { |pm| pm.available_on_front_end? && pm.active? }diff --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 73369f64e6..7d2c21f06b 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@@ -20,13 +20,7 @@ RSpec.describe Spree::Api::V3::Store::StoresController, type: :controller doit 'returns store attributes' doget :show- expect(json_response).to include('id', 'name', 'url', 'default_currency')- end-- it 'returns store settings' do- get :show-- expect(json_response['default_currency']).to eq(store.default_currency)+ expect(json_response).to include('id', 'name', 'url', 'code')endcontext 'without API key' dodiff --git a/backend/engines/api/spec/integration/spree/api/v3/store/stores_spec.rb b/backend/engines/api/spec/integration/spree/api/v3/store/stores_spec.rbindex ed045318fd..1754b62bb5 100644--- a/backend/engines/api/spec/integration/spree/api/v3/store/stores_spec.rb+++ b/backend/engines/api/spec/integration/spree/api/v3/store/stores_spec.rb@@ -24,7 +24,6 @@ RSpec.describe 'Store API', type: :request, swagger_doc: 'api-reference/store.yaexpect(data['id']).to be_presentexpect(data['name']).to eq(store.name)expect(data['url']).to eq(store.url)- expect(data['default_currency']).to eq(store.default_currency)endenddiff --git a/backend/engines/core/app/helpers/spree/addresses_helper.rb b/backend/engines/core/app/helpers/spree/addresses_helper.rbindex f734ee5e0d..cf3e285339 100644--- a/backend/engines/core/app/helpers/spree/addresses_helper.rb+++ b/backend/engines/core/app/helpers/spree/addresses_helper.rb@@ -4,8 +4,7 @@ module Spreedef address_form_countries_states_cache_key@address_form_countries_states_cache_key ||= [I18n.locale,- current_store.cache_key_with_version,- current_store.checkout_zone&.cache_key_with_version+ current_store.cache_key_with_version].compactenddiff --git a/backend/engines/core/app/models/concerns/spree/stores/markets.rb b/backend/engines/core/app/models/concerns/spree/stores/markets.rbindex 67ef94c869..996135ca48 100644--- a/backend/engines/core/app/models/concerns/spree/stores/markets.rb+++ b/backend/engines/core/app/models/concerns/spree/stores/markets.rb@@ -13,6 +13,26 @@ module Spree@default_market ||= Spree::Market.default_for_store(self)end+ # Returns the default country, derived from the default market+ # @return [Spree::Country, nil]+ def default_country+ if has_markets?+ default_market&.default_country+ else+ super+ end+ end++ # Returns the default country ID, derived from the default market+ # @return [Integer, nil]+ def default_country_id+ if has_markets?+ default_country&.id+ else+ read_attribute(:default_country_id)+ end+ end+# Returns the default locale, delegating to the default market when markets exist# Falls back to the store's own default_locale column# @return [String, nil]@@ -50,14 +70,14 @@ module Spree.order(:name)end- # Returns the countries available for checkout, derived from markets or checkout_zone+ # Returns the countries available for checkout, derived from markets# @return [Array<Spree::Country>]def countries_available_for_checkout@countries_available_for_checkout ||= Rails.cache.fetch(countries_available_for_checkout_cache_key) doif markets.any?markets.flat_map(&:countries).uniq.sort_by(&:name)else- (checkout_zone.try(:country_list) || Spree::Country.all).to_a+ Spree::Country.all.to_aendendenddiff --git a/backend/engines/core/app/models/spree/current.rb b/backend/engines/core/app/models/spree/current.rbindex e9227621d0..594199489d 100644--- a/backend/engines/core/app/models/spree/current.rb+++ b/backend/engines/core/app/models/spree/current.rb@@ -15,7 +15,7 @@ module Spreeenddef zone- super || Spree::Zone.default_tax || store&.checkout_zone+ super || Spree::Zone.default_taxenddef price_listsdiff --git a/backend/engines/core/app/models/spree/market.rb b/backend/engines/core/app/models/spree/market.rbindex 4a44b4b803..cce5b28542 100644--- a/backend/engines/core/app/models/spree/market.rb+++ b/backend/engines/core/app/models/spree/market.rb@@ -10,7 +10,7 @@ module Spree## Associations#- belongs_to :store, class_name: 'Spree::Store'+ belongs_to :store, class_name: 'Spree::Store', touch: truehas_many :market_countries, class_name: 'Spree::MarketCountry', dependent: :destroyhas_many :countries, through: :market_countries, class_name: 'Spree::Country'@@ -58,6 +58,13 @@ module Spreestore.markets.default.first || store.markets.order(:position).firstend+ # Returns the first country by name from this market's countries+ #+ # @return [Spree::Country, nil]+ def default_country+ countries.order(:name).first+ end+# Returns supported locales as an array, always including default_locale## @return [Array<String>]diff --git a/backend/engines/core/app/models/spree/market_country.rb b/backend/engines/core/app/models/spree/market_country.rbindex 5553c7761e..6ffb47c04c 100644--- a/backend/engines/core/app/models/spree/market_country.rb+++ b/backend/engines/core/app/models/spree/market_country.rb@@ -7,5 +7,19 @@ module Spreevalidates :market, :country, presence: truevalidates :country_id, uniqueness: { scope: :market_id }+ validate :country_covered_by_shipping_zone++ private++ def country_covered_by_shipping_zone+ return if market.blank? || country.blank?++ store = market.store+ return if store.blank?++ unless store.countries_with_shipping_coverage.exists?(id: country.id)+ errors.add(:country, :not_in_shipping_zone)+ end+ endendenddiff --git a/backend/engines/core/app/models/spree/promotion/rules/country.rb b/backend/engines/core/app/models/spree/promotion/rules/country.rbindex 22141a940e..de100fca8e 100644--- a/backend/engines/core/app/models/spree/promotion/rules/country.rb+++ b/backend/engines/core/app/models/spree/promotion/rules/country.rb@@ -30,7 +30,7 @@ module Spreedef validate_eligibility_by_country_iso(order)country_iso = order.ship_address&.country_iso- return true if country_iso == (preferred_country_iso || order.store.default_country_iso)+ return true if country_iso == (preferred_country_iso || order.store.default_market&.default_country&.iso)eligibility_errors.add(:base, eligibility_error_message(:wrong_country))falsediff --git a/backend/engines/core/app/models/spree/store.rb b/backend/engines/core/app/models/spree/store.rbindex 4ed8d564ee..b6480dd974 100644--- a/backend/engines/core/app/models/spree/store.rb+++ b/backend/engines/core/app/models/spree/store.rb@@ -136,7 +136,7 @@ module Spree# Validations#with_options presence: true do- validates :name, :url, :mail_from_address, :default_country, :code+ validates :name, :url, :mail_from_address, :codeendvalidates :preferred_digital_asset_authorized_clicks, numericality: { only_integer: true, greater_than: 0 }validates :preferred_digital_asset_authorized_days, numericality: { only_integer: true, greater_than: 0 }@@ -160,9 +160,9 @@ module Spree## Callbacks- before_validation :ensure_default_countrybefore_validation :set_default_code, on: :createbefore_save :ensure_default_exists_and_is_unique+ after_create :ensure_default_marketafter_create :ensure_default_taxonomies_are_createdafter_create :ensure_default_automatic_taxonsafter_create :ensure_default_post_categories_are_created@@ -177,7 +177,6 @@ module Spree## Delegations#- delegate :iso, to: :default_country, prefix: true, allow_nil: truedef self.current(_url = nil)Spree::Current.store@@ -203,6 +202,22 @@ module SpreeSpree::Store.default&.supported_locales_list || []end+ # @deprecated Use Markets instead. Will be removed in Spree 5.5.+ def checkout_zone+ Spree::Deprecation.warn('Store#checkout_zone is deprecated and will be removed in Spree 5.5. Use Markets instead.')+ super+ end++ # @deprecated Use Markets instead. Will be removed in Spree 5.5.+ def checkout_zone=(zone)+ Spree::Deprecation.warn('Store#checkout_zone= is deprecated and will be removed in Spree 5.5. Use Markets instead.')+ super+ end++ # Virtual attribute — sets the country for the default market created on store creation.+ # Not persisted on the store itself; only used by the after_create callback.+ attr_reader :default_country_iso+def default_country_iso=(iso)return if iso.blank?@@ -210,10 +225,11 @@ module Spreecountry = Spree::Country.by_iso(iso)- if country.present?- self.default_country = country- elsif iso_country = ::Country[iso]- new_country = Spree::Country.create!(+ unless country+ iso_country = ::Country[iso]+ return unless iso_country++ country = Spree::Country.create!(iso_name: iso_country.local_name&.upcase,iso: iso_country.alpha2,iso3: iso_country.alpha3,@@ -222,9 +238,9 @@ module Spreestates_required: Spree::Address::STATES_REQUIRED.include?(iso),zipcode_required: !Spree::Address::NO_ZIPCODE_ISO_CODES.include?(iso))-- self.default_country = new_countryend++ @default_country_for_market = countryenddef seo_meta_description@@ -276,21 +292,55 @@ module Spreeformatted_urlend- # Returns the states available for checkout for the store or creates a new one if it doesn't exist+ # Returns the states available for checkout for the store# @param country [Spree::Country] the country to get the states for# @return [Array<Spree::State>]def states_available_for_checkout(country)Rails.cache.fetch(states_available_for_checkout_cache_key(country)) do- (checkout_zone.try(:state_list_for, country) || country.states).to_a+ country.states.to_aendend+ # @deprecated Use {Spree::Zone.all} or {#countries_with_shipping_coverage} instead.+ # Will be removed in Spree 5.5.def supported_shipping_zones- @supported_shipping_zones ||= if checkout_zone.present?- [checkout_zone]- else- Spree::Zone.includes(zone_members: :zoneable).all- end+ Spree::Deprecation.warn(+ 'Store#supported_shipping_zones is deprecated and will be removed in Spree 5.5. ' \+ 'Use Spree::Zone.all or Store#countries_with_shipping_coverage instead.'+ )+ zone = Spree::Zone.find_by(id: read_attribute(:checkout_zone_id))+ if zone.present?+ [zone]+ else+ Spree::Zone.includes(zone_members: :zoneable).all+ end+ end++ # Returns countries covered by at least one shipping zone+ # that has an active shipping method attached.+ # Handles both country-type zones (direct membership) and+ # state-type zones (country inferred from state).+ #+ # @return [ActiveRecord::Relation<Spree::Country>]+ def countries_with_shipping_coverage+ zone_ids = Spree::Zone+ .joins(:shipping_methods)+ .select(:id)++ country_zone_country_ids = Spree::ZoneMember+ .where(zone_id: zone_ids, zoneable_type: 'Spree::Country')+ .select(:zoneable_id)++ state_zone_country_ids = Spree::State+ .where(id: Spree::ZoneMember+ .where(zone_id: zone_ids, zoneable_type: 'Spree::State')+ .select(:zoneable_id))+ .select(:country_id)++ Spree::Country+ .where(id: country_zone_country_ids)+ .or(Spree::Country.where(id: state_zone_country_ids))+ .order(:name)end# Returns the default stock location for the store or creates a new one if it doesn't exist@@ -339,25 +389,34 @@ module Spreeprivatedef countries_available_for_checkout_cache_key- "#{cache_key_with_version}/#{checkout_zone&.cache_key_with_version}/countries_available_for_checkout"+ "#{cache_key_with_version}/countries_available_for_checkout"enddef states_available_for_checkout_cache_key(country)- "#{cache_key_with_version}/#{checkout_zone&.cache_key_with_version}/states_available_for_checkout/#{country&.cache_key_with_version}"+ "#{cache_key_with_version}/states_available_for_checkout/#{country&.cache_key_with_version}"enddef clear_cacheRails.cache.delete('default_store')end- def ensure_default_country- return if default_country.present? && (checkout_zone.blank? || checkout_zone.country_list.blank? || checkout_zone.country_list.include?(default_country))+ def ensure_default_market+ return if markets.exists?- self.default_country = if checkout_zone.present? && checkout_zone.country_list.any?- checkout_zone.country_list.first- else- Country.find_by(iso: 'US') || Country.first- end+ country = @default_country_for_market+ return if country.blank?++ iso_country = ISO3166::Country[country.iso]++ Spree::Events.disable do+ markets.create!(+ name: country.name,+ currency: iso_country&.currency_code || read_attribute(:default_currency) || 'USD',+ default_locale: iso_country&.languages_official&.first || read_attribute(:default_locale) || 'en',+ default: true,+ countries: [country]+ )+ endenddef ensure_default_taxonomies_are_createddiff --git a/backend/engines/core/app/models/spree/zone.rb b/backend/engines/core/app/models/spree/zone.rbindex 238cf1c423..aa15070d9b 100644--- a/backend/engines/core/app/models/spree/zone.rb+++ b/backend/engines/core/app/models/spree/zone.rb@@ -20,7 +20,6 @@ module Spreeafter_save :remove_defunct_membersafter_save :remove_previous_default, if: %i[default_tax? saved_change_to_default_tax?]- before_destroy :nullify_checkout_zonealias members zone_membersaccepts_nested_attributes_for :zone_members, allow_destroy: true, reject_if: proc { |a| a['zoneable_id'].blank? }@@ -200,10 +199,5 @@ module Spreeendend- def nullify_checkout_zone- if id == Spree::Store.current.checkout_zone_id- Spree::Store.current.update(checkout_zone_id: nil)- end- endendenddiff --git a/backend/engines/core/app/services/spree/seeds/all.rb b/backend/engines/core/app/services/spree/seeds/all.rbindex 4fdc2c2fd3..2a60d0cf2a 100644--- a/backend/engines/core/app/services/spree/seeds/all.rb+++ b/backend/engines/core/app/services/spree/seeds/all.rb@@ -26,7 +26,6 @@ module SpreeAdminUser.call# add store resources- Markets.callPaymentMethods.callendenddiff --git a/backend/engines/core/app/services/spree/seeds/markets.rb b/backend/engines/core/app/services/spree/seeds/markets.rbdeleted file mode 100644index 13d2ba3029..0000000000--- a/backend/engines/core/app/services/spree/seeds/markets.rb+++ /dev/null@@ -1,28 +0,0 @@-module Spree- module Seeds- class Markets- prepend Spree::ServiceModule::Base-- def call- Spree::Store.all.each do |store|- next if store.markets.any?-- countries = if store.checkout_zone.present?- store.checkout_zone.country_list- else- Spree::Country.all- end- next unless countries.any?-- store.markets.create!(- name: 'Default',- currency: store.default_currency,- default_locale: store.default_locale || I18n.locale.to_s,- default: true,- countries: countries- )- end- end- end- end-enddiff --git a/backend/engines/core/app/services/spree/seeds/stores.rb b/backend/engines/core/app/services/spree/seeds/stores.rbindex af3bc2d120..65bb839f66 100644--- a/backend/engines/core/app/services/spree/seeds/stores.rb+++ b/backend/engines/core/app/services/spree/seeds/stores.rb@@ -6,9 +6,7 @@ module Spreedef calldefault_store = Spree::Store.default- if default_store.persisted?- default_store.update!(default_country: Spree::Country.find_by(iso: 'US') || Spree::Country.first)- else+ unless default_store.persisted?Spree::Store.new do |s|s.name = 'Shop's.code = 'shop'@@ -16,7 +14,7 @@ module Sprees.mail_from_address = '[email protected]'s.customer_support_email = '[email protected]'s.default_currency = 'USD'- s.default_country = Spree::Country.find_by(iso: 'US') || Spree::Country.first+ s.default_country_iso = 'US's.default_locale = I18n.localeend.save!enddiff --git a/backend/engines/core/config/locales/en.yml b/backend/engines/core/config/locales/en.ymlindex 8e31fb8f46..8bae23cfb0 100644--- a/backend/engines/core/config/locales/en.yml+++ b/backend/engines/core/config/locales/en.yml@@ -292,6 +292,10 @@ en:attributes:currency:must_match_order_currency: Must match order currency+ spree/market_country:+ attributes:+ country:+ not_in_shipping_zone: is not covered by any shipping zone. Please set up a shipping zone first.spree/payment:attributes:amount:diff --git a/backend/engines/core/lib/spree/core/controller_helpers/store.rb b/backend/engines/core/lib/spree/core/controller_helpers/store.rbindex 04dca5f9db..f14600a4d8 100644--- a/backend/engines/core/lib/spree/core/controller_helpers/store.rb+++ b/backend/engines/core/lib/spree/core/controller_helpers/store.rb@@ -61,7 +61,7 @@ module Spreedef current_tax_zone@current_tax_zone ||= begin- zone = @current_order&.tax_zone || Spree::Zone.default_tax || current_store.checkout_zone+ zone = @current_order&.tax_zone || Spree::Zone.default_taxSpree::Current.zone = zonezoneenddiff --git a/backend/engines/core/lib/spree/core/pricing/context.rb b/backend/engines/core/lib/spree/core/pricing/context.rbindex 647d88c9ba..e8d7dc568f 100644--- a/backend/engines/core/lib/spree/core/pricing/context.rb+++ b/backend/engines/core/lib/spree/core/pricing/context.rb@@ -38,7 +38,7 @@ module Spreevariant: variant,currency: order.currency,store: order.store,- zone: order.tax_zone || order.store.checkout_zone,+ zone: order.tax_zone || Spree::Zone.default_tax,user: order.user,quantity: quantity || order.line_items.find_by(variant: variant)&.quantity,order: orderdiff --git a/backend/engines/core/lib/spree/permitted_attributes.rb b/backend/engines/core/lib/spree/permitted_attributes.rbindex e4fa1686b1..c6020bf34c 100644--- a/backend/engines/core/lib/spree/permitted_attributes.rb+++ b/backend/engines/core/lib/spree/permitted_attributes.rb@@ -275,10 +275,10 @@ module Spreestock_movements_attributes: [:variant_id, :quantity, :originator_id, :stock_item_id]]@@store_attributes = [:name, :url, :seo_title, :code, :meta_keywords,- :meta_description, :default_currency, :mail_from_address,+ :meta_description, :default_currency, :default_country_iso, :mail_from_address,:customer_support_email, :description, :address, :contact_phone,- :supported_locales, :default_locale, :default_country_id, :supported_currencies,- :new_order_notifications_email, :checkout_zone_id, :seo_robots,+ :supported_locales, :default_locale, :supported_currencies,+ :new_order_notifications_email, :seo_robots,:preferred_admin_locale, :preferred_timezone, :preferred_weight_unit, :preferred_unit_system,:preferred_digital_asset_authorized_clicks, :preferred_digital_asset_authorized_days,:preferred_limit_digital_download_count, :preferred_limit_digital_download_days,@@ -286,7 +286,7 @@ module Spree:logo, :mailer_logo, :social_logo, :favicon_image,:checkout_message, :preferred_guest_checkout,:customer_terms_of_service, :customer_privacy_policy,- :customer_returns_policy, :customer_shipping_policy, :default_country_iso]+ :customer_returns_policy, :customer_shipping_policy]@@store_credit_attributes = %i[amount currency category_id memo]diff --git a/backend/engines/core/lib/spree/testing_support/factories/market_factory.rb b/backend/engines/core/lib/spree/testing_support/factories/market_factory.rbindex 2a7552354e..8dd3e0480c 100644--- a/backend/engines/core/lib/spree/testing_support/factories/market_factory.rb+++ b/backend/engines/core/lib/spree/testing_support/factories/market_factory.rb@@ -6,6 +6,21 @@ FactoryBot.define dostorecountries { [association(:country)] }+ after(:build) do |market|+ if market.countries.any?+ zone = Spree::Zone.find_or_create_by!(name: 'Test Shipping Zone') do |z|+ z.kind = 'country'+ end+ market.countries.each do |country|+ zone.zone_members.find_or_create_by!(zoneable: country)+ end+ if zone.shipping_methods.empty?+ shipping_category = Spree::ShippingCategory.first || FactoryBot.create(:shipping_category)+ FactoryBot.create(:shipping_method, zones: [zone], shipping_categories: [shipping_category])+ end+ end+ end+trait :default dodefault { true }enddiff --git a/backend/engines/core/lib/spree/testing_support/store.rb b/backend/engines/core/lib/spree/testing_support/store.rbindex 871ddac659..57326ef037 100644--- a/backend/engines/core/lib/spree/testing_support/store.rb+++ b/backend/engines/core/lib/spree/testing_support/store.rb@@ -18,7 +18,8 @@ RSpec.configure do |config|I18n.with_locale(:en) doSpree::Events.disable do@default_country = Spree::Country.find_by(iso: 'US') || FactoryBot.create(:country_us)- @default_store = Spree::Store.find_by(default: true) || FactoryBot.create(:store, default: true, default_country: @default_country, default_currency: 'USD')+ @default_store = Spree::Store.find_by(default: true) || FactoryBot.create(:store, default: true, default_currency: 'USD')+ @default_store.update_column(:default_country_id, @default_country.id) unless @default_store.read_attribute(:default_country_id) == @default_country.idendendend@@ -28,7 +29,7 @@ RSpec.configure do |config|unless self.class.metadata[:without_global_store]@default_store&.products = []@default_store&.promotions = []- @default_store&.checkout_zone = nil+ @default_store&.update_column(:checkout_zone_id, nil) if @default_store&.read_attribute(:checkout_zone_id).present?@default_store&.payment_methods = []endenddiff --git a/backend/engines/core/lib/tasks/markets.rake b/backend/engines/core/lib/tasks/markets.rakeindex 8eb5110c0c..cca3678b01 100644--- a/backend/engines/core/lib/tasks/markets.rake+++ b/backend/engines/core/lib/tasks/markets.rake@@ -1,26 +1,39 @@namespace :spree donamespace :markets do- desc 'Create default markets for stores that do not have any markets'- task create_defaults: :environment do+ desc 'Migrate checkout zones to markets and nullify checkout_zone_id'+ task migrate_checkout_zones: :environment doSpree::Store.find_each do |store|next if store.markets.exists?- zone = store.checkout_zone- unless zone- puts " Skipping store '#{store.name}' (#{store.code}) — no checkout zone configured"+ checkout_zone_id = store.read_attribute(:checkout_zone_id)+ zone = Spree::Zone.find_by(id: checkout_zone_id) if checkout_zone_id++ countries = if zone+ zone.country_list.to_a+ else+ default_country = Spree::Country.find_by(id: store.read_attribute(:default_country_id))+ default_country ? [default_country] : []+ end++ if countries.empty?+ puts " Skipping store '#{store.name}' (#{store.code}) — no countries to migrate"nextend+ primary_country = countries.first+ iso_country = ISO3166::Country[primary_country.iso] if primary_country+market = store.markets.create!(- name: 'Default',- currency: store.default_currency,- zone: zone,- default_locale: store.default_locale || 'en',- supported_locales: store.read_attribute(:supported_locales),- default: true+ name: primary_country&.name || 'Default',+ currency: iso_country&.currency_code || store.read_attribute(:default_currency) || 'USD',+ default_locale: iso_country&.languages_official&.first || store.read_attribute(:default_locale) || 'en',+ default: true,+ countries: countries)- puts " Created default market '#{market.name}' for store '#{store.name}' (#{store.code})"+ store.update_column(:checkout_zone_id, nil) if checkout_zone_id++ puts " Created market '#{market.name}' with #{countries.size} countries for store '#{store.name}' (#{store.code})"endendenddiff --git a/backend/engines/core/spec/helpers/base_helper_spec.rb b/backend/engines/core/spec/helpers/base_helper_spec.rbindex e1bbcfde46..1c095bd3a3 100644--- a/backend/engines/core/spec/helpers/base_helper_spec.rb+++ b/backend/engines/core/spec/helpers/base_helper_spec.rb@@ -11,31 +11,24 @@ describe Spree::BaseHelper, type: :helper doendcontext 'available_countries' do- let(:country) { create(:country) }-before docreate_list(:country, 3)end- context 'with checkout zone assigned to the store' do+ context 'with markets' do+ let!(:country) { create(:country) }+before do- @zone = create(:zone, name: 'No Limits', kind: 'country')- @zone.members.create(zoneable: country)- current_store.update(checkout_zone_id: @zone.id)+ create(:market, store: current_store, countries: [country], currency: 'USD', default: true)end- it 'return only the countries defined by the checkout_zone_id' do+ it 'returns only the countries from markets' doexpect(available_countries).to eq([country])- expect(current_store.checkout_zone_id).to eq @zone.idendend- context 'with no checkout zone defined' do- before do- current_store.update(checkout_zone_id: nil)- end-- it 'return complete list of countries' do+ context 'without markets' do+ it 'returns complete list of countries' doexpect(available_countries).to contain_exactly(*Spree::Country.all)endenddiff --git a/backend/engines/core/spec/lib/spree/core/controller_helpers/store_spec.rb b/backend/engines/core/spec/lib/spree/core/controller_helpers/store_spec.rbindex 973d51d8ee..ae38b3f189 100644--- a/backend/engines/core/spec/lib/spree/core/controller_helpers/store_spec.rb+++ b/backend/engines/core/spec/lib/spree/core/controller_helpers/store_spec.rb@@ -154,39 +154,14 @@ describe Spree::Core::ControllerHelpers::Store, type: :controller doendcontext 'when there is no current order' do- context 'when store has a checkout_zone' do- let(:checkout_zone) { Spree::Zone.new }-- before do- allow(controller).to receive(:current_store).and_return(- double('Store', checkout_zone: checkout_zone, url: 'test.com')- )- end-- it 'returns the store checkout_zone' do- expect(current_price_options[:tax_zone]).to eq(checkout_zone)- end-- it 'sets Spree::Current.zone to the store checkout_zone' do- subject- expect(Spree::Current.zone).to eq(checkout_zone)- end+ it 'returns nil when asked for the current tax zone' do+ expect(current_price_options[:tax_zone]).to be_nilend- context 'when store has no checkout_zone' do- before do- allow(controller.current_store).to receive(:checkout_zone).and_return(nil)- end-- it 'returns nil when asked for the current tax zone' do- expect(current_price_options[:tax_zone]).to be_nil- end-- it 'sets Spree::Current.zone to nil' do- subject- # Spree::Current.zone will call default_tax again, so we check the attributes hash- expect(Spree::Current.attributes[:zone]).to be_nil- end+ it 'sets Spree::Current.zone to nil' do+ subject+ # Spree::Current.zone will call default_tax again, so we check the attributes hash+ expect(Spree::Current.attributes[:zone]).to be_nilendenddiff --git a/backend/engines/core/spec/lib/spree/core/pricing/context_spec.rb b/backend/engines/core/spec/lib/spree/core/pricing/context_spec.rbindex 0baf20bfaa..a744ae928a 100644--- a/backend/engines/core/spec/lib/spree/core/pricing/context_spec.rb+++ b/backend/engines/core/spec/lib/spree/core/pricing/context_spec.rb@@ -193,16 +193,16 @@ module Spreeendend- context 'with zone from store checkout_zone' do- let(:checkout_zone) { create(:zone) }+ context 'when order has no tax zone' do+ let!(:default_tax_zone) { create(:zone, default_tax: true) }before doallow(order).to receive(:tax_zone).and_return(nil)- order.store.update!(checkout_zone: checkout_zone)+ Rails.cache.delete('default_tax')end- it 'sets zone from store checkout_zone' do- expect(subject.zone).to eq(checkout_zone)+ it 'falls back to default tax zone' do+ expect(subject.zone).to eq(default_tax_zone)endenddiff --git a/backend/engines/core/spec/models/spree/current_spec.rb b/backend/engines/core/spec/models/spree/current_spec.rbindex aceb1603b2..16f970cf3f 100644--- a/backend/engines/core/spec/models/spree/current_spec.rb+++ b/backend/engines/core/spec/models/spree/current_spec.rb@@ -63,21 +63,11 @@ RSpec.describe Spree::Current docontext 'when zone is not set and no default tax zone exists' dobefore doSpree::Zone.update_all(default_tax: false)+ Rails.cache.delete('default_tax')end- context 'when store has a checkout_zone' do- let(:checkout_zone) { create(:zone) }- let!(:store) { create(:store, default: true, checkout_zone: checkout_zone) }-- it 'returns the store checkout_zone' do- expect(described_class.zone).to eq(checkout_zone)- end- end-- context 'when store has no checkout_zone' do- it 'returns nil' do- expect(described_class.zone).to be_nil- end+ it 'returns nil' do+ expect(described_class.zone).to be_nilendendenddiff --git a/backend/engines/core/spec/models/spree/market_country_spec.rb b/backend/engines/core/spec/models/spree/market_country_spec.rbnew file mode 100644index 0000000000..945182e03a--- /dev/null+++ b/backend/engines/core/spec/models/spree/market_country_spec.rb@@ -0,0 +1,66 @@+require 'spec_helper'++RSpec.describe Spree::MarketCountry, type: :model do+ describe 'validations' do+ describe '#country_covered_by_shipping_zone' do+ let(:store) { create(:store) }+ let(:market) { create(:market, store: store) }++ context 'when country is in a zone with a shipping method' do+ let(:country) { create(:country) }+ let!(:zone) { create(:zone, kind: 'country') }++ before do+ zone.zone_members.create!(zoneable: country)+ create(:shipping_method, zones: [zone])+ end++ it 'is valid' do+ market_country = Spree::MarketCountry.new(market: market, country: country)+ expect(market_country).to be_valid+ end+ end++ context 'when country has no shipping zone coverage' do+ let(:country) { create(:country) }++ it 'is invalid' do+ market_country = Spree::MarketCountry.new(market: market, country: country)+ expect(market_country).not_to be_valid+ expect(market_country.errors[:country]).to include(/not covered by any shipping zone/)+ end+ end++ context 'when country is in a zone without a shipping method' do+ let(:country) { create(:country) }+ let!(:zone) { create(:zone, kind: 'country') }++ before do+ zone.zone_members.create!(zoneable: country)+ end++ it 'is invalid' do+ market_country = Spree::MarketCountry.new(market: market, country: country)+ expect(market_country).not_to be_valid+ expect(market_country.errors[:country]).to include(/not covered by any shipping zone/)+ end+ end++ context 'when country is covered via a state-type zone' do+ let(:country) { create(:country) }+ let(:state) { create(:state, country: country) }+ let!(:zone) { create(:zone, kind: 'state') }++ before do+ zone.zone_members.create!(zoneable: state)+ create(:shipping_method, zones: [zone])+ end++ it 'is valid' do+ market_country = Spree::MarketCountry.new(market: market, country: country)+ expect(market_country).to be_valid+ end+ end+ end+ end+enddiff --git a/backend/engines/core/spec/models/spree/store_spec.rb b/backend/engines/core/spec/models/spree/store_spec.rbindex 53dd10d5be..2a99271d94 100644--- a/backend/engines/core/spec/models/spree/store_spec.rb+++ b/backend/engines/core/spec/models/spree/store_spec.rb@@ -182,6 +182,42 @@ describe Spree::Store, type: :model, without_global_store: true doendend+ describe '#ensure_default_market' do+ context 'when default_country_iso is set with shipping coverage' do+ let(:country) { Spree::Country.first || create(:country) }+ let(:store) { build(:store) }++ before do+ zone = create(:zone, name: 'Test Zone', kind: 'country')+ zone.zone_members.create!(zoneable: country)+ create(:shipping_method, zones: [zone])+ store.default_country_iso = country.iso+ end++ it 'creates a default market named after the country' do+ expect { store.save! }.to change(Spree::Market, :count).by(1)++ market = store.markets.first+ expect(market.name).to eq(country.name)+ expect(market).to be_default+ expect(market.countries).to include(country)+ end++ it 'does not create a second market on re-run' do+ store.save!+ expect { store.send(:ensure_default_market) }.not_to change(Spree::Market, :count)+ end+ end++ context 'when default_country_iso is not set' do+ let(:store) { build(:store) }++ it 'does not create a market' do+ expect { store.save! }.not_to change(Spree::Market, :count)+ end+ end+ end+describe '#ensure_default_taxonomies_are_created' dolet(:store) { build(:store) }@@ -373,27 +409,6 @@ describe Spree::Store, type: :model, without_global_store: true doendend- shared_context 'with checkout zone set' do- let!(:country1) { create(:country) }- let!(:country2) { create(:country) }-- let!(:state1) { create(:state, country: country1) }- let!(:state2) { create(:state, country: country2) }-- let(:zone) do- create(:zone, kind: 'country').tap do |zone|- zone.members.create(zoneable: country1)- zone.members.create(zoneable: country2)- end- end-- before { subject.update(checkout_zone: zone) }- end-- shared_context 'with checkout zone not set' do- before { subject.update(checkout_zone: nil) }- end-describe '#countries_available_for_checkout' dosubject { create(:store) }@@ -412,17 +427,7 @@ describe Spree::Store, type: :model, without_global_store: true doendend- context 'without markets (legacy)' do- include_context 'with checkout zone set'-- it 'returns country list for checkout zone' do- expect(subject.countries_available_for_checkout).to eq [country1, country2]- end- end-- context 'without markets and without checkout zone (legacy)' do- include_context 'with checkout zone not set'-+ context 'without markets' doit 'returns list of all countries' docheckout_available_countries_ids = subject.countries_available_for_checkout.pluck(:id)all_countries_ids = Spree::Country.all.ids@@ -433,105 +438,45 @@ describe Spree::Store, type: :model, without_global_store: true doenddescribe '#states_available_for_checkout' do- context do- include_context 'with checkout zone set'+ subject { create(:store) }- it 'returns states list for checkout zone' do- expect(subject.states_available_for_checkout(country1)).to eq [state1]- expect(subject.states_available_for_checkout(country2)).to eq [state2]+ let(:country_with_states) do+ create(:country).tap do |country|+ country.states << create(:state)endend- context do- include_context 'with checkout zone not set'-- context do- let(:country_with_states) do- create(:country).tap do |country|- country.states << create(:state)- end- end+ it 'returns list of states associated to country' do+ checkout_available_states_ids = subject.states_available_for_checkout(country_with_states).pluck(:id)+ all_state_ids = country_with_states.states.pluck(:id)- it 'returns list of states associated to country' do- checkout_available_states_ids3 = subject.states_available_for_checkout(country_with_states).pluck(:id)- all_countries_ids = country_with_states.states.pluck(:id)-- expect(checkout_available_states_ids3).to eq(all_countries_ids)- end- end+ expect(checkout_available_states_ids).to eq(all_state_ids)endend- describe '#ensure_default_country' do- subject { build(:store) }-- let!(:default_country) { Spree::Country.first || create(:country) }- let!(:other_country) { create(:country) }- let!(:other_country_2) { create(:country) }-- context 'checkout zone not set' do- before { subject.save! }-- context 'with default country' do- before { subject.default_country = other_country }-- it { expect(subject.default_country).to eq(other_country) }- end-- it { expect(subject.default_country).to eq(default_country) }- end-- context 'checkout zone set' do- let!(:zone) { create(:zone, kind: 'country') }+ describe '#default_country' do+ context 'with markets' do+ let!(:store) { create(:store) }+ let!(:germany) { create(:country, name: 'Germany', iso: 'DE') }+ let!(:france) { create(:country, name: 'France', iso: 'FR') }before do- zone.members.create(zoneable: other_country_2)- subject.checkout_zone = zone+ create(:market, store: store, countries: [germany, france], currency: 'EUR', default: true)end- context 'with default country set' do- before { subject.default_country = other_country }-- context 'no zone members' do- before do- zone.members.delete_all- subject.save!- end-- it { expect(subject.default_country).to eq(other_country) }- end-- context 'default country is a zone member' do- before do- zone.members.create(zoneable: other_country)- subject.save!- end-- it { expect(subject.default_country).to eq(other_country) }- end-- context 'default country is not a zone member' do- before { subject.save! }-- it { expect(subject.default_country).to eq(other_country_2) }- end+ it 'derives from the default market' do+ expect(store.default_country).to eq(france) # France comes before Germany alphabeticallyend+ end- context 'without default country set' do- context 'no zone members' do- before do- zone.members.delete_all- subject.save!- end-- it { expect(subject.default_country).to eq(default_country) }- end+ context 'without markets' do+ let!(:country) { Spree::Country.first || create(:country) }+ let(:store) { build(:store) }- context 'with zone members' do- before { subject.save! }+ before { store.write_attribute(:default_country_id, country.id) }- it { expect(subject.default_country).to eq(other_country_2) }- end+ it 'returns the store column value' do+ expect(store.default_country).to eq(country)endendend@@ -539,23 +484,31 @@ describe Spree::Store, type: :model, without_global_store: true dodescribe '#default_country_iso=' dolet(:store) { build(:store) }- context 'when country is not found' do- it 'sets the default country' do+ context 'when country is not found in the database' do+ it 'creates the country from ISO3166 data' doexpect(Spree::Country.find_by(iso: 'GB')).to be_nilexpect { store.default_country_iso = 'GB' }.to change(Spree::Country, :count).by(1)- expect(store.default_country).to be_an_instance_of(Spree::Country)- expect(store.default_country.iso).to eq('GB')- expect(store.default_country.numcode.to_s).to eq(::Country['GB'].number)++ gb_country = Spree::Country.find_by(iso: 'GB')+ expect(gb_country).to be_present+ expect(gb_country.numcode.to_s).to eq(::Country['GB'].number)expect(store.default_country_iso).to eq('GB')endend- context 'when country is found' do+ context 'when country exists in the database' dolet!(:country) { create(:country, iso: 'GB') }- it 'sets the default country' do+ it 'uses the existing country' doexpect { store.default_country_iso = 'GB' }.not_to change(Spree::Country, :count)- expect(store.default_country.iso).to eq('GB')+ expect(store.default_country_iso).to eq('GB')+ end+ end++ context 'when iso is blank' do+ it 'does nothing' do+ store.default_country_iso = ''+ expect(store.instance_variable_get(:@default_country_for_market)).to be_nilendendend@@ -869,19 +822,98 @@ describe Spree::Store, type: :model, without_global_store: true doendend+ describe '#countries_with_shipping_coverage' do+ let(:store) { create(:store) }++ context 'with country-type zones with shipping methods' do+ let(:country1) { create(:country) }+ let(:country2) { create(:country) }+ let!(:zone) { create(:zone, kind: 'country') }++ before do+ zone.zone_members.create!(zoneable: country1)+ zone.zone_members.create!(zoneable: country2)+ create(:shipping_method, zones: [zone])+ end++ it 'returns countries from those zones' do+ result = store.countries_with_shipping_coverage+ expect(result).to include(country1, country2)+ end+ end++ context 'with state-type zones with shipping methods' do+ let(:country) { create(:country) }+ let(:state) { create(:state, country: country) }+ let!(:zone) { create(:zone, kind: 'state') }++ before do+ zone.zone_members.create!(zoneable: state)+ create(:shipping_method, zones: [zone])+ end++ it 'returns countries inferred from state-type zones' do+ result = store.countries_with_shipping_coverage+ expect(result).to include(country)+ end+ end++ context 'when zone has no shipping method' do+ let(:country) { create(:country) }+ let!(:zone) { create(:zone, kind: 'country') }++ before do+ zone.zone_members.create!(zoneable: country)+ end++ it 'does not include countries from that zone' do+ expect(store.countries_with_shipping_coverage).not_to include(country)+ end+ end++ context 'when no shipping zones exist' do+ before { Spree::Zone.delete_all }++ it 'returns empty relation' do+ expect(store.countries_with_shipping_coverage).to be_empty+ end+ end++ context 'when country appears in multiple zones' do+ let(:country) { create(:country) }+ let!(:zone1) { create(:zone, kind: 'country') }+ let!(:zone2) { create(:zone, kind: 'country') }++ before do+ zone1.zone_members.create!(zoneable: country)+ zone2.zone_members.create!(zoneable: country)+ create(:shipping_method, zones: [zone1])+ create(:shipping_method, zones: [zone2])+ end++ it 'deduplicates countries' do+ result = store.countries_with_shipping_coverage+ expect(result.where(id: country.id).count).to eq(1)+ end+ end+ end+describe '#supported_shipping_zones' docontext 'with checkout zone set' dolet!(:checkout_zone) { create(:zone) }+ let(:store) { create(:store) }- subject { build(:store, checkout_zone: checkout_zone) }+ before { store.update_column(:checkout_zone_id, checkout_zone.id) }- it 'returns the checkout zone' do- expect(subject.supported_shipping_zones).to eq([checkout_zone])+ it 'returns the checkout zone and emits deprecation warning' do+ expect(Spree::Deprecation).to receive(:warn).with(/supported_shipping_zones is deprecated/)+ expect(store.supported_shipping_zones).to eq([checkout_zone])endendcontext 'when checkout zone not set' do- it 'returns all shipping zones' do+ it 'returns all shipping zones and emits deprecation warning' do+ expect(Spree::Deprecation).to receive(:warn).with(/supported_shipping_zones is deprecated/)expect(subject.supported_shipping_zones).to eq(Spree::Zone.includes(zone_members: :zoneable).all)endenddiff --git a/backend/engines/core/spec/models/spree/zone_spec.rb b/backend/engines/core/spec/models/spree/zone_spec.rbindex 7fd0f657dc..727a92c005 100644--- a/backend/engines/core/spec/models/spree/zone_spec.rb+++ b/backend/engines/core/spec/models/spree/zone_spec.rb@@ -43,17 +43,6 @@ describe Spree::Zone, type: :model doendend- describe '#nullify_checkout_zone' do- let!(:zone) { create(:zone) }-- it 'is expected to nullify checkout zone' do- Spree::Store.current.update(checkout_zone: zone)-- expect { zone.destroy }- .to change { Spree::Store.current.reload.checkout_zone_id }- .to(nil)- end- endendcontext 'when there is only one qualifying zone' dodiff --git a/backend/engines/multi_store/app/controllers/spree/admin/multi_store/stores_controller.rb b/backend/engines/multi_store/app/controllers/spree/admin/multi_store/stores_controller.rbindex aa6be11d12..d02d914980 100644--- a/backend/engines/multi_store/app/controllers/spree/admin/multi_store/stores_controller.rb+++ b/backend/engines/multi_store/app/controllers/spree/admin/multi_store/stores_controller.rb@@ -3,10 +3,7 @@ module Spreemodule MultiStoreclass StoresController < Spree::Admin::BaseControllerdef new- @store = Spree::Store.new(- default_country_iso: current_store.default_country_iso,- default_currency: current_store.default_currency- )+ @store = Spree::Store.newrender :new, layout: 'spree/admin_wizard'enddiff --git a/backend/engines/multi_store/app/views/spree/admin/multi_store/stores/new.html.erb b/backend/engines/multi_store/app/views/spree/admin/multi_store/stores/new.html.erbindex 198c288793..dae8642629 100644--- a/backend/engines/multi_store/app/views/spree/admin/multi_store/stores/new.html.erb+++ b/backend/engines/multi_store/app/views/spree/admin/multi_store/stores/new.html.erb@@ -18,17 +18,7 @@<div class="form-group"><%= f.label :default_country_iso, Spree.t(:country) %>- <%= f.collection_select :default_country_iso, Spree::Country.order(:name), :iso, :name, { }, { data: { controller: 'autocomplete-select', enable_button_target: 'input', action: 'store-form#updateCurrency' } } %>- </div>-- <div class="form-group">- <%= f.label :default_locale %>- <%= f.select :default_locale, options_from_collection_for_select(all_locales_options, :last, :first, current_store.default_locale || I18n.locale), { }, { data: { controller: 'autocomplete-select', enable_button_target: 'input', action: 'store-form#updateCurrency' } } %>- </div>-- <div class="form-group">- <%= f.label :default_currency, Spree.t(:currency) %>- <%= f.select :default_currency, currency_options, {}, { data: { controller: 'autocomplete-select', enable_button_target: 'input', store_form_target: 'currency' } } %>+ <%= f.collection_select :default_country_iso, Spree::Country.order(:name), :iso, :name, { }, { data: { controller: 'autocomplete-select', enable_button_target: 'input' } } %></div><% if available_stores.any? %>diff --git a/backend/engines/multi_store/spec/controllers/spree/admin/multi_store/stores_controller_spec.rb b/backend/engines/multi_store/spec/controllers/spree/admin/multi_store/stores_controller_spec.rbindex 7887be3372..d3dabbf791 100644--- a/backend/engines/multi_store/spec/controllers/spree/admin/multi_store/stores_controller_spec.rb+++ b/backend/engines/multi_store/spec/controllers/spree/admin/multi_store/stores_controller_spec.rb@@ -19,21 +19,26 @@ describe Spree::Admin::MultiStore::StoresController, type: :controller doexpect(response).to have_http_status(:ok)end- it 'initializes store with current store defaults' do+ it 'initializes a new store' dosubject- new_store = assigns(:store)- expect(new_store.default_currency).to eq(store.default_currency)+ expect(assigns(:store)).to be_a_new(Spree::Store)endenddescribe 'POST #create' dosubject { post :create, params: { store: store_params } }+ let!(:country) { Spree::Country.find_by(iso: 'US') || create(:country_us) }+ let!(:zone) do+ zone = create(:zone, name: 'US Zone', kind: 'country')+ zone.zone_members.create!(zoneable: country)+ create(:shipping_method, zones: [zone])+ zone+ endlet(:store_params) do{name: 'New Store',- default_currency: 'USD',- default_locale: 'en'+ default_country_iso: country.iso}end@@ -42,6 +47,17 @@ describe Spree::Admin::MultiStore::StoresController, type: :controller doexpect { subject }.to change(Spree::Store, :count).by(1)end+ it 'creates a default market with the selected country' do+ subject+ new_store = Spree::Store.last+ expect(new_store.markets.count).to eq(1)++ market = new_store.markets.first+ expect(market.name).to eq(country.name)+ expect(market).to be_default+ expect(market.countries).to include(country)+ end+it 'sets the mail_from_address from the current store' dosubjectexpect(Spree::Store.last.mail_from_address).to eq(store.mail_from_address)@@ -70,6 +86,15 @@ describe Spree::Admin::MultiStore::StoresController, type: :controller doendend+ context 'without country' do+ let(:store_params) { { name: 'Store Without Country' } }++ it 'creates the store without a market' do+ expect { subject }.to change(Spree::Store, :count).by(1)+ expect(Spree::Store.last.markets.count).to eq(0)+ end+ end+context 'with invalid params' dolet(:store_params) { { name: '' } }@@ -89,8 +114,7 @@ describe Spree::Admin::MultiStore::StoresController, type: :controller dolet(:store_params) do{name: 'Store With Products',- default_currency: 'USD',- default_locale: 'en',+ default_country_iso: country.iso,import_products_from_store_id: store.id}enddiff --git a/docs/api-reference/store.yaml b/docs/api-reference/store.yamlindex 751c2be4a7..f2c92c176e 100644--- a/docs/api-reference/store.yaml+++ b/docs/api-reference/store.yaml@@ -530,14 +530,14 @@ paths:content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImV4cCI6MTc3MTc1MTIxMH0.rQScCOhPN-AoB2H_liaHoZU0FgU7WMoJUjEfvO8tidE+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImV4cCI6MTc3MTc2NjA2NH0.-0GvkA8M14_l5q-3XDJOiVZ0vSRMKod2Ik6jZOGShRguser:id: cus_UkLWZg9DAJemail: [email protected]- first_name: Lashaunda- last_name: Schoen- created_at: '2026-02-21T09:06:50.419Z'- updated_at: '2026-02-21T09:06:50.419Z'+ first_name: Lacresha+ last_name: Von+ created_at: '2026-02-21T13:14:24.163Z'+ updated_at: '2026-02-21T13:14:24.163Z'addresses: []default_billing_address:default_shipping_address:@@ -593,14 +593,14 @@ paths:content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImV4cCI6MTc3MTc1MTIxMX0.ZnuzcK1EWXfR4Lj1UBjp7kZK8dI3aqtwbfswAWh_0eY+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImV4cCI6MTc3MTc2NjA2NX0.7Z7E94ErOVfkvDwh24XVXkJtsh5-6LCI5jJGvf2UFt4user:id: cus_UkLWZg9DAJemail: [email protected]first_name: Johnlast_name: Doe- created_at: '2026-02-21T09:06:51.801Z'- updated_at: '2026-02-21T09:06:51.801Z'+ created_at: '2026-02-21T13:14:25.507Z'+ updated_at: '2026-02-21T13:14:25.507Z'addresses: []default_billing_address:default_shipping_address:@@ -672,14 +672,14 @@ paths:content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImV4cCI6MTc3MTc1MTIxMn0.pl5BztnaRkK4P9RGHpUz4NyyqGo3X0sLa8I8FUGWVxU+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImV4cCI6MTc3MTc2NjA2Nn0.xqUwogbX7hlxDGDMpRligxfp9jmd2kB3HY9hwQPDE2Muser:id: cus_UkLWZg9DAJemail: [email protected]- first_name: Lindsy- last_name: O'Conner- created_at: '2026-02-21T09:06:52.361Z'- updated_at: '2026-02-21T09:06:52.361Z'+ first_name: Chase+ last_name: Rath+ created_at: '2026-02-21T13:14:26.047Z'+ updated_at: '2026-02-21T13:14:26.047Z'addresses: []default_billing_address:default_shipping_address:@@ -724,10 +724,10 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R816477482+ number: R790284236state: cart- token: 6MP4Pf9hQcQDg3pwBDTPc2u5Fq2pVWFaczb- email: [email protected]+ token: vVGkjNVhGm2vKSccjkJAB3nsRhJkk8bbSR6+ email: [email protected]special_instructions:currency: USDitem_count: 0@@ -750,8 +750,8 @@ paths:total: '0.0'display_total: "$0.00"completed_at:- created_at: '2026-02-21T09:06:52.989Z'- updated_at: '2026-02-21T09:06:52.989Z'+ created_at: '2026-02-21T13:14:26.650Z'+ updated_at: '2026-02-21T13:14:26.650Z'order_promotions: []line_items: []shipments: []@@ -806,10 +806,10 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R155147700+ number: R665157049state: cart- token: 1jEpcbHpNKxjGeQ2AUiyCaZKS6JMaYvKjtD- email: [email protected]+ token: xzKUHQUoUM2ufkAE363vCfRCC2xABJQi2zF+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -832,16 +832,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-21T09:06:54.057Z'- updated_at: '2026-02-21T09:06:54.197Z'+ created_at: '2026-02-21T13:14:27.708Z'+ updated_at: '2026-02-21T13:14:27.835Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 22878- slug: product-22878+ name: Product 23813+ slug: product-23813options_text: ''price: '10.0'display_price: "$10.00"@@ -860,23 +860,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:06:54.143Z'- updated_at: '2026-02-21T09:06:54.143Z'+ created_at: '2026-02-21T13:14:27.785Z'+ updated_at: '2026-02-21T13:14:27.785Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H14672948036+ number: H91318205372state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-21T09:06:54.160Z'- updated_at: '2026-02-21T09:06:54.185Z'+ created_at: '2026-02-21T13:14:27.799Z'+ updated_at: '2026-02-21T13:14:27.824Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -884,7 +884,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_41- name: Lurlene Hayes+ name: Rigoberto Pfefferaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -991,10 +991,10 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R432918187+ number: R390415698state: cart- token: mryDfe3AJ3HX73KQa3V5K6qTHBiroM3hKso- email: [email protected]+ token: dMRZGq4snZQgzikvNgaHNhGzJ9pKDcTiG5F+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -1017,16 +1017,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-21T09:06:54.231Z'- updated_at: '2026-02-21T09:06:54.389Z'+ created_at: '2026-02-21T13:14:27.866Z'+ updated_at: '2026-02-21T13:14:28.007Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 37379- slug: product-37379+ name: Product 34760+ slug: product-34760options_text: ''price: '10.0'display_price: "$10.00"@@ -1045,23 +1045,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:06:54.296Z'- updated_at: '2026-02-21T09:06:54.296Z'+ created_at: '2026-02-21T13:14:27.925Z'+ updated_at: '2026-02-21T13:14:27.925Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H87220099802+ number: H56908199808state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-21T09:06:54.317Z'- updated_at: '2026-02-21T09:06:54.366Z'+ created_at: '2026-02-21T13:14:27.938Z'+ updated_at: '2026-02-21T13:14:27.984Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -1069,7 +1069,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_45- name: Jacquelyne Wehner+ name: Dusti Terryaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -1334,10 +1334,10 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R122441799+ number: R775489583state: cart- token: ZTQhWqNG7KNsFjExwEcRdL2MJqTi8TQrvwB- email: [email protected]+ token: 2SqLe9DabCPyHiZVU6e4RUXgR3mfvUDkRUJ+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -1360,16 +1360,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-21T09:06:58.888Z'- updated_at: '2026-02-21T09:06:59.056Z'+ created_at: '2026-02-21T13:14:32.287Z'+ updated_at: '2026-02-21T13:14:32.446Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 87116- slug: product-87116+ name: Product 85793+ slug: product-85793options_text: ''price: '10.0'display_price: "$10.00"@@ -1388,23 +1388,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:06:58.941Z'- updated_at: '2026-02-21T09:06:58.941Z'+ created_at: '2026-02-21T13:14:32.354Z'+ updated_at: '2026-02-21T13:14:32.354Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H96877656792+ number: H07733890383state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-21T09:06:58.957Z'- updated_at: '2026-02-21T09:06:58.989Z'+ created_at: '2026-02-21T13:14:32.366Z'+ updated_at: '2026-02-21T13:14:32.385Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -1412,7 +1412,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_65- name: Ann Fahey+ name: Philip Emmerichaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -1434,12 +1434,12 @@ paths:- id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJstate: checkout- response_code: 1-SC-20260221090659051384- number: P5YZDW18+ response_code: 1-SC-20260221131432441048+ number: PYVZD6HJamount: '50.0'display_amount: "$50.00"- created_at: '2026-02-21T09:06:59.055Z'- updated_at: '2026-02-21T09:06:59.055Z'+ created_at: '2026-02-21T13:14:32.445Z'+ updated_at: '2026-02-21T13:14:32.445Z'source_type: store_creditsource_id: credit_UkLWZg9DAJsource:@@ -1575,10 +1575,10 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R079222725+ number: R356212957state: cart- token: aQwnCvMgDqKB23ZgNWYiiuBks9zhU9LYie5- email: [email protected]+ token: 7mgXaPCnUXDVAsR6aJtvUj7d3DH7hhLZEpd+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -1601,16 +1601,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-21T09:07:01.095Z'- updated_at: '2026-02-21T09:07:01.298Z'+ created_at: '2026-02-21T13:14:34.390Z'+ updated_at: '2026-02-21T13:14:34.575Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 112419- slug: product-112419+ name: Product 116873+ slug: product-116873options_text: ''price: '10.0'display_price: "$10.00"@@ -1629,23 +1629,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:07:01.157Z'- updated_at: '2026-02-21T09:07:01.285Z'+ created_at: '2026-02-21T13:14:34.454Z'+ updated_at: '2026-02-21T13:14:34.563Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H86601737123+ number: H38218564535state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-21T09:07:01.171Z'- updated_at: '2026-02-21T09:07:01.192Z'+ created_at: '2026-02-21T13:14:34.469Z'+ updated_at: '2026-02-21T13:14:34.490Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -1653,7 +1653,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_77- name: Fransisca Champlin+ name: Dennis Mrazaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -1975,10 +1975,10 @@ paths:example:data:- id: or_UkLWZg9DAJ- number: R877690416+ number: R592741797state: cart- token: cWNrHnapnP2zHKVu69b4DAdSorWJUhgdQXb- email: [email protected]+ token: of6cJeWunVfTbPt5JoqXhdpdixjHPP9o6Gj+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -2001,16 +2001,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-21T09:07:06.066Z'- updated_at: '2026-02-21T09:07:06.205Z'+ created_at: '2026-02-21T13:14:39.173Z'+ updated_at: '2026-02-21T13:14:39.272Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 13907- slug: product-13907+ name: Product 138807+ slug: product-138807options_text: ''price: '10.0'display_price: "$10.00"@@ -2029,23 +2029,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:07:06.149Z'- updated_at: '2026-02-21T09:07:06.149Z'+ created_at: '2026-02-21T13:14:39.228Z'+ updated_at: '2026-02-21T13:14:39.228Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H77753424595+ number: H24853465283state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-21T09:07:06.167Z'- updated_at: '2026-02-21T09:07:06.193Z'+ created_at: '2026-02-21T13:14:39.240Z'+ updated_at: '2026-02-21T13:14:39.261Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -2053,7 +2053,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_100- name: Lamar Murazik+ name: Derek Nitzscheaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -2162,11 +2162,11 @@ paths:application/json:example:id: cus_UkLWZg9DAJ- email: [email protected]- first_name: Shona- last_name: Hoppe- created_at: '2026-02-21T09:07:07.252Z'- updated_at: '2026-02-21T09:07:07.541Z'+ email: [email protected]+ first_name: Marguerite+ last_name: Corkery+ created_at: '2026-02-21T13:14:40.207Z'+ updated_at: '2026-02-21T13:14:40.482Z'addresses:- id: addr_gbHJdmfrXBfirstname: John@@ -2268,11 +2268,11 @@ paths:application/json:example:id: cus_UkLWZg9DAJ- email: [email protected]+ email: [email protected]first_name: Updatedlast_name: Name- created_at: '2026-02-21T09:07:08.049Z'- updated_at: '2026-02-21T09:07:08.344Z'+ created_at: '2026-02-21T13:14:40.765Z'+ updated_at: '2026-02-21T13:14:41.046Z'addresses:- id: addr_gbHJdmfrXBfirstname: John@@ -2467,7 +2467,7 @@ paths:example:data:- id: gc_UkLWZg9DAJ- code: 7B2B71E47E69119F+ code: 0F62C3B0C3676D9Bstate: activecurrency: USDamount: 10.0@@ -2481,8 +2481,8 @@ paths:redeemed_at:expired: falseactive: true- created_at: '2026-02-21T09:07:12.773Z'- updated_at: '2026-02-21T09:07:12.773Z'+ created_at: '2026-02-21T13:14:44.473Z'+ updated_at: '2026-02-21T13:14:44.473Z'meta:page: 1limit: 25@@ -2544,7 +2544,7 @@ paths:application/json:example:id: gc_UkLWZg9DAJ- code: 84263A77811BCCD5+ code: FFDEA12223C06FD6state: activecurrency: USDamount: 10.0@@ -2558,8 +2558,8 @@ paths:redeemed_at:expired: falseactive: true- created_at: '2026-02-21T09:07:13.939Z'- updated_at: '2026-02-21T09:07:13.939Z'+ created_at: '2026-02-21T13:14:45.569Z'+ updated_at: '2026-02-21T13:14:45.569Z'schema:"$ref": "#/components/schemas/StoreGiftCard"'404':@@ -2613,10 +2613,10 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R605735545+ number: R211893424state: cart- token: rGXPHttNAV6ckpe3pzNUaGenxxKG9z3PURQ- email: [email protected]+ token: fFpRkJ4x9nj1NYro2BMUD37dZX3148AJ72N+ email: [email protected]special_instructions:currency: USDitem_count: 3@@ -2639,16 +2639,16 @@ paths:total: '49.98'display_total: "$49.98"completed_at:- created_at: '2026-02-21T09:07:15.156Z'- updated_at: '2026-02-21T09:07:15.325Z'+ created_at: '2026-02-21T13:14:46.674Z'+ updated_at: '2026-02-21T13:14:46.801Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 215856- slug: product-215856+ name: Product 21292+ slug: product-21292options_text: ''price: '10.0'display_price: "$10.00"@@ -2667,8 +2667,8 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:07:15.239Z'- updated_at: '2026-02-21T09:07:15.239Z'+ created_at: '2026-02-21T13:14:46.733Z'+ updated_at: '2026-02-21T13:14:46.733Z'compare_at_amount:thumbnail_url:option_values: []@@ -2677,8 +2677,8 @@ paths:variant_id: variant_gbHJdmfrXBquantity: 2currency: USD- name: Product 227913- slug: product-227913+ name: Product 229746+ slug: product-229746options_text: ''price: '19.99'display_price: "$19.99"@@ -2697,8 +2697,8 @@ paths:discounted_amount: '39.98'display_discounted_amount: "$39.98"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:07:15.325Z'- updated_at: '2026-02-21T09:07:15.325Z'+ created_at: '2026-02-21T13:14:46.801Z'+ updated_at: '2026-02-21T13:14:46.801Z'compare_at_amount:thumbnail_url:option_values: []@@ -2794,10 +2794,10 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R647337648+ number: R435429727state: cart- token: pp3CURpVczFpgM7Khvt5spjVgajjcdDvP7H- email: [email protected]+ token: KgejSJmgUNXjq4rmrjLjXMCH1AMSU2EhzDS+ email: [email protected]special_instructions:currency: USDitem_count: 5@@ -2820,16 +2820,16 @@ paths:total: '99.95'display_total: "$99.95"completed_at:- created_at: '2026-02-21T09:07:17.485Z'- updated_at: '2026-02-21T09:07:17.569Z'+ created_at: '2026-02-21T13:14:48.678Z'+ updated_at: '2026-02-21T13:14:48.750Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 5currency: USD- name: Product 251142- slug: product-251142+ name: Product 253688+ slug: product-253688options_text: ''price: '19.99'display_price: "$19.99"@@ -2848,8 +2848,8 @@ paths:discounted_amount: '99.95'display_discounted_amount: "$99.95"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:07:17.549Z'- updated_at: '2026-02-21T09:07:17.579Z'+ created_at: '2026-02-21T13:14:48.731Z'+ updated_at: '2026-02-21T13:14:48.762Z'compare_at_amount:thumbnail_url:option_values: []@@ -2929,10 +2929,10 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R991780472+ number: R694206085state: cart- token: MmFvas1navEcBEhwhynWnBQaKi7TqR11eLP- email: [email protected]+ token: Dp4UXKLRmhWnMgR3mkfHj6dsNSREfJ7fwqJ+ email: [email protected]special_instructions:currency: USDitem_count: 0@@ -2955,8 +2955,8 @@ paths:total: '0.0'display_total: "$0.00"completed_at:- created_at: '2026-02-21T09:07:18.184Z'- updated_at: '2026-02-21T09:07:18.282Z'+ created_at: '2026-02-21T13:14:49.326Z'+ updated_at: '2026-02-21T13:14:49.400Z'order_promotions: []line_items: []shipments: []@@ -3080,9 +3080,9 @@ paths:application/json:example:id: or_gbHJdmfrXB- number: R229150177+ number: R219765085state: cart- token: WZpkoykp3EaZ3ryQd8KJRQ8z74rGdRkuc3e+ token: mwNKy3cXsRu1g2GsbBC558Smr4DMCzryL3uemail:special_instructions:currency: USD@@ -3106,16 +3106,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-21T09:07:20.345Z'- updated_at: '2026-02-21T09:07:20.446Z'+ created_at: '2026-02-21T13:14:51.404Z'+ updated_at: '2026-02-21T13:14:51.496Z'order_promotions: []line_items:- id: li_gbHJdmfrXBvariant_id: variant_gbHJdmfrXBquantity: 1currency: USD- name: Product 303826- slug: product-303826+ name: Product 30439+ slug: product-30439options_text: ''price: '10.0'display_price: "$10.00"@@ -3134,23 +3134,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:07:20.402Z'- updated_at: '2026-02-21T09:07:20.402Z'+ created_at: '2026-02-21T13:14:51.458Z'+ updated_at: '2026-02-21T13:14:51.458Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_gbHJdmfrXB- number: H09969643397+ number: H62904080951state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-21T09:07:20.417Z'- updated_at: '2026-02-21T09:07:20.436Z'+ created_at: '2026-02-21T13:14:51.470Z'+ updated_at: '2026-02-21T13:14:51.486Z'shipping_method:id: shpm_gbHJdmfrXBname: UPS Ground@@ -3158,7 +3158,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_153- name: Lanell O'Hara+ name: Alesia Heaneyaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -3258,10 +3258,10 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R461378992+ number: R485751379state: cart- token: mqcN8FVETFH8D8f8uEkepQnfUyWAnppAQBv- email: [email protected]+ token: gceKHM5uHUtRGHvtAg5T929xTfN2gckcSX1+ email: [email protected]special_instructions: Leave at doorcurrency: USDitem_count: 1@@ -3284,16 +3284,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-21T09:07:22.886Z'- updated_at: '2026-02-21T09:07:23.039Z'+ created_at: '2026-02-21T13:14:53.715Z'+ updated_at: '2026-02-21T13:14:53.825Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 332045- slug: product-332045+ name: Product 332751+ slug: product-332751options_text: ''price: '10.0'display_price: "$10.00"@@ -3312,23 +3312,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:07:22.965Z'- updated_at: '2026-02-21T09:07:22.965Z'+ created_at: '2026-02-21T13:14:53.775Z'+ updated_at: '2026-02-21T13:14:53.775Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H59904077682+ number: H92376262746state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-21T09:07:22.985Z'- updated_at: '2026-02-21T09:07:23.015Z'+ created_at: '2026-02-21T13:14:53.788Z'+ updated_at: '2026-02-21T13:14:53.807Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -3336,7 +3336,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_168- name: Retha Douglas+ name: Meg Gloveraddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -3515,10 +3515,10 @@ paths:application/json:example:id: or_gbHJdmfrXB- number: R407702133+ number: R870204765state: address- token: NQs5rFVzST6ssaZ9xxrRttk5cN9RWZDydvF- email: [email protected]+ token: 5wC8XqRQnEkzfTJQQyw5fw4xSG3rtq1gYi3+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -3541,16 +3541,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-21T09:07:24.668Z'- updated_at: '2026-02-21T09:07:24.971Z'+ created_at: '2026-02-21T13:14:55.266Z'+ updated_at: '2026-02-21T13:14:55.376Z'order_promotions: []line_items:- id: li_gbHJdmfrXBvariant_id: variant_gbHJdmfrXBquantity: 1currency: USD- name: Product 373827- slug: product-373827+ name: Product 379614+ slug: product-379614options_text: ''price: '10.0'display_price: "$10.00"@@ -3569,23 +3569,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:07:24.830Z'- updated_at: '2026-02-21T09:07:24.830Z'+ created_at: '2026-02-21T13:14:55.327Z'+ updated_at: '2026-02-21T13:14:55.327Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_gbHJdmfrXB- number: H32914381966+ number: H97432923641state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-21T09:07:24.906Z'- updated_at: '2026-02-21T09:07:24.947Z'+ created_at: '2026-02-21T13:14:55.339Z'+ updated_at: '2026-02-21T13:14:55.355Z'shipping_method:id: shpm_gbHJdmfrXBname: UPS Ground@@ -3593,7 +3593,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_178- name: Clarice Leannon+ name: Ninfa Stiedemannaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -3695,10 +3695,10 @@ paths:application/json:example:id: or_gbHJdmfrXB- number: R546557324+ number: R251442384state: payment- token: 8c3aerLqrskXdYa5cp2r2peqbxFkhVDE83z- email: [email protected]+ token: Ude9R1p9Ge4XW89VMHrr7rhCruMX8ZXVVDf+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -3721,16 +3721,16 @@ paths:total: '29.99'display_total: "$29.99"completed_at:- created_at: '2026-02-21T09:07:26.636Z'- updated_at: '2026-02-21T09:07:26.850Z'+ created_at: '2026-02-21T13:14:56.710Z'+ updated_at: '2026-02-21T13:14:56.986Z'order_promotions: []line_items:- id: li_gbHJdmfrXBvariant_id: variant_gbHJdmfrXBquantity: 1currency: USD- name: Product 403723- slug: product-403723+ name: Product 403652+ slug: product-403652options_text: ''price: '19.99'display_price: "$19.99"@@ -3749,23 +3749,23 @@ paths:discounted_amount: '19.99'display_discounted_amount: "$19.99"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:07:26.693Z'- updated_at: '2026-02-21T09:07:26.760Z'+ created_at: '2026-02-21T13:14:56.822Z'+ updated_at: '2026-02-21T13:14:56.920Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_EfhxLZ9ck8- number: H16916321354+ number: H91529409828state: pendingtracking:tracking_url:cost: '10.0'display_cost: "$10.00"shipped_at:- created_at: '2026-02-21T09:07:26.788Z'- updated_at: '2026-02-21T09:07:26.815Z'+ created_at: '2026-02-21T13:14:56.938Z'+ updated_at: '2026-02-21T13:14:56.958Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -3773,7 +3773,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_188- name: Melba Little+ name: Cassidy Emmerichaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -3874,10 +3874,10 @@ paths:application/json:example:id: or_gbHJdmfrXB- number: R509490059+ number: R823487303state: complete- token: mA7jJSYpRFm6sLrpT5yRPLcmasfBf7rPMgB- email: [email protected]+ token: 9hdbiq4ctmKjFkFEiMzJX8xVrjkFEk9uU1X+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -3899,17 +3899,17 @@ paths:display_additional_tax_total: "$0.00"total: '29.99'display_total: "$29.99"- completed_at: '2026-02-21T09:07:27.877Z'- created_at: '2026-02-21T09:07:27.526Z'- updated_at: '2026-02-21T09:07:27.877Z'+ completed_at: '2026-02-21T13:14:57.932Z'+ created_at: '2026-02-21T13:14:57.645Z'+ updated_at: '2026-02-21T13:14:57.932Z'order_promotions: []line_items:- id: li_gbHJdmfrXBvariant_id: variant_gbHJdmfrXBquantity: 1currency: USD- name: Product 424406- slug: product-424406+ name: Product 42214+ slug: product-42214options_text: ''price: '19.99'display_price: "$19.99"@@ -3928,23 +3928,23 @@ paths:discounted_amount: '19.99'display_discounted_amount: "$19.99"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:07:27.584Z'- updated_at: '2026-02-21T09:07:27.870Z'+ created_at: '2026-02-21T13:14:57.702Z'+ updated_at: '2026-02-21T13:14:57.926Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_EfhxLZ9ck8- number: H75437754070+ number: H84681343579state: pendingtracking:tracking_url:cost: '10.0'display_cost: "$10.00"shipped_at:- created_at: '2026-02-21T09:07:27.715Z'- updated_at: '2026-02-21T09:07:27.851Z'+ created_at: '2026-02-21T13:14:57.799Z'+ updated_at: '2026-02-21T13:14:57.902Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -3952,7 +3952,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_194- name: Camelia Kuphal+ name: Julietta Weberaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -3985,11 +3985,11 @@ paths:payment_method_id: pm_UkLWZg9DAJstate: checkoutresponse_code: '12345'- number: PHZPD89J+ number: P6W65IG7amount: '29.99'display_amount: "$29.99"- created_at: '2026-02-21T09:07:27.815Z'- updated_at: '2026-02-21T09:07:27.815Z'+ created_at: '2026-02-21T13:14:57.870Z'+ updated_at: '2026-02-21T13:14:57.870Z'source_type: credit_cardsource_id: card_UkLWZg9DAJsource:@@ -4183,13 +4183,13 @@ paths:id: ps_gbHJdmfrXBstatus: pendingcurrency: USD- external_id: bogus_c46f6004f924d4dec2d106bb+ external_id: bogus_8b884aa28632ce7f3577a5e8external_data:- client_secret: bogus_secret_cfe4c7cadb9016c6+ client_secret: bogus_secret_160742e3e1f61410customer_external_id:expires_at:- created_at: '2026-02-21T09:07:30.974Z'- updated_at: '2026-02-21T09:07:30.974Z'+ created_at: '2026-02-21T13:15:00.709Z'+ updated_at: '2026-02-21T13:15:00.709Z'amount: '110.0'payment_method_id: pm_UkLWZg9DAJorder_id: or_UkLWZg9DAJ@@ -4280,13 +4280,13 @@ paths:id: ps_UkLWZg9DAJstatus: pendingcurrency: USD- external_id: bogus_278f0c1827f2b180959055db+ external_id: bogus_1a0d02a686ff7da4b85b6132external_data:client_secret: secret_123customer_external_id:expires_at:- created_at: '2026-02-21T09:07:32.466Z'- updated_at: '2026-02-21T09:07:32.466Z'+ created_at: '2026-02-21T13:15:02.025Z'+ updated_at: '2026-02-21T13:15:02.025Z'amount: '110.0'payment_method_id: pm_UkLWZg9DAJorder_id: or_UkLWZg9DAJ@@ -4327,13 +4327,13 @@ paths:id: ps_UkLWZg9DAJstatus: pendingcurrency: USD- external_id: bogus_d5930cb89cfc96efbc3bfc9c+ external_id: bogus_c09a7a687e7508e6d3c822a2external_data:client_secret: secret_123customer_external_id:expires_at:- created_at: '2026-02-21T09:07:33.913Z'- updated_at: '2026-02-21T09:07:33.926Z'+ created_at: '2026-02-21T13:15:03.417Z'+ updated_at: '2026-02-21T13:15:03.435Z'amount: '50.0'payment_method_id: pm_UkLWZg9DAJorder_id: or_UkLWZg9DAJ@@ -4408,13 +4408,13 @@ paths:id: ps_UkLWZg9DAJstatus: completedcurrency: USD- external_id: bogus_16d73598a2ad31b8ed790224+ external_id: bogus_feb7f1151c0dfb5074c2987eexternal_data:client_secret: secret_123customer_external_id:expires_at:- created_at: '2026-02-21T09:07:34.601Z'- updated_at: '2026-02-21T09:07:34.613Z'+ created_at: '2026-02-21T13:15:04.094Z'+ updated_at: '2026-02-21T13:15:04.105Z'amount: '110.0'payment_method_id: pm_UkLWZg9DAJorder_id: or_UkLWZg9DAJ@@ -4478,11 +4478,11 @@ paths:example:id: pss_gbHJdmfrXBstatus: pending- external_id: bogus_seti_703c412fe38e6b8630fac999- external_client_secret: bogus_seti_secret_bbff2501d5972a54+ external_id: bogus_seti_7e7facbd1ad73e6e3cb81d9e+ external_client_secret: bogus_seti_secret_dac647897d74c085external_data: {}- created_at: '2026-02-21T09:07:35.877Z'- updated_at: '2026-02-21T09:07:35.877Z'+ created_at: '2026-02-21T13:15:05.340Z'+ updated_at: '2026-02-21T13:15:05.340Z'payment_method_id: pm_UkLWZg9DAJpayment_source_id:payment_source_type:@@ -4565,12 +4565,12 @@ paths:example:id: pss_UkLWZg9DAJstatus: pending- external_id: seti_test_81df5ce2552aadf28f39cb74- external_client_secret: seti_secret_eaa6962ddb545d1620a53258+ external_id: seti_test_f591e3df347d08bb2d366087+ external_client_secret: seti_secret_45bebc3c7db600473c4dfabcexternal_data:client_secret: secret_123- created_at: '2026-02-21T09:07:37.566Z'- updated_at: '2026-02-21T09:07:37.566Z'+ created_at: '2026-02-21T13:15:06.997Z'+ updated_at: '2026-02-21T13:15:06.997Z'payment_method_id: pm_UkLWZg9DAJpayment_source_id:payment_source_type:@@ -4629,12 +4629,12 @@ paths:example:id: pss_UkLWZg9DAJstatus: completed- external_id: seti_test_0057f0f2d25d0db0c8db5d6d- external_client_secret: seti_secret_8af79e81d0c7168674850aba+ external_id: seti_test_c1de3a42cf3e7d445471877a+ external_client_secret: seti_secret_a403e04eb5ea9e01ec9f4305external_data:client_secret: secret_123- created_at: '2026-02-21T09:07:38.934Z'- updated_at: '2026-02-21T09:07:38.953Z'+ created_at: '2026-02-21T13:15:08.134Z'+ updated_at: '2026-02-21T13:15:08.149Z'payment_method_id: pm_UkLWZg9DAJpayment_source_id: card_UkLWZg9DAJpayment_source_type: Spree::CreditCard@@ -4703,11 +4703,11 @@ paths:payment_method_id: pm_UkLWZg9DAJstate: checkoutresponse_code: '12345'- number: PXRM3TYH+ number: PXR973POamount: '110.0'display_amount: "$110.00"- created_at: '2026-02-21T09:07:40.332Z'- updated_at: '2026-02-21T09:07:40.332Z'+ created_at: '2026-02-21T13:15:09.356Z'+ updated_at: '2026-02-21T13:15:09.356Z'source_type: credit_cardsource_id: card_UkLWZg9DAJsource:@@ -4787,11 +4787,11 @@ paths:payment_method_id: pm_UkLWZg9DAJstate: checkoutresponse_code: '12345'- number: PKKGFQV9+ number: PHXQC56Tamount: '110.0'display_amount: "$110.00"- created_at: '2026-02-21T09:07:41.839Z'- updated_at: '2026-02-21T09:07:41.839Z'+ created_at: '2026-02-21T13:15:10.790Z'+ updated_at: '2026-02-21T13:15:10.790Z'source_type: credit_cardsource_id: card_UkLWZg9DAJsource:@@ -4875,20 +4875,18 @@ paths:example:data:- id: prod_UkLWZg9DAJ- name: Product 596465+ name: Product 598417description: |-- Neque suscipit qui eum temporibus doloribus quisquam consectetur nostrum. Est repudiandae quidem cumque unde consectetur possimus dignissimos. Voluptas repellat vero temporibus praesentium minima. Neque eius a tempore adipisci esse asperiores. Aspernatur officiis nulla harum ipsum nisi.- Laboriosam deserunt deleniti amet iste quod tempora corrupti. Inventore sequi magnam asperiores assumenda. Soluta culpa deserunt repellat mollitia quibusdam. Atque maiores nihil totam rerum velit in.- Veniam expedita aliquid laboriosam necessitatibus amet eligendi nobis nam. Exercitationem fugiat veritatis non illum labore cum esse. Distinctio optio facere velit est.- Qui magni porro labore cum facilis impedit eos fugit. Totam debitis ab provident voluptatibus. Accusantium deleniti ipsum voluptas nisi aperiam quae.- Omnis eos vero aperiam qui nesciunt voluptate mollitia. Fuga minima ullam autem nihil necessitatibus nobis assumenda reiciendis. Velit iusto autem voluptatem excepturi. Magni recusandae nesciunt excepturi fugit voluptatem quos nihil.- slug: product-596465+ Distinctio consequatur vitae voluptatum nihil deleniti quaerat. Libero soluta assumenda nulla sapiente inventore dolores nihil. Blanditiis dignissimos ea aspernatur eveniet maxime ab rerum. Cumque incidunt atque voluptas aspernatur.+ Sed dicta cupiditate beatae quasi. Sunt unde dolores explicabo pariatur similique ipsa. Aspernatur dolor nostrum ad repellendus.+ Sequi similique natus iure at quidem mollitia eos. Fugit distinctio dolore corrupti perspiciatis eius quidem expedita officia. Molestias saepe facere quod maiores ab. Cumque dignissimos maxime ex minima quidem vero aliquam maiores.+ slug: product-598417meta_description:meta_keywords:variant_count: 1- available_on: '2025-02-21T09:07:42.613Z'- created_at: '2026-02-21T09:07:42.633Z'- updated_at: '2026-02-21T09:07:42.728Z'+ available_on: '2025-02-21T13:15:11.518Z'+ created_at: '2026-02-21T13:15:11.534Z'+ updated_at: '2026-02-21T13:15:11.613Z'purchasable: truein_stock: falsebackorderable: true@@ -4908,18 +4906,20 @@ paths:price_list_id:original_price:- id: prod_gbHJdmfrXB- name: Product 604179+ name: Product 605301description: |-- Aliquid provident eaque repellat odio. Beatae in vitae nesciunt quis vel neque laboriosam. Explicabo sint doloremque vel nobis mollitia pariatur. Saepe cupiditate accusamus in quos nulla delectus tempora.- Velit natus quod laborum error. Illo aut cum atque nobis. Magni officia rerum laudantium quidem. Saepe cumque enim earum quia.- Ullam facilis vel commodi voluptates blanditiis corporis quasi. Alias labore qui laborum corporis cum dignissimos quo. Et sapiente occaecati voluptate voluptas doloremque est porro. Amet quasi ipsum quis laborum nam iste sed. Repellat illum numquam animi minima voluptatem tempora.- slug: product-604179+ Laborum dolor occaecati nisi iure enim reiciendis blanditiis eum. Porro quas omnis corporis hic. Et minima voluptate vero ipsam. Sed facere repellat aspernatur maiores explicabo. Quisquam asperiores sunt nam dignissimos veritatis facilis.+ Ipsa accusamus vel odit quaerat ut illo necessitatibus. Sunt officiis aspernatur perferendis laboriosam. Quaerat minima fugiat tempore nemo.+ Impedit nobis nihil eum tenetur fuga. Quos quasi debitis ab dignissimos aut quibusdam. Molestias quidem harum rem voluptatem dignissimos et.+ Sunt nobis vitae omnis nihil. Accusamus sed iusto omnis unde possimus. Doloremque minus soluta aperiam quaerat minima hic et impedit. Veniam maiores a hic magnam sequi aliquam.+ Fugit fuga repellendus dignissimos veritatis placeat magnam doloremque. Magnam dolores porro iste quasi quo fugit quia. Quidem cupiditate tempore est incidunt. Facere dolor quis fugit laboriosam repellendus optio.+ slug: product-605301meta_description:meta_keywords:variant_count: 0- available_on: '2025-02-21T09:07:42.747Z'- created_at: '2026-02-21T09:07:42.758Z'- updated_at: '2026-02-21T09:07:42.784Z'+ available_on: '2025-02-21T13:15:11.630Z'+ created_at: '2026-02-21T13:15:11.639Z'+ updated_at: '2026-02-21T13:15:11.661Z'purchasable: truein_stock: falsebackorderable: true@@ -5004,20 +5004,17 @@ paths:application/json:example:id: prod_UkLWZg9DAJ- name: Product 717071+ name: Product 719800description: |-- In placeat nesciunt numquam magnam modi reiciendis ratione at. Eum eos quo assumenda corrupti pariatur quia qui. Ratione odio in suscipit cumque qui sed atque. Iusto qui laboriosam veritatis sunt maxime nemo. Non perferendis atque recusandae nulla pariatur quae veritatis consequatur.- Assumenda esse sunt consequatur voluptatem culpa occaecati quasi. Molestias veniam odit optio fugiat sequi cumque nam. Suscipit accusamus animi quis quos debitis amet. Reprehenderit deleniti magni exercitationem unde aliquid perspiciatis. Ea sapiente quod iusto magnam adipisci beatae.- Minus libero impedit expedita tempora sit omnis. Saepe corporis explicabo ipsam consequuntur iure id debitis. Consectetur sint ipsam rem pariatur. Culpa eum fugiat voluptates incidunt quasi cupiditate.- Nam optio facere veniam distinctio minima voluptas ipsam. Quidem veniam quae voluptates minus. Harum quo deserunt repellat fugit recusandae soluta facilis. Quasi quibusdam rerum sapiente odio labore velit. Modi doloribus temporibus porro ipsa eum iusto.- Qui iure alias quas hic. Unde pariatur autem doloremque facere. Numquam tenetur molestias repudiandae sequi. Laudantium nesciunt vero sint illum excepturi ducimus qui. Reprehenderit dolorum aliquid fuga repellat nobis.- slug: product-717071+ Expedita esse nesciunt quam maxime sed. Perferendis fuga repudiandae numquam itaque iusto odit quia. A quos atque eos sed dolorum tenetur quam earum.+ Inventore consectetur delectus illo dignissimos veritatis. Distinctio dolor debitis exercitationem dolore. Neque sint ab et libero ipsum voluptates adipisci consequuntur. Suscipit aut libero deleniti iste aspernatur qui nobis.+ slug: product-719800meta_description:meta_keywords:variant_count: 1- available_on: '2025-02-21T09:07:44.066Z'- created_at: '2026-02-21T09:07:44.089Z'- updated_at: '2026-02-21T09:07:44.249Z'+ available_on: '2025-02-21T13:15:12.788Z'+ created_at: '2026-02-21T13:15:12.801Z'+ updated_at: '2026-02-21T13:15:12.866Z'purchasable: truein_stock: falsebackorderable: true@@ -5222,15 +5219,15 @@ paths:example:data:- id: ship_UkLWZg9DAJ- number: H92321187493+ number: H93280087825state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-21T09:07:48.108Z'- updated_at: '2026-02-21T09:07:48.132Z'+ created_at: '2026-02-21T13:15:16.725Z'+ updated_at: '2026-02-21T13:15:16.755Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -5238,7 +5235,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_280- name: Wilburn Abernathy+ name: Lucienne Roobaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -5335,15 +5332,15 @@ paths:application/json:example:id: ship_UkLWZg9DAJ- number: H97897945880+ number: H70983960718state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-21T09:07:49.564Z'- updated_at: '2026-02-21T09:07:49.587Z'+ created_at: '2026-02-21T13:15:18.138Z'+ updated_at: '2026-02-21T13:15:18.159Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -5351,7 +5348,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_288- name: Deanna Hartmann+ name: Idell Gerholdaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -5424,10 +5421,10 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R114491162+ number: R867738286state: delivery- token: pYoCRrQGvWFMyA3Z32dyJZkrgj7i44ZMPT3- email: [email protected]+ token: TrPmsLVRMfd48DvocnKdAmTMCZ9FyuS4iuW+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -5450,16 +5447,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-21T09:07:50.911Z'- updated_at: '2026-02-21T09:07:51.041Z'+ created_at: '2026-02-21T13:15:19.388Z'+ updated_at: '2026-02-21T13:15:19.511Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 1033509- slug: product-1033509+ name: Product 103951+ slug: product-103951options_text: ''price: '10.0'display_price: "$10.00"@@ -5478,23 +5475,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:07:50.978Z'- updated_at: '2026-02-21T09:07:50.978Z'+ created_at: '2026-02-21T13:15:19.451Z'+ updated_at: '2026-02-21T13:15:19.451Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H23772260292+ number: H45832111747state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-21T09:07:50.991Z'- updated_at: '2026-02-21T09:07:51.040Z'+ created_at: '2026-02-21T13:15:19.464Z'+ updated_at: '2026-02-21T13:15:19.510Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -5502,7 +5499,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_296- name: Ranae Miller+ name: Rosalie Runolfssonaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -5615,10 +5612,10 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R653643949+ number: R636671590state: cart- token: vYxQnmaQZqaAYneLrntLhXrqJrXknEQYAYy- email: [email protected]+ token: Ad2nUggyc5atSdr2B5sv4vf1y2KSDbpCjgG+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -5641,16 +5638,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-21T09:07:52.285Z'- updated_at: '2026-02-21T09:07:52.783Z'+ created_at: '2026-02-21T13:15:20.734Z'+ updated_at: '2026-02-21T13:15:21.135Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 1053008- slug: product-1053008+ name: Product 105259+ slug: product-105259options_text: ''price: '10.0'display_price: "$10.00"@@ -5669,23 +5666,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:07:52.342Z'- updated_at: '2026-02-21T09:07:52.342Z'+ created_at: '2026-02-21T13:15:20.791Z'+ updated_at: '2026-02-21T13:15:20.791Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H60098250614+ number: H93461201044state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-21T09:07:52.355Z'- updated_at: '2026-02-21T09:07:52.389Z'+ created_at: '2026-02-21T13:15:20.803Z'+ updated_at: '2026-02-21T13:15:20.824Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -5693,7 +5690,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_304- name: Debra Luettgen+ name: Aracely Wisokyaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -5715,12 +5712,12 @@ paths:- id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJstate: checkout- response_code: 1-SC-20260221090752778888- number: PBDEME1X+ response_code: 1-SC-20260221131521131701+ number: PH1FCG37amount: '10.0'display_amount: "$10.00"- created_at: '2026-02-21T09:07:52.783Z'- updated_at: '2026-02-21T09:07:52.783Z'+ created_at: '2026-02-21T13:15:21.135Z'+ updated_at: '2026-02-21T13:15:21.135Z'source_type: store_creditsource_id: credit_UkLWZg9DAJsource:@@ -5834,10 +5831,10 @@ paths:application/json:example:id: or_UkLWZg9DAJ- number: R619244500+ number: R063543006state: cart- token: NccsrUrGDLnU3qCgaVK6EK3op4oczEuMyou- email: [email protected]+ token: DBckefMfwia72wzVFKFJjMzfDzxDWr5ux2k+ email: [email protected]special_instructions:currency: USDitem_count: 1@@ -5860,16 +5857,16 @@ paths:total: '110.0'display_total: "$110.00"completed_at:- created_at: '2026-02-21T09:07:54.112Z'- updated_at: '2026-02-21T09:07:54.235Z'+ created_at: '2026-02-21T13:15:22.436Z'+ updated_at: '2026-02-21T13:15:22.568Z'order_promotions: []line_items:- id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 1075408- slug: product-1075408+ name: Product 1074959+ slug: product-1074959options_text: ''price: '10.0'display_price: "$10.00"@@ -5888,23 +5885,23 @@ paths:discounted_amount: '10.0'display_discounted_amount: "$10.00"display_compare_at_amount: "$0.00"- created_at: '2026-02-21T09:07:54.177Z'- updated_at: '2026-02-21T09:07:54.177Z'+ created_at: '2026-02-21T13:15:22.522Z'+ updated_at: '2026-02-21T13:15:22.522Z'compare_at_amount:thumbnail_url:option_values: []digital_links: []shipments:- id: ship_UkLWZg9DAJ- number: H46331343101+ number: H04660718515state: pendingtracking: U10000tracking_url:cost: '100.0'display_cost: "$100.00"shipped_at:- created_at: '2026-02-21T09:07:54.193Z'- updated_at: '2026-02-21T09:07:54.222Z'+ created_at: '2026-02-21T13:15:22.535Z'+ updated_at: '2026-02-21T13:15:22.558Z'shipping_method:id: shpm_UkLWZg9DAJname: UPS Ground@@ -5912,7 +5909,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_312- name: Ora Beahan+ name: Ed Collieraddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -5992,26 +5989,16 @@ paths:meta_description: Sample store description.meta_keywords:seo_title:- default_currency: USDcode: spree_1- default: truefacebook: spreecommercetwitter: spreecommerceinstagram: spreecommercecustomer_support_email: [email protected]- default_locale: en- created_at: '2026-02-21T09:06:42.736Z'- updated_at: '2026-02-21T09:06:42.881Z'- default_country_iso: US- supported_currencies:- - USD- - EUR- - GBP+ created_at: '2026-02-21T13:14:17.007Z'+ updated_at: '2026-02-21T13:14:17.101Z'favicon_image_url:logo_image_url:social_image_url:- supported_locales:- - enpayment_methods: []schema:"$ref": "#/components/schemas/StoreStore"@@ -6066,32 +6053,32 @@ paths:- id: txnmy_UkLWZg9DAJname: Categoriesposition: 1- created_at: '2026-02-21T09:06:42.746Z'- updated_at: '2026-02-21T09:06:42.776Z'+ created_at: '2026-02-21T13:14:17.015Z'+ updated_at: '2026-02-21T13:14:17.035Z'root_id: txn_UkLWZg9DAJ- id: txnmy_gbHJdmfrXBname: Brandsposition: 2- created_at: '2026-02-21T09:06:42.777Z'- updated_at: '2026-02-21T09:06:42.791Z'+ created_at: '2026-02-21T13:14:17.036Z'+ updated_at: '2026-02-21T13:14:17.042Z'root_id: txn_gbHJdmfrXB- id: txnmy_EfhxLZ9ck8name: Collectionsposition: 3- created_at: '2026-02-21T09:06:42.793Z'- updated_at: '2026-02-21T09:06:42.884Z'+ created_at: '2026-02-21T13:14:17.043Z'+ updated_at: '2026-02-21T13:14:17.103Z'root_id: txn_EfhxLZ9ck8- id: txnmy_VqXmZF31wYname: taxonomy_11position: 4- created_at: '2026-02-21T09:07:54.290Z'- updated_at: '2026-02-21T09:07:54.299Z'+ created_at: '2026-02-21T13:15:22.615Z'+ updated_at: '2026-02-21T13:15:22.623Z'root_id: txn_OIJLhNcSbf- id: txnmy_uw2YK1rnl0name: taxonomy_12position: 5- created_at: '2026-02-21T09:07:54.300Z'- updated_at: '2026-02-21T09:07:54.308Z'+ created_at: '2026-02-21T13:15:22.624Z'+ updated_at: '2026-02-21T13:15:22.631Z'root_id: txn_AXs1igzRC6meta:page: 1@@ -6157,8 +6144,8 @@ paths:id: txnmy_VqXmZF31wYname: taxonomy_17position: 4- created_at: '2026-02-21T09:07:54.577Z'- updated_at: '2026-02-21T09:07:54.585Z'+ created_at: '2026-02-21T13:15:22.880Z'+ updated_at: '2026-02-21T13:15:22.893Z'root_id: txn_OIJLhNcSbfschema:"$ref": "#/components/schemas/StoreTaxonomy"@@ -6219,8 +6206,8 @@ paths:meta_description:meta_keywords:children_count: 0- created_at: '2026-02-21T09:06:42.762Z'- updated_at: '2026-02-21T09:06:42.773Z'+ created_at: '2026-02-21T13:14:17.025Z'+ updated_at: '2026-02-21T13:14:17.034Z'parent_id:taxonomy_id: txnmy_UkLWZg9DAJdescription: ''@@ -6239,8 +6226,8 @@ paths:meta_description:meta_keywords:children_count: 0- created_at: '2026-02-21T09:06:42.779Z'- updated_at: '2026-02-21T09:06:42.784Z'+ created_at: '2026-02-21T13:14:17.038Z'+ updated_at: '2026-02-21T13:14:17.041Z'parent_id:taxonomy_id: txnmy_gbHJdmfrXBdescription: ''@@ -6259,8 +6246,8 @@ paths:meta_description:meta_keywords:children_count: 2- created_at: '2026-02-21T09:06:42.802Z'- updated_at: '2026-02-21T09:06:42.884Z'+ created_at: '2026-02-21T13:14:17.045Z'+ updated_at: '2026-02-21T13:14:17.103Z'parent_id:taxonomy_id: txnmy_EfhxLZ9ck8description: ''@@ -6279,8 +6266,8 @@ paths:meta_description:meta_keywords:children_count: 0- created_at: '2026-02-21T09:06:42.820Z'- updated_at: '2026-02-21T09:06:42.822Z'+ created_at: '2026-02-21T13:14:17.055Z'+ updated_at: '2026-02-21T13:14:17.057Z'parent_id: txn_EfhxLZ9ck8taxonomy_id: txnmy_EfhxLZ9ck8description: ''@@ -6299,8 +6286,8 @@ paths:meta_description:meta_keywords:children_count: 0- created_at: '2026-02-21T09:06:42.832Z'- updated_at: '2026-02-21T09:06:42.833Z'+ created_at: '2026-02-21T13:14:17.065Z'+ updated_at: '2026-02-21T13:14:17.066Z'parent_id: txn_EfhxLZ9ck8taxonomy_id: txnmy_EfhxLZ9ck8description: ''@@ -6319,8 +6306,8 @@ paths:meta_description:meta_keywords:children_count: 1- created_at: '2026-02-21T09:07:55.114Z'- updated_at: '2026-02-21T09:07:55.177Z'+ created_at: '2026-02-21T13:15:23.281Z'+ updated_at: '2026-02-21T13:15:23.336Z'parent_id:taxonomy_id: txnmy_VqXmZF31wYdescription: ''@@ -6339,8 +6326,8 @@ paths:meta_description:meta_keywords:children_count: 1- created_at: '2026-02-21T09:07:55.122Z'- updated_at: '2026-02-21T09:07:55.177Z'+ created_at: '2026-02-21T13:15:23.291Z'+ updated_at: '2026-02-21T13:15:23.335Z'parent_id: txn_OIJLhNcSbftaxonomy_id: txnmy_VqXmZF31wYdescription: ''@@ -6359,8 +6346,8 @@ paths:meta_description:meta_keywords:children_count: 0- created_at: '2026-02-21T09:07:55.132Z'- updated_at: '2026-02-21T09:07:55.138Z'+ created_at: '2026-02-21T13:15:23.301Z'+ updated_at: '2026-02-21T13:15:23.308Z'parent_id: txn_AXs1igzRC6taxonomy_id: txnmy_VqXmZF31wYdescription: ''@@ -6441,8 +6428,8 @@ paths:meta_description:meta_keywords:children_count: 1- created_at: '2026-02-21T09:07:56.096Z'- updated_at: '2026-02-21T09:07:56.145Z'+ created_at: '2026-02-21T13:15:24.038Z'+ updated_at: '2026-02-21T13:15:24.074Z'parent_id: txn_OIJLhNcSbftaxonomy_id: txnmy_VqXmZF31wYdescription: ''@@ -6513,19 +6500,18 @@ paths:example:data:- id: prod_UkLWZg9DAJ- name: Product 1157954- description: Exercitationem vitae commodi non aliquam rem eos architecto- ex. Eius iusto cumque maiores expedita repellat excepturi. Molestiae- omnis atque unde harum neque delectus officia maxime. Debitis- rerum fuga praesentium officia mollitia assumenda. Non id optio- inventore minus harum nisi temporibus.- slug: product-1157954+ name: Product 1157840+ description: |-+ Voluptatibus qui sint nam similique sapiente deleniti temporibus. Id accusamus consequuntur qui quis. Ad iste debitis nesciunt nulla architecto officia doloremque consectetur. Libero temporibus officiis architecto occaecati.+ Ipsam veniam corporis maiores labore assumenda. Nam eos nisi exercitationem architecto tempore dolore quisquam. Officia quam magnam accusamus iste sint eveniet asperiores atque. Ratione tempora nesciunt consectetur officia. Suscipit vel quod itaque repellat deleniti dolorum fuga.+ Ipsa itaque repellendus quae sed laudantium consequatur vero neque. Quod quae necessitatibus dolorum tempore inventore dolore. Culpa iste quae doloremque fugiat omnis commodi hic sed. Dicta veritatis cupiditate placeat porro perferendis aperiam.+ slug: product-1157840meta_description:meta_keywords:variant_count: 0- available_on: '2025-02-21T09:07:57.397Z'- created_at: '2026-02-21T09:07:57.414Z'- updated_at: '2026-02-21T09:07:57.442Z'+ available_on: '2025-02-21T13:15:24.917Z'+ created_at: '2026-02-21T13:15:24.957Z'+ updated_at: '2026-02-21T13:15:25.018Z'purchasable: truein_stock: falsebackorderable: true@@ -6622,9 +6608,9 @@ paths:data:- id: wl_UkLWZg9DAJname: My Wishlist- token: PnNzDNuBRb2AiEZGqqcnV1PK- created_at: '2026-02-21T09:07:59.938Z'- updated_at: '2026-02-21T09:07:59.938Z'+ token: QRBW8BqsQFx2nkrG5n133ig3+ created_at: '2026-02-21T13:15:26.140Z'+ updated_at: '2026-02-21T13:15:26.140Z'is_default: falseis_private: truemeta:@@ -6683,9 +6669,9 @@ paths:example:id: wl_gbHJdmfrXBname: Birthday Ideas- token: gvkadCSc5Xs344Qg9exv4Het- created_at: '2026-02-21T09:08:01.511Z'- updated_at: '2026-02-21T09:08:01.511Z'+ token: bYMTYA3ZJpWDCmDr7N7oBLhL+ created_at: '2026-02-21T13:15:27.523Z'+ updated_at: '2026-02-21T13:15:27.523Z'is_default: falseis_private: trueschema:@@ -6758,9 +6744,9 @@ paths:example:id: wl_UkLWZg9DAJname: My Wishlist- token: BQAgT3BnmVVCttFTCtAgqzi5- created_at: '2026-02-21T09:08:02.762Z'- updated_at: '2026-02-21T09:08:02.762Z'+ token: 7jmtradyxyGJ8wjYnn9zqRap+ created_at: '2026-02-21T13:15:28.717Z'+ updated_at: '2026-02-21T13:15:28.717Z'is_default: falseis_private: trueschema:@@ -6806,9 +6792,9 @@ paths:example:id: wl_UkLWZg9DAJname: Updated Name- token: B4dNAawiCFZso3cYvooe8bFM- created_at: '2026-02-21T09:08:04.053Z'- updated_at: '2026-02-21T09:08:04.137Z'+ token: t7sZTvnfS9KDCYXxtAt8a5yr+ created_at: '2026-02-21T13:15:29.984Z'+ updated_at: '2026-02-21T13:15:30.058Z'is_default: falseis_private: trueschema:@@ -6889,8 +6875,8 @@ paths:variant_id: variant_gbHJdmfrXBwishlist_id: wl_UkLWZg9DAJquantity: 1- created_at: '2026-02-21T09:08:05.469Z'- updated_at: '2026-02-21T09:08:05.469Z'+ created_at: '2026-02-21T13:15:31.391Z'+ updated_at: '2026-02-21T13:15:31.391Z'variant:id: variant_gbHJdmfrXBproduct_id: prod_gbHJdmfrXB@@ -6899,8 +6885,8 @@ paths:options_text: ''track_inventory: trueimage_count: 0- created_at: '2026-02-21T09:08:05.421Z'- updated_at: '2026-02-21T09:08:05.445Z'+ created_at: '2026-02-21T13:15:31.343Z'+ updated_at: '2026-02-21T13:15:31.367Z'thumbnail:purchasable: truein_stock: false@@ -8947,12 +8933,8 @@ components:seo_title:type: stringnullable: true- default_currency:- type: stringcode:type: string- default:- type: booleanfacebook:type: stringnullable: true@@ -8965,19 +8947,10 @@ components:customer_support_email:type: stringnullable: true- default_locale:- type: stringcreated_at:type: stringupdated_at:type: string- default_country_iso:- type: string- nullable: true- supported_currencies:- type: array- items:- type: stringfavicon_image_url:type: stringnullable: true@@ -8987,10 +8960,6 @@ components:social_image_url:type: stringnullable: true- supported_locales:- type: array- items:- type: stringpayment_methods:type: arrayitems:@@ -9002,22 +8971,16 @@ components:- meta_description- meta_keywords- seo_title- - default_currency- code- - default- customer_support_email- - default_locale- created_at- updated_at- - default_country_iso- - supported_currencies- favicon_image_url- logo_image_url- social_image_url- - supported_locales- payment_methodsx-typelizer: trueStoreTaxon:diff --git a/docs/developer/upgrades/5.3-to-5.4.mdx b/docs/developer/upgrades/5.3-to-5.4.mdxindex 8297cc06f9..e18eaa9af6 100644--- a/docs/developer/upgrades/5.3-to-5.4.mdx+++ b/docs/developer/upgrades/5.3-to-5.4.mdx@@ -85,6 +85,48 @@ endPrefix length isn't limited by default, but we recommend to keep it short.+### Migrate Checkout Zones to Markets++Spree 5.4 introduces [Markets](/developer/core-concepts/markets) as the primary way to manage which countries are available for checkout, along with their currencies and locales. The legacy `checkout_zone` field on the Store model is now deprecated and will be removed in Spree 5.5.++New stores automatically get a default market created from their `default_country` — no manual setup needed. For existing stores that used `checkout_zone`, run the migration rake task:++ ```bash+ bin/rake spree:markets:migrate_checkout_zones+ ```++This will:+1. Read the `checkout_zone` countries from each store+2. Create a default Market with those countries, currency, and locale+3. Clear the `checkout_zone_id` column++<Warning>+ You will need to run this rake task locally and on your production environment. After running, verify your markets are set up correctly in the Admin Dashboard under **Settings → Markets**.+</Warning>++#### Deprecated Store methods++The following Store methods now emit deprecation warnings and will be removed in Spree 5.5:++| Deprecated method | Replacement |+|---|---|+| `store.checkout_zone` | Use [Markets](/developer/core-concepts/markets) to manage countries |+| `store.checkout_zone=` | Use [Markets](/developer/core-concepts/markets) to manage countries |++The `store.default_country` reader now returns the first country (by name) from the store's default market. The `store.default_country_iso=` setter still works and is used to set the country when creating a store — a default market is automatically created from it.++#### Code that references `checkout_zone` for tax++If your application used `store.checkout_zone` as a tax zone fallback, update it to use `Spree::Zone.default_tax` instead:++```ruby+# Before+zone = current_store.checkout_zone++# After+zone = Spree::Zone.default_tax+```+### (Optional) Install API v2Spree 5.4 ships with API v3, which marks deprecation of API v2. API v2 is still available but you need to install it separately. If you currently use API v2, you can do this by running the following command:diff --git a/docs/docs.json b/docs/docs.jsonindex e7cc0f2c4b..d5092f968d 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -229,6 +229,7 @@{"group": "Upgrade Guides","pages": [+ "developer/upgrades/5.3-to-5.4","developer/upgrades/5.2-to-5.3","developer/upgrades/5.1-to-5.2","developer/upgrades/5.0-to-5.1",diff --git a/packages/next/.changeset/deprecate-store-checkout-zone.md b/packages/next/.changeset/deprecate-store-checkout-zone.mdnew file mode 100644index 0000000000..ed2ece9344--- /dev/null+++ b/packages/next/.changeset/deprecate-store-checkout-zone.md@@ -0,0 +1,5 @@+---+'@spree/next': patch+---++Update `StoreStore` type — fields removed upstream in `@spree/sdk` (`default_currency`, `default_locale`, `default`, `supported_currencies`, `supported_locales`, `default_country_iso`) are no longer part of the store response. Use dedicated `listCurrencies`, `listLocales`, and `listCountries` functions instead.diff --git a/packages/sdk/.changeset/deprecate-store-checkout-zone.md b/packages/sdk/.changeset/deprecate-store-checkout-zone.mdnew file mode 100644index 0000000000..606c091c0e--- /dev/null+++ b/packages/sdk/.changeset/deprecate-store-checkout-zone.md@@ -0,0 +1,12 @@+---+'@spree/sdk': minor+---++Remove deprecated fields from `StoreStore` type — these are now managed through Markets and dedicated API endpoints++- Remove `default_currency` — use `store.currencies.list()` or the `X-Spree-Country` header for automatic currency resolution+- Remove `default_locale` — use `store.locales.list()` or the `X-Spree-Country` header for automatic locale resolution+- Remove `default` — internal flag, not useful for storefront clients+- Remove `supported_currencies` — use `store.currencies.list()` instead+- Remove `supported_locales` — use `store.locales.list()` instead+- Remove `default_country_iso` — use `store.countries.list()` insteaddiff --git a/packages/sdk/src/types/generated/StoreStore.ts b/packages/sdk/src/types/generated/StoreStore.tsindex c08e6763d6..a5798f0240 100644--- a/packages/sdk/src/types/generated/StoreStore.ts+++ b/packages/sdk/src/types/generated/StoreStore.ts@@ -1,4 +1,4 @@-// Typelizer digest b0ecec6ce200842afc076bf2ec1b8716+// Typelizer digest e86d34b6d54b848c8389f2075e9f2a51//// DO NOT MODIFY: This file was automatically generated by Typelizer.import type {StorePaymentMethod} from '@/types'@@ -10,22 +10,16 @@ type StoreStore = {meta_description: string | null;meta_keywords: string | null;seo_title: string | null;- default_currency: string;code: string;- default: boolean;facebook: string | null;twitter: string | null;instagram: string | null;customer_support_email: string | null;- default_locale: string;created_at: string;updated_at: string;- default_country_iso: string | null;- supported_currencies: Array<string>;favicon_image_url: string | null;logo_image_url: string | null;social_image_url: string | null;- supported_locales: Array<string>;payment_methods: Array<StorePaymentMethod>;}diff --git a/packages/sdk/src/zod/generated/StoreStore.ts b/packages/sdk/src/zod/generated/StoreStore.tsindex 8f12e86f0a..d89b022ef2 100644--- a/packages/sdk/src/zod/generated/StoreStore.ts+++ b/packages/sdk/src/zod/generated/StoreStore.ts@@ -9,22 +9,16 @@ export const StoreStoreSchema = z.object({meta_description: z.string().nullable(),meta_keywords: z.string().nullable(),seo_title: z.string().nullable(),- default_currency: z.string(),code: z.string(),- default: z.boolean(),facebook: z.string().nullable(),twitter: z.string().nullable(),instagram: z.string().nullable(),customer_support_email: z.string().nullable(),- default_locale: z.string(),created_at: z.string(),updated_at: z.string(),- default_country_iso: z.string().nullable(),- supported_currencies: z.array(z.string()),favicon_image_url: z.string().nullable(),logo_image_url: z.string().nullable(),social_image_url: z.string().nullable(),- supported_locales: z.array(z.string()),payment_methods: z.array(StorePaymentMethodSchema),});