Last Updated 4 months ago
OVERRIDE PROBLEM during module installation
Problem: Unable to install overlay: Method ... in class ... has already been overwritten.The above message indicates that there is a conflation of Override files. The module we are trying to install wants to overwrite a piece of code that is already overwritten by another module or has been manually overwritten.
SolutionI will use a sample message to show the solution:
Unable to install overlay: The __construct method in the Order class has already been overwritten.
- We recommend you to enable the technical break in the store for the time of solving the problem.
- You should rename the file: /override/classes/Order.php to: /override/classes/_Order.php
- Install the module at which the problem occurs.
- Now you need to merge the two files: /override/classes/Order.php and /override/classes/_Order.php into one file: /override/classes/Order.php
- If you are not familiar with this - I recommend contacting a programmer or sending us both files as a ticket to helpdesk.prestashow.pl
- After merging, you can delete the file: /override/classes/_Order.php
- To make PrestaShop refresh the cache - delete the file: /cache/classes_index.php
- Enter the store and check if everything works well and there are no messages.
- Turn off the technical break in the store.