Skip to main content
With the $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
JSON output
Note: ƒ() denotes a function. Variables and methods overview

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.currentTime

Returns the current timestamp in ISO 8601 format (e.g., 2026-06-26T09:18:59.000Z). Format this value with the global function dateFmt() into a readable date or time.
This is how you output, for example, the current year, e.g. for a copyright notice in the footer.

$wsSubshop.timeZone

Returns the time zone configured in the shop (e.g., Europe/Berlin). This is the time zone that dateFmt() uses when no separate time zone is specified during formatting.

$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 value
string - URL of the specified subshop.
Parameters Example that outputs the URL of a subshop.

Actions

No actions are available for $wsSubshop.

Examples

Set HTML lang attribute

Display current language

Combines currentTime with dateFmt, for example to keep a copyright line always up to date.
Result

Related links