Reputation: 51
I want to override a controller in PrestaShop
<?php
class ProductController extends ProductControllerCore{
public function initContent()
{
parent::initContent();
}
public function init()
{
parent::init();
echo "datbase";
die;
}
}
?>
The file containing my Override is located in:
projectname/override/controllers/front/ProductController.php
But my override does not work.
Upvotes: 2
Views: 4501
Reputation: 2811
Updated answer for PrestaShop 1.7.x
In PrestaShop 1.7.x versions, the class_index.php file is now located in /var/cache/prod
:
Don't forget to delete this file in case you've just added a new override, otherwise it won't work.
I hope this helps!
Upvotes: 2
Reputation: 51
Ok i got it now from researching somethings
I found the solution:
You should delete the file "class_index.php" in cache folder.
Upvotes: 1