controller_before.*
Triggered before execution of a specified PHP controller.
Shop-Script
Input (passed by reference)
$params['controller'] waViewController Controller class instance.
$params['params'] array|null Parameters passed to the controller class.
$params['params'] array|null Parameters passed to the controller class.
… your plugin code …
Output
$return
A plugin may return false to prevent the controller from execution.
Shop-Script
Plugin code example
PHP
/** * 'handlers' => [ * 'controller_before.shopFrontendCartAddController' => 'controllerBeforeShopFrontendCartAddController', * ], */ public function controllerBeforeShopFrontendCartAddController(&$params) { return false; // to make adding products to cart not working any more }