frojha Posted October 5, 2017 Share Posted October 5, 2017 Hello, I want to extend some core classes and controllers via a module but I don't know how. I can do it with overrides but according to the developers this isn't a good way: The legacy architecture can still be overridden, though. But in general, we advise against overriding code. It is better to extend it. But how can I extend it? Is there any code example? Best regards Link to comment Share on other sites More sharing options...
bellini13 Posted October 5, 2017 Share Posted October 5, 2017 You can still use overrides in PS v1.7 for classes and controllers, however if you plan to submit your module to the addons store, be prepared for it to be declined. I have no idea what they mean by extending it instead, the use of an override IS extending the core class. If you are not selling your module on the addons store, then just use the override Link to comment Share on other sites More sharing options...
frojha Posted October 5, 2017 Author Share Posted October 5, 2017 And that is the problem: I want to submit the module on the addon store... Link to comment Share on other sites More sharing options...
bellini13 Posted October 6, 2017 Share Posted October 6, 2017 You can try, they are most likely going to reject it, but you can explain in the comments to them why you have to create an override, and that Prestashop has not designed any other way for you to accomplish this. Make sure you also make it clear to your customers, that the module includes an override. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now