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.

Solution

I will use a sample message to show the solution:

Unable to install overlay: The __construct method in the Order class has already been overwritten.

  1. We recommend you to enable the technical break in the store for the time of solving the problem.
  2. You should rename the file: /override/classes/Order.php to: /override/classes/_Order.php
  3. Install the module at which the problem occurs.
  4. Now you need to merge the two files: /override/classes/Order.php and /override/classes/_Order.php into one file: /override/classes/Order.php
    1. If you are not familiar with this - I recommend contacting a programmer or sending us both files as a ticket to helpdesk.prestashow.pl
    2. After merging, you can delete the file: /override/classes/_Order.php
  5. To make PrestaShop refresh the cache - delete the file: /cache/classes_index.php
  6. Enter the store and check if everything works well and there are no messages.
  7. Turn off the technical break in the store.

Please Wait!

Please wait... it will take a second!