$wsTestMode module, you can check whether test mode is active and control content accordingly. In test mode, you can test new functions, designs, or products without them being visible to regular visitors. In this section, you will learn how to query the test mode and display test-specific content.
Module overview
Example / excerpt of$wsTestMode
| Variable | Type | Description |
|---|---|---|
active | bool | Checks whether test mode is enabled. |
debug | bool | Checks whether debugging is enabled in test mode. |
Templates
Using the template engine, certain content can be made specifically visible for test mode. This allows you to test special functions or designs without them being visible to regular visitors of the shop. A special view template is required for password entry to activate test mode. By default, the name istestMode.htm, which is located in the views directory.
The template can be renamed. However, the new template name must then be stored in the configuration settings in the admin interface. The configuration option is located in the same place where the password for test mode can be stored and changed.
Variables
$wsTestMode.active
Returns whether test mode is enabled.$wsTestMode.debug
Returnstrue if extended debugging is enabled. In debug mode, additional information such as variable values or loading times is displayed.
Methods
No methods are available for$wsTestMode.
Actions
No actions are available for$wsTestMode.
Examples for using test mode
Link to activate global test mode
The link can be sent once you have informed the shop operator that changes have been integrated in test mode and that they can view them via the following link:Check whether test mode is active
Deactivating global test mode
An option to deactivate test mode can also be offered directly in the online shop in order to switch back to the online shop.→ Practical examples: test mode
