Actions overview
Actions
TestModeOn
This action activates test mode. The user must provide the configured test mode password. With themakePaymentFail parameter, payments in test mode are additionally simulated as failed. This causes orders to run into the error case on purpose, so that the templates and workflows designed for it can be checked. The current configuration can be queried in the template via $wsTestMode.
With the searchTestApi parameter, you signal to the storefront that it should use the test API of the WEBSALE search instead of the production API. The switch does not change anything in the shop itself. The shop does not call the WEBSALE search itself but passes the value on via $wsTestMode.searchTestApi.
With the compileTemplates parameter, the shop compiles the views from the template sources on every request instead of loading them from the precompiled theme. This makes changes to the templates visible immediately. Due to the associated time cost, this setting is only suitable for testing. The current configuration can be queried via $wsTestMode.compileTemplates.
Switches that are not checked in the form are off after activation.
Usage exampleCan be used on the test mode page (
testMode.htm), through which shop operators or testers can activate test mode with a password to see test-specific content.
Parameters
Error codes
Related modules, variables & methods
- $wsTestMode
- $wsTestMode.active
- $wsTestMode.debug
- $wsTestMode.makePaymentFail
- $wsTestMode.searchTestApi
- $wsTestMode.compileTemplates
TestModeOff
This action deactivates test mode and the shop returns to normal live operation. Usage exampleCan be used on the test mode page or in the shop header to deactivate test mode directly in the shop. Related modules, variables & methods Example showing how test mode is deactivated via a button.
TestModeChange
This action lets you change the switches of the active test mode without leaving test mode. The prerequisite is that test mode was previously activated with the password.When saving via the form, the action always sets all switches. The browser does not send an unchecked checkbox at all. A switch that is missing from the form or not checked is therefore off after saving. For this reason, include all switches in the form. This does not apply via the Storefront API. There,
testMode/update only changes the switches that are sent.Can be used on the test mode page, for example to switch off debugging while test mode is active without ending test mode. Parameters
Error codes
Related modules, variables & methods
- $wsTestMode
- $wsTestMode.active
- $wsTestMode.debug
- $wsTestMode.makePaymentFail
- $wsTestMode.searchTestApi
- $wsTestMode.compileTemplates
