Dynamic Multistore
Edit on GitHubThe Dynamic Multistore feature lets you create and manage multiple stores within the same region in the Back Office. It streamlines the setup and maintenance of distinct stores tailored to various customer segments, regions, or product categories.
In the Back Office, in the Administration > Stores, you can view the list of stores in the current region. The Stores page shows all the stores within a specific region.
Creating a store
You can create a new store in the Back Office.
Assigning locales
When creating a store, you can assign locales and specify a default one for the store. This is useful for making the store accessible and user-friendly for different regions.
Adding currencies
To define which currencies the customers can you use, you can assign them to the store.
Store settings
To define additional store settings in the Settings tab. When creating a store, you can assign timezone per application or specify a default one.
Publishing and synchronizing
When the new queue infrastructure is published, the store becomes visible on the Storefront.
Assigning products and prices to stores
You can assign products and their prices to stores using the Back Office or other methods of creating products.
The following image shows how you can assign a product to a store.
The following image shows how you can assign a product price to a store.
Viewing stores on the Storefront
The following example shows the store created in the Back Office being available on the Storefront.
The product that was assigned to the store in Assigning products and prices to stores is available in this store.
Assigning CMS pages
By assigning CMS pages to stores, you can define which stores they are shown in.
When such a CMS page is published, it’s only visible in the store it’s assigned to.
Using the Storefront APIs
Normal storefront APIs can be used to fetch data from stores using the Store HTTP header, allowing access to Catalog Search or product details.
The following image shows the ability to call API endpoints with the exemplary “SECOND” store selected in the API call itself.
Adding stores using data import
You can add a new store using data import or in the Back Office. Adding a store in the Back Office is easier and faster, but you have to add each store across all environments.
Using data import, you can configure a new store once and deploy it across all environments. For instructions on importing stores, see Import data.
When you add a new store, to enable store-related entities for customers, you need to assign them to the store. Some of the store related entities:
- Products
- Categories
- CMS entities
- Prices
To avoid manually assigning entities in the Back Office, you can assign them using data import. For more details, see Import stores.
How Dynamic Multistore affects a project
In this example, EU region has DE and AT stores. US region has a US store. Dynamic Multistore introduces the following changes in this setup:
-
URLs for Storefront, Back Office, Merchant Portal, and Glue API contain region instead of store name. For example–the URL of the Back Office is
https://backoffice.eu.mysprykershop.com
instead ofhttps://backoffice.de.mysprykershop.com
. -
RabbitMQ virtual hosts contain region instead of store. For example–
eu-docker
instead ofde-docker
.
- Jenkins job names contain region instead of store. For example–
EU_queue-worker-start
instead ofDE_queue-worker-start
.
- Elasticsearch indexes contain store as a part of the index name for Dynamic Multistore enabled and disabled modes.
-
Redis keys contain store as a part of the key name for Dynamic Multistore enabled and disabled modes.
-
When Dynamic Multistore is enabled, customers can switch between available stores for a region. When a customer changes a store, it’s set to the
_store
query parameter. Using the query parameter, the store is added to session under thecurrent_store
key. It’s used for fetching store-related data.
Data import performance
The number of stores affects data import speed: the more stores you have, the slower the data import. Importing products for 40 stores takes approximately 5 times longer than for 8 stores.
Thank you!
For submitting the form