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
Update Country Settings
Matthew Kennedy60af451c5cd1
diff --git a/backend/app/views/spree/admin/countries/_form.html.erb b/backend/app/views/spree/admin/countries/_form.html.erbindex a18b5e8862..fa75a37692 100644--- a/backend/app/views/spree/admin/countries/_form.html.erb+++ b/backend/app/views/spree/admin/countries/_form.html.erb@@ -24,9 +24,14 @@<% end %><div data-hook="states_required" class="form-group checkbox">- <label>- <%= f.check_box :states_required %>- <%= Spree.t(:states_required) %>- </label>+ <%= f.check_box :states_required %>+ <%= f.label :states_required, Spree.t(:states_required) %>+ <%= f.error_message_on :states_required %>+ </div>++ <div data-hook="zipcode_required" class="form-group checkbox">+ <%= f.check_box :zipcode_required %>+ <%= f.label :zipcode_required, Spree.t(:zipcode_required) %>+ <%= f.error_message_on :zipcode_required %></div></div>diff --git a/backend/app/views/spree/admin/countries/index.html.erb b/backend/app/views/spree/admin/countries/index.html.erbindex cecfe54041..f4964570eb 100644--- a/backend/app/views/spree/admin/countries/index.html.erb+++ b/backend/app/views/spree/admin/countries/index.html.erb@@ -10,8 +10,9 @@<thead><tr data-hook="tax_header"><th><%= Spree.t(:country_name) %></th>- <th><%= Spree.t(:iso_name) %></th>+ <th><%= Spree.t(:iso3) %></th><th><%= Spree.t(:states_required) %></th>+ <th><%= Spree.t(:zipcode_required) %></th><th class="actions"></th></tr></thead>@@ -19,8 +20,9 @@<% @countries.each do |country| %><tr id="<%= spree_dom_id country %>" data-hook="country_row"><td><%= country.name %></td>- <td><%= country.iso_name %></td>+ <td><%= country.iso3 %></td><td class="text-center"><%= country.states_required? ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>+ <td class="text-center"><%= country.zipcode_required? ? Spree.t(:say_yes) : Spree.t(:say_no) %></td><td class="actions actions-2 text-right"><%= link_to_edit(country, no_text: true) if can? :edit, country %><%= link_to_delete(country, no_text: true) if can? :delete, country %>diff --git a/core/config/locales/en.yml b/core/config/locales/en.ymlindex d3de9cfd59..3e1d2795bf 100644--- a/core/config/locales/en.yml+++ b/core/config/locales/en.yml@@ -986,7 +986,9 @@ en:inventory_error_flash_for_insufficient_quantity: An item in your cart has become unavailable.inventory_state: Inventory Stateis_not_available_to_shipment_address: is not available to shipment address- iso_name: Iso Name+ iso: ISO Alpha-2 Code+ iso3: ISO Alpha-3 Code+ iso_name: ISO Nameissued_on: Issued Onitem: Itemitem_description: Item Description@@ -1792,5 +1794,6 @@ en:your_order_is_empty_add_product: Your order is empty, please search for and add a product abovezip: Zipzipcode: Zip Code+ zipcode_required: Zip Code Requiredzone: Zonezones: Zones