Jump to content

Class override in module not working


Guest

Recommended Posts

Hi, I have PS 1.7.2.4 and I am having issues overriding a PS class file within a module I am creating.

The class is Dispatcher and all I need to do is adding some routing related stuff in the setRequest() method.

Therefore, all I am doing is putting the Dispatcher.php file in mymodule/override/classes and having the altered setRequest() method only.

This unfortunately doesn't seem to work. I am vardumping but the var dump doesn't show up.

Please note the override works fine if I am putting it in the /override folder located in the root.

Any suggestions?

 

Thank you.

Link to comment
Share on other sites

9 hours ago, mad_griffith said:

Hi, I have PS 1.7.2.4 and I am having issues overriding a PS class file within a module I am creating.

The class is Dispatcher and all I need to do is adding some routing related stuff in the setRequest() method.

Therefore, all I am doing is putting the Dispatcher.php file in mymodule/override/classes and having the altered setRequest() method only.

This unfortunately doesn't seem to work. I am vardumping but the var dump doesn't show up.

Please note the override works fine if I am putting it in the /override folder located in the root.

Any suggestions?

 

Thank you.

 

But are you installing/uninstalling module to let PrestaShop copy the override in /override folder?

Link to comment
Share on other sites

2 hours ago, joseantgv said:

 

But are you installing/uninstalling module to let PrestaShop copy the override in /override folder?

 

Hey I did exactly that last night and it worked in the end. Thank you.

Link to comment
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...