Jump to content

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..

Link to comment
Share on other sites

  • 3 weeks later...

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...

 

Link to comment
Share on other sites

×
×
  • Create New...