2013-05-31 196 views
0

的冲突我用了2个扩展其覆盖相同的文件:Magento。扩展

1st: app/code/community/Symmetrics/DeliveryTime/Block/Adminhtml/Catalog/Product/Grid.php 
2nd:app/code/community/Displaze/MyProductType/Block/Adminhtml/Catalog/Product/Grid.php 

第二扩展不起作用。 我该如何解决这个冲突? 我用magento 1.7

+0

嘿@ Derk153这是开发商的Displaze_MyProductType扩展,因为Magento把这个扩展脱机的原因,我没有代码,因为我的硬盘驱动器f并且我从来没有把代码放在我想要的git上,所以你可以和我分享这个扩展名吗?谢谢 –

回答

0
app/etc/Displaze_MyProductType.xml 

add below code 

<modules> 
    <Displaze_MyProductType> 
     <depends> 
      <Symmetrics_DeliveryTime/> 
     </depends> 
    </Displaze_MyProductType> 
</modules> 
+0

或你van slao在另一个合并和删除一个文件 –

+0

谢谢请投票,如果它可以帮助任何人 –

2

你有3种选择用于解决冲突:

  • 从一个合并的代码冲突的文件到另一个和关闭重写config.xml文件中的一个
  • 关掉在一个config.xml中重写,然后使有冲突的扩展名PHP文件扩展另一个扩展
  • 使用<depends>功能可使一个扩展名依赖于另一个扩展名。然后,他们将依次改写

示例(选项#2)

class A_Extension_Model_Type_Onepage extends Mage_Checkout_Model_Type_Onepage 

您将其更改为:

class A_Extension_Model_Type_Onepage extends B_Extension_Model_Type_Onepage 

Multiple modules overriding same core file in Magento