$wsSubshop module, you can access subshop data. Typical use cases are language switchers or links between different country and language versions of the shop. In this section, you will learn how to read out subshop information and link between subshops.
Module overview
Example / excerpt of$wsSubshop
ƒ() denotes a function.
Variables and methods overview
| Name | Type | Description |
|---|---|---|
id | string | ID of the current subshop. |
language | map | Map with language information of the subshop. |
isoCode | string | ISO language code (e.g. "DE", "EN"). |
name | string | Name of the language (e.g. "Deutsch", "Englisch"). |
subshops | array | List of all available subshop IDs. |
subshopUrl() | string | Returns the URL to the home page of the specified subshop. |
Templates
Subshop data is typically used in the following places:- Header: language switcher between different subshops.
- Footer: links to other country/language versions of the shop.
- Content: country-specific notices or adjustments.
Variables
$wsSubshop.id
Returns the ID of the current subshop.$wsSubshop.language
Returns a map with language information of the current subshop.$wsSubshop.language.isoCode
Returns the ISO language code of the current subshop.$wsSubshop.language.name
Returns the name of the language of the current subshop.$wsSubshop.subshops
Returns a list of all available subshop IDs. Useful for creating a language switcher or country selector.Methods
$wsSubshop.subshopUrl()
Returns the URL to the home page of the specified subshop. The URL automatically takes into account the correct domain and path of the target subshop. Signature$wsSubshop.subshopUrl(subshopId)
Return valuestring - URL of the specified subshop.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
subshopId | string | yes | ID of the target subshop. |
Actions
No actions are available for$wsSubshop.
