Skip to main content
This section describes the available actions in the test mode area. Using these actions, you can activate and deactivate test mode. When activating it and while test mode is active, you can also enable extended debugging, simulate failed payments, and signal to the storefront that it should use the test API of the WEBSALE search. You can also have the views compiled from the template sources on every request.

Actions overview


Actions

TestModeOn

This action activates test mode. The user must provide the configured test mode password. With the makePaymentFail 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 example
Can 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 Example showing how test mode is activated via a password form. Debugging, simulated failed payments, and the signal for the test API of the WEBSALE search are optional.

TestModeOff

This action deactivates test mode and the shop returns to normal live operation. Usage example
Can 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.
Usage example
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 Example showing how the switches of the active test mode are changed.