Jump to content

overrides in 1.7


Recommended Posts

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

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

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

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

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

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