Jump to content

Best way to make changes in core files


Recommended Posts

In PrestaShop v1.4, you would override the ProductController and Product class so that modifying those files wasn't required, which makes upgrading easy. In PrestaShop v1.3 and earlier, the only option is to actually modify the files, then keep a log of the changes so you can make the same changes again when you replace the files with the updated ones.

Link to comment
Share on other sites


Do you name the override php file the same as the original? If not, how does the system know to use your new file? Do you have to provide a constructor that calls the parent constructor? Can you just override specific functions, or do you copy the entire class and modify the code as needed?

I have some OO knowledge with Java, but just need some direction to get started. Thanks

Link to comment
Share on other sites

I need to make some changes in php files located in the shop root (product.php, etc.) and also in some classes. What's the best way to do this, so future version upgrades are as hassle free as possible?

Use any version control system (svn, git...) and it's merge tool
Link to comment
Share on other sites

It is good to use version control tools. But I think this option only available for developers.

Most store owner don't know how to use this kind of tools, just do some small changes by themselves or hire a developer to make changes.

you are right

http://winmerge.org/ - simple and clean free tool for two files compare
may be it would be helpful
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...