Override — Prestashop [upd]
/controllers/front/ProductController.php
<?php // override/controllers/front/ProductController.php class ProductController extends ProductControllerCore override prestashop
<?php // override/controllers/admin/AdminOrdersController.php class AdminOrdersController extends AdminOrdersControllerCore /controllers/front/ProductController
die('My override loaded'); Or check in class_index.php : Common Pitfalls & Solutions | Problem | Solution
return parent::install() && $this->installOverrides();
Goal: Add a button in order list.
❌ You can do the same with a hook, template, or module configuration. 9. Common Pitfalls & Solutions | Problem | Solution | |---------|----------| | White screen after override | Check PHP error log; verify you extended the correct parent class ( XXXCore ) | | Override ignored | Delete /var/cache/prod/class_index.php and clear cache | | Conflict between two modules | One will win; override should be inside a custom module, not directly in /override/ | | Override breaks after PS update | Review changelog – your overridden method may have changed signature | | Can't override static methods | You can, but careful; call parent::method() if needed | 10. Best Practice – Use a Custom Module Instead of placing files directly in /override/ , put overrides inside a custom module :