$wsAccount). They expose variables (properties) and methods. In development, they are sometimes also referred to as view modules, since they are primarily used for output (the read side).
These modules make shop data available for template output, e.g. about products, categories, or customer data.
Custom modules cannot be created or extended.
Notation & access
- Notation:
$ws<ModuleName>(e.g.$wsAccount,$wsBasket,$wsProduct) - Modules contain variables (properties) and methods
- Access is via the dot operator (
.), e.g. on properties or methods of a module - Data fields and functions are accessed uniformly via
.
Variables & methods
A module usually provides both:- Variables (properties)
- Methods
Variables (properties)
Through variables, the module directly returns the value, which can be read out directly. Example - Indicates whether the user is logged inMethods
Methods perform the call for the module (e.g. loading data) and return a result. Example - Loads the address with the specified id$myVariable, individual properties are accessed via $myVariable.<field>:
Available modules
Here is an overview of all modules that are generally available in the WEBSALE shop:- $wsAccount
- $wsActions
- $wsAsse
- $wsBasket
- $wsCategories
- $wsCheckout
- $wsComputopHosted
- $wsConfig
- $wsConsent
- $wsCookies
- $wsDirectOrder
- $wsEmails
- $wsExternalData
- $wsForm
- $wsInventory
- $wsLastSeenProducts
- $wsMaintenance
- $wsNavigation
- $wsNewsletter
- $wsOptIn
- $wsOrderHistory
- $wsPayPalCheckout
- $wsPayPalPlus
- $wsProducts
- $wsProductRating
- $wsSecurity
- $wsSession
- $wsShipTrack
- $wsStore
- $wsStores
- $wsStripe
- $wsSubshop
- $wsTestMode
- $wsViews
- $wsVoucher
- $wsWatchList
Actions $wsActions
In parallel to the modules, there are actions that begin with $wsActions.
While modules display/read out states and data, actions are the opposite direction: they are used to create, change, or delete data – typically triggered by a user interaction (e.g. link, button, form).
For more information, see reference → actions
