Jump to content

How to overwrite a controller method for one module from another

Recommended Posts

I have one subscription module on Prestashop 1.5. I need to put the recaptcha on the form (I did this) and redefine the subscription module controller on my own (substituting my part of the code there), and then continue the subscription controller.
I tried to redefine the file to the subscription module in the path (modules / my_module / override / modules / subscription_module / controller / front / subscription.php), tried to add the file along the path (override / modules / subscription_module / controller / front / subscription.php), but the controller does not want to be replaced.

class SubscriptionModuleFrontControllerOverride extends SubscriptionModuleFrontController{
public function postProcess(){}

Please tell me how to correctly override the module controller method and continue its execution?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

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