rrd Posted July 8, 2017 Share Posted July 8, 2017 Hi, I have a module for 1.6 and I want to upgrade it to 1.7. My module uses 3-4 overrides and form I have read so far is confusing. Is the override system gone at 1.7 or not? The documentation mentions that I should use hooks, but what should I do when I have to replace some existing core functionality? rrd Link to comment Share on other sites More sharing options...
Daresh Posted July 8, 2017 Share Posted July 8, 2017 Partially gone. What to do? According to Prestashop "Let us know, maybe we'll include it so everybody can benefit". Link to comment Share on other sites More sharing options...
rrd Posted July 8, 2017 Author Share Posted July 8, 2017 Yes, that is what I found. It is not very useful. In this case the question is hwo should I use a hook if I do not want to run the original core code? For example there is a hook for pdf generation of invoices but I want to completely change it without running the core function. Link to comment Share on other sites More sharing options...
Daresh Posted July 8, 2017 Share Posted July 8, 2017 That's why I stick to 1.6. Link to comment Share on other sites More sharing options...
vekia Posted July 8, 2017 Share Posted July 8, 2017 some parts of core still can be overrided. you mentioned about pdf, this controller can be overrided, class too. Link to comment Share on other sites More sharing options...
rrd Posted July 9, 2017 Author Share Posted July 9, 2017 some parts of core still can be overrided. you mentioned about pdf, this controller can be overrided, class too. Can be or is this the reccommended way for this? I should change my code so I would prefer to do something what will be ok for a longer period of time. Link to comment Share on other sites More sharing options...
bellini13 Posted July 12, 2017 Share Posted July 12, 2017 If you intend to sell this module/customization, then avoid overrides, as PS addons will likely reject the module, unless there is very good reason to allow them. Without knowing the exact details of what you want to accomplish, how can someone answer what the correct or recommended way is to do something. We don't even know if this customization will be used only by you, or if you intend to sell/distribute this customization. Link to comment Share on other sites More sharing options...
rrd Posted July 18, 2017 Author Share Posted July 18, 2017 I have a module what overrides prestashop bult-in invoicing system, as it is not meet the hungarian invoicing requirements. When someone would like to see an invoice (from BO or FO) my module should generate the pdf invoice. For this the current version overrides HTMLTemplateInvoice.php and AdminPdfController.php I want to get rid of these overrides. 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