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
Scope by store
Matthew Kennedy900c858c2f91
diff --git a/backend/app/controllers/spree/admin/cms_pages_controller.rb b/backend/app/controllers/spree/admin/cms_pages_controller.rbindex f723c2f7fe..fc28f0114f 100644--- a/backend/app/controllers/spree/admin/cms_pages_controller.rb+++ b/backend/app/controllers/spree/admin/cms_pages_controller.rb@@ -6,6 +6,12 @@ module Spreedef location_after_savespree.edit_admin_cms_page_path(@cms_page)end++ def find_resource+ # TODO: replace out the "current_store" for the admin equivelent "current_admin_store"+ # when it is implemented.+ Spree::CmsPage.by_store(current_store).friendly.find(params[:id])+ endendendenddiff --git a/backend/app/views/spree/admin/cms_sections/types/_side_by_side_promotion.html.erb b/backend/app/views/spree/admin/cms_sections/types/_side_by_side_promotion.html.erbindex 6620c309aa..f3704d91b0 100644--- a/backend/app/views/spree/admin/cms_sections/types/_side_by_side_promotion.html.erb+++ b/backend/app/views/spree/admin/cms_sections/types/_side_by_side_promotion.html.erb@@ -44,7 +44,7 @@autocomplete_custom_return_id_value: 'permalink' } %><%= f.error_message_on :permalink_ones %><% end %>- <small class="text-muted"><%= Spree.t('admin.cms.three_taxon_block.section_one_info') %></small>+ <small class="text-muted"><%= Spree.t('admin.cms.side_by_side.section_one_info') %></small></div></div>@@ -93,7 +93,7 @@autocomplete_custom_return_id_value: 'permalink' } %><%= f.error_message_on :permalink_two %><% end %>- <small class="text-muted"><%= Spree.t('admin.cms.three_taxon_block.section_two_info') %></small>+ <small class="text-muted"><%= Spree.t('admin.cms.side_by_side.section_two_info') %></small></div></div>diff --git a/core/app/models/spree/cms_page.rb b/core/app/models/spree/cms_page.rbindex 43cef780e4..ba1a24954b 100644--- a/core/app/models/spree/cms_page.rb+++ b/core/app/models/spree/cms_page.rb@@ -17,7 +17,7 @@ module Spreebefore_validation :handle_slugvalidates :title, presence: true- validates :slug, uniqueness: { allow_nil: true, case_sensitive: true }+ validates :slug, uniqueness: { scope: :store, allow_nil: true, case_sensitive: true }scope :visible, -> { where(visible: true) }scope :by_store, ->(store) { where(store: store) }diff --git a/core/config/locales/en.yml b/core/config/locales/en.ymlindex 43aa2bf2f2..5bcdcfe1cc 100644--- a/core/config/locales/en.yml+++ b/core/config/locales/en.yml@@ -567,6 +567,7 @@ en:button_text: Button Textgo_to_fullscreen_section_manager: Go To Fullscreen Section Managerpage_type: Page Type+ gutters: Guttersyou_have_no_pages: You have no Pages, click the <b>+ Add New Page</b> button to get started.new_page: New Pagetoggle_page_visibility: Toggle page visibility@@ -588,6 +589,10 @@ en:page_sections: '%{page_name} Sections'page_sections_info: 'The area below represents your %{page_type} displayed in %{store}, add sections and drag them into position'visible: Visible+ side_by_side:+ section_one_info: 'This section is displayed on the left hand side of the screen and stacks to fullscreen on mobile size screens. Please use an image with an aspect ratio of 54:35 (1468px x 952px).'+ section_two_info: 'This section is displayed on the right hand side of the screen and stacks to fullscreen on mobile size screens. Please use an image with an aspect ratio of 54:35 (1468px x 952px).'+three_taxon_block:top_left_block: Top Left Blocksection_one_info: 'This section is displayed in the top left of the three image block. Please use an image with an aspect ratio of 18:13 (1080px x 780px).'