Magento Conflicts

By | May 17, 2014

Magento have one of the biggest problem is cache and Extension Conflicts when more than one extension used the same
core File conflicts occurs and Developer had to struggle to find out the issues to fix it

Now if you see “<rewrite>” in it’s config.xml file in any of the extension it means Conflicts will occur.

But there are Extension which doesn’t conflict problems as by means of some standard Extensions are made
so that it should not conflict the other s module and the core functionality

May be there is chance that some time Theme also get conflict..as in Magento Community level as Developer
I have occur so many problem…

So now question comes how we can Resolve this Conflicts?

You have 3 Scenario for resolving conflicts:

Scenario 1
Merge the code from one conflicting file into another and
switch off the rewrite config.xml in one
Switch off the rewrite in one config.xml and then make the conflicting extension PHP file extend the other extension
Use the <depends> capability to make one extension depend on another. They will then rewrite in that order

Scenario 2
So we have example

class A_Extension_Model_Type_Onepage extends Mage_Checkout_Model_Type_Onepage
Now change it to:

class A_Extension_Model_Type_Onepage extends B_Extension_Model_Type_Onepage

Once you have done this you need to change extension B config.xml file

commenting out the conflicting “<rewrite>” blocks that are now inheriting from A.

Scenario 3
Let’s say you have 2 extensions Bla_A and Bla_B. In the module for file Bla_B (under app/etc/modules)
you would add the following:

<depends Foo_A />
Now Magento will load the extensions in this order. So in effect the Bla_B class will be loaded first,
then Bla_A, then base Magento

For Me scenario 2 Works perfect in order to avoid Conflict..Try it out ..hope this will help you

Leave a Reply