For anonomous users it is possible to define markets and connect markets to price lists, availability and languages.
Markets functionality is available in version 5.1 and later
Overview
When arriving at a site with market selector configured, anonomous users will get prompted to select user’s market. It may look like this:
Function has a few different options.
Show market selector at first visit
Prompt user by showing a bar at top. Suggested market will be based on browser’s language, but user may see all markets and select another if user wishes.
Present a full screen market selector.
The full screen market selector will show all markets. They will be grouped per region and sorted per name. The names will display in both english and in local language for that country.
Each market is also connected to a default language which will be set when user selects that market. User may change language at any point in time.
In case there are several markets for the same country, but with different language, the market will display with the language afterwards within ().
Selected market is stored in a cookie.
Defining markets
Available markets are defined in admin section where all markets are created. Each market may have a price list and a warehouse. If a market does not have a price list or a warehouse, that market will not display prices or availability. Each market is also connected to a default language which will be set when user selects that market.
If a market has several languages, then define the market two times but select different default language for each of the two. The combination of market and language has to be unique.
When creating a new market, select the country, the default languages and the price lists and warehouses. The Region is a free text field, but the drop down will display previously entered regions. The Region value is a key text so it may be translated using custom-texts.config.
In the case the automatically created name for the market is not wanted, it is possible to add a custom name. This custom name will then display instead of the automaticall created name. The custom name is a key text so it may be translated using custom-texts.config.
Price and Availability providers
Provider | Usage |
---|---|
AssertDbPriceProvider | The drop down with price lists will be populated with the price lists in the Server database. |
AssertDbAvailabilityProvider | The drop down with warehouses lists will be populated with the warehouses in the Server database. |
AssertRESTPriceProvider | The price list field will be a free text field. The value in the field will be included in the GetPrice REST call. |
AssertRESTAvailabilityProvider | The wareouse field will be a free text field. The value in the field will be included in the GetAvailability REST call. |
Configuration
Configuration is done in profile.config.
<MarketManager> <!-- Default market if market cannot be resolved by browser language or no other option exist --> <MarketManager default-market="EN,en-GB"/> </MarketManager> <MarketSetting> <!-- Enable market selection features --> <EnableMarketSelector>true</EnableMarketSelector> <!-- Market selector will be shown as a modal popup instead of as a page --> <EnableMarketViewAsModal>true</EnableMarketViewAsModal> <!-- Will present market selector at first visit to site by user --> <EnableMarketViewFirstSiteVisit>true</EnableMarketViewFirstSiteVisit> <!-- Hero image for the market selector screen --> <MarketViewHeaderImage>Download_header.jpg</MarketViewHeaderImage> </MarketSetting> <!-- Layout options for market (and language), see separate article --> <MainLayout> <!-- Will define where market selector is shown. --> <MarketSelector display="header" /> <LanguageSelector display="headertoolbar" /> </MainLayout>
For UI options for market selector see Technical documentation - Main Layout and navigation bar
For configuration of price and availability providers see separate articles.