2013-05-31 46 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