Reputation: 872
I am new to prestashop and developing a module to change behaviour of checkout process. As i am new, i am first overriding IndexController.php file in my module directory to just test the overriding mechanism in prestashop. The directory structure, i have followed, to override controller file as:
modules/my_modules/override/controllers/front/IndexController.php
Below is the code of above file:
class IndexController extends IndexControllerCore{
public function __construct() {
parent::__construct();
d('You are overriding index file');
}
}
In above code, i have just created an construct and print a test string with die. But nothing is happening on the home page on front end. I have also tried with override another controller file, but i have got same result.
I have searched many things on google, but nothing got. Please anyone tell me, what i am doing wrong in this? if the logic is correct, then why overriding is not working here?
Waiting for solution.
Upvotes: 1
Views: 1957
Reputation: 5748
Like @rsanchez said. You need to reinstall the module everytime you change your module's overrides. Prestashop will not automatically check for new changes or new overrides without it.
Upvotes: 1