Unable to install override in PrestaShop: an override conflict and how to resolve it
The message “Unable to install override” in PrestaShop means the module being installed wants to override a class method that another module, or an old file in the override folder, already overrides. PrestaShop does not merge two overrides by itself, so it stops the installation. The fix is to remove the orphaned override or merge the code of both modules by hand, with backups.
Author: The TellMyShop team. A guide for PrestaShop store owners: the cause, the manual fix and the same work in a chat conversation.
Last updated: · 7 min read
Where does an override conflict come from?
An override is a file a module uses to replace part of how PrestaShop works, for example how the shipping cost is calculated in the cart. On installation, PrestaShop copies that file from the module folder into the shop's override folder. On uninstallation, it removes it from there.
Overrides are exclusive. One method of one class can have only one replaced version. The PrestaShop developer documentation says plainly that a module with an override can stop other modules from changing the same behaviour. That is why the PrestaShop team recommends overrides only in your own modules, while modules for sale use hooks.
The most common situations that end with this message:
| Situation | How to recognise it | What usually helps |
|---|---|---|
| Two modules change the same method | the message names the class and method, and override holds a file with that method from another module | merging the code of both overrides into one file, or dropping one module |
| An override left behind by an old module | the module is not on the list, but the file in override still has its code | removing the orphaned method from the file, with a backup |
| Reinstalling the same module | the module was uninstalled with an error and did not clean up | removing the leftovers, then installing again |
| A manual change from years ago | a file in override with no comment about a module, nobody remembers where it came from | finding out from the previous developer what it does before touching anything |
| An old class cache | the error keeps coming back after the override is removed | clearing the shop cache |
The usual pattern is to rename the existing file, install the module, then merge the two files by hand. Turn on maintenance mode for that time.
How do you resolve “Unable to install override” step by step?
This is a job for your developer. Below is a list you can pass on. Every step starts with a backup, because files in override change how the whole shop works.
- Save the full message. You need the class and method name. Without them the developer is guessing.
- Back up the database and the
overridefolder. Ideally the whole shop, or at least that folder and the folder of the module being installed. - Find the file that already overrides this method. For the
Cartclass it is usuallyoverride/classes/Cart.php. Modules often leave a comment above the method with the module name and install date. - Check whether the owning module is in the shop. If it isn't, the method is orphaned and can be removed from the file. If it is, the code of both modules has to be merged so that both work.
- Clear the cache. Advanced Parameters → Performance has a clear cache button. PrestaShop then rebuilds the list of classes with overrides.
- Install the module again and check the cart, delivery or whatever the override touches. Place a test order.
When hunting for the culprit, the “Disable all overrides” switch under Advanced Parameters → Performance helps. The PrestaShop functional documentation describes it as the switch for all class and controller overrides. It affects the whole shop, so use it briefly, ideally on a test copy.
What should you avoid when a module won't install?
A few shortcuts that turn one message into a bigger problem:
- Deleting a file from
overrideblindly. The module that added it stops working without any message. Sometimes it is the shipping cost or a discount in the cart. - Copying a method from one file to another without reading it. Two versions of the same method in one class are a PHP error and a white screen.
- Editing files in the module folder. The changes disappear when the module updates, and the conflict comes back.
- Leaving overrides disabled permanently. Modules that need them then only half work.
If a 500 error appeared after installation, see the guide to the PrestaShop 500 error. You will find the error message after turning on debug mode.
How can the chat help a developer with an override conflict?
Your chat (Claude or ChatGPT) with the TellMyShop module reads the shop the way a developer would at a first meeting. In TellMyShop Free it sees the list of modules with versions and the shop's error log, so it can help pin down when the problem started. TellMyShop Pro also reads override and module files, with no switches needed.
You: Installing the delivery module ends with Unable to install override, method getOrderShippingCost in the Cart class. What do I do?
Your chat: In override/classes/Cart.php, the getOrderShippingCost method is overridden by the free shipping module. That module is installed and enabled. The new module wants to override the same method. I suggest merging both versions: the new module calculates first, and the free shipping threshold works as it does now. Preview of the change in the file:
Saving a file in the override folder needs the Service switch. I'll make a copy of the file before saving. Shall I show the full code for your developer to check?
old version: public function getOrderShippingCost(...) { /* free shipping module version */ }
new version: public function getOrderShippingCost(...) { /* merged version: new module + free shipping threshold */ }
The module names and code in the example are illustrative. In a real conversation the chat shows the full method code, not a summary.
What each step needs:
- Reading
overrideand module files works in TellMyShop Pro straight away, for text files up to 1 MB. - Changing a file in a module folder needs the Modules switch, which lasts 24 hours.
- Changing a file in the shop's
overridefolder falls under the Service switch. It gives full technical access, so it turns itself off after 3 hours. - Reinstalling a module from a ZIP package again needs the Modules switch.
You can turn on either switch only when the module has a successful database backup from the same day. A copy of each file is made before it is saved, and PHP files are checked for syntax errors. You see every change in a preview first, it is saved after your ‘yes’ and goes into the change history. Every change can be undone, a file by restoring its copy. Before uninstalling a module, the chat suggests disabling it first, because a disabled module keeps its data.
When merging the code of two modules, the chat shows the cause and a draft fix, and your developer or the module author confirms that the merged method does what both modules expect. You will find a similar example in the use case fixing a bug in a module's code, and reading the log in the use case error messages after a module update.
How do you avoid conflicts with future modules?
Before buying a module, ask the author whether it uses overrides and, if so, for which classes. Modules built on hooks clash less often. When installing, follow the order in the guide on how to install a PrestaShop module, and disable unused modules rather than deleting them until you are sure nothing relies on them.
Before you start tidying up modules, you can check the shop with TellMyShop Free. Full file reading and saving with backups work in TellMyShop Pro, and the licence is described on the pricing page.
Questions and answers
What exactly does the Unable to install override message mean?
PrestaShop tries to copy the override file from the module being installed into the shop's override folder and hits a method that another file already changes. Two modules cannot override the same method of the same class, so the installation stops. The message usually names the class and the method, for example Cart and getOrderShippingCost.
Does this error break a shop that is already running?
Usually not. The new module's installation doesn't finish, and the shop works as it did before the attempt. Trouble starts when someone tries to force their way round it, for example by deleting a file from the override folder without checking whose it is.
Can I simply delete the file from the override folder?
Only when you know it belongs to a module that is no longer in the shop. If the file belongs to a working module, that module will stop doing what it is for, such as calculating delivery its own way. First check which module added the override, and make a copy of the file.
Will TellMyShop fix the override conflict by itself?
TellMyShop Pro lets the chat read both overrides, point to the conflicting method and prepare a merged file in a preview. Saving a file in the override folder requires turning on the Service switch for 3 hours, and a copy of the file is made before saving. Have your developer or the module author review the merged code before you approve it.
PrestaShop is a registered trademark of PrestaShop SA. Claude is a trademark of Anthropic PBC. ChatGPT and OpenAI are trademarks of OpenAI. TellMyShop is not affiliated with these companies.