Override Module Prestashop [top] Jun 2026
: Locate the module's main PHP file (e.g., modules/ps_shoppingcart/ps_shoppingcart.php ).
// Add your own code here $this->context->controller->addCSS($this->_path . 'views/css/custom.css'); override module prestashop
// Modify template or assign new variables $this->context->smarty->assign('custom_var', 'Hello from override'); : Locate the module's main PHP file (e
Override blockcart module to add a discount message in cart summary. _path . 'views/css/custom.css')
Overrides work only for module classes and controllers , not for templates (templates must be copied to your theme).
// Change template if needed $this->setTemplate('module:mymodule/views/templates/front/custom.tpl');

