Jump to content
anupama.synicsys

Controller override is not working

Recommended Posts

Hi,

   I tried to override OrderConfirmationController to do some actions after successfull order placement. As per the prestashop 1.6 documentation i tried to override OrderConfirmationController by placing OrderConfirmationController.php in modules/mymodule/override/controllers/front/OrderConfirmationController.php and the code as follows

 

class OrderConfirmationController extends OrderConfirmationControllerCore
{
    public function displayOrderConfirmation()
    {
        echo 'test'; exit;
    }
}

 

But its not working. Default function only getting called.

 

I tried by deleting class_index.php also.

 

Please help..

Share this post


Link to post
Share on other sites

Hi,

   I tried to override OrderConfirmationController to do some actions after successfull order placement. As per the prestashop 1.6 documentation i tried to override OrderConfirmationController by placing OrderConfirmationController.php in modules/mymodule/override/controllers/front/OrderConfirmationController.php and the code as follows

 

class OrderConfirmationController extends OrderConfirmationControllerCore

{

    public function displayOrderConfirmation()

    {

        echo 'test'; exit;

    }

}

 

But its not working. Default function only getting called.

 

I tried by deleting class_index.php also.

 

Please help..

I had a similar issue with PS v 1.6.0.11 . This was what I did:

In the backoffice, go to Performance->Advanced Parameters->Debug mode

and check button «Disable all overrides» if YES, I think it will not load the override modules...

 

Share this post


Link to post
Share on other sites

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More