From 3fab47dc03998b06a8f1a63cb6364ba178bad869 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrushev Date: Wed, 22 Dec 2021 14:19:09 +0100 Subject: [PATCH] Do not set checkout zone for new store (#87) --- .../spree/admin/stores/form/_internationalization.html.erb | 2 +- spec/features/admin/configuration/stores_spec.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/spree/admin/stores/form/_internationalization.html.erb b/app/views/spree/admin/stores/form/_internationalization.html.erb index 7f906df0f2..2778a60bb5 100644 --- a/app/views/spree/admin/stores/form/_internationalization.html.erb +++ b/app/views/spree/admin/stores/form/_internationalization.html.erb @@ -21,7 +21,7 @@
<%= f.field_container :checkout_zone_id do %> <%= f.label :checkout_zone_id, Spree.t(:shipping_zone) %> - <%= f.select :checkout_zone_id, options_for_select(@zones, selected_checkout_zone(@store)&.id), { include_blank: Spree.t(:no_limits_zone) }, { class: 'select2' } %> + <%= f.select :checkout_zone_id, options_for_select(@zones), { include_blank: Spree.t(:no_limits_zone) }, { class: 'select2' } %> <%= raw(Spree.t('admin.store_form.checkout_zone_help')) %> diff --git a/spec/features/admin/configuration/stores_spec.rb b/spec/features/admin/configuration/stores_spec.rb index 1f80f11482..04ca493eba 100644 --- a/spec/features/admin/configuration/stores_spec.rb +++ b/spec/features/admin/configuration/stores_spec.rb @@ -13,6 +13,7 @@ it 'sets default currency value', js: true do visit spree.new_admin_store_path expect(page).to have_selector(:id, 'select2-store_default_currency-container', text: 'United States Dollar (USD)') + expect(page).to have_field('store_checkout_zone_id', text: 'No Limits') end it 'saving store' do