2014-09-30 47 views
1

我有兩個相同的擴展,但都用於不同的目的。衝突的兩個magento擴展

分機A的Config.xml

<config> 
<modules> 
    <Mageworks_Fee> 
     <version>0.1.5</version> 
    </Mageworks_Fee> 
</modules> 
<global> 
    <sales> 
     <quote> 
      <totals> 
       <fee> 
        <class>fee/sales_quote_address_total_fee</class> 
        <renderer>fee/checkout_totals_fee</renderer> 
        <admin_renderer>fee/adminhtml_sales_order_create_totals_fee</admin_renderer> 
       </fee> 
      </totals> 
     </quote> 
     <order_invoice> 
      <totals> 
       <fee> 
        <class>fee/sales_order_total_invoice_fee</class> 
       </fee> 
      </totals> 
     </order_invoice> 
     <order_creditmemo> 
      <totals> 
       <fee> 
        <class>fee/sales_order_total_creditmemo_fee</class> 
       </fee> 
      </totals> 
     </order_creditmemo> 
    </sales> 
    </global> 
</config> 

擴展B的Config.xml

<config> 
<modules> 
    <Mageworks_Insurance> 
     <version>0.1.5</version> 
    </Mageworks_Insurance> 
</modules> 
<global> 
    <sales> 
     <quote> 
      <totals> 
       <insurance> 
        <class>insurance/sales_quote_address_total_insurance</class> 
     <before>fee</before> 
        <renderer>insurance/checkout_totals_insurance</renderer> 
        <admin_renderer>insurance/adminhtml_sales_order_create_totals_insurance</admin_renderer> 
       </insurance> 
      </totals> 
     </quote> 
     <order_invoice> 
      <totals> 
       <insurance> 
        <class>insurance/sales_order_total_invoice_insurance</class> 
       </insurance> 
      </totals> 
     </order_invoice> 
     <order_creditmemo> 
      <totals> 
       <insurance> 
        <class>insurance/sales_order_total_creditmemo_insurance</class> 
       </insurance> 
      </totals> 
     </order_creditmemo> 
    </sales> 
    </global> 
</config> 

兩者都在總價衝突的,請幫助我如何解決這個問題。

+0

你可以用一個場景來解釋價格如何受到這兩個模塊的影響,保險和費用總計如何計算等。 – 2014-09-30 10:25:42

+0

我使用這個擴展http://excellencemagentoblog.com/magento-add-fee-discount-order-total,我做了這個擴展的另一個副本,請看這個問題的問題.... http://stackoverflow.com/questions/26100747/tax-calculation- is-wrong-in-magento – 2014-09-30 10:29:09

+0

當這兩個模塊都處於活動狀態時,我有Grand Total計算錯誤,具體而言,該稅不會按原樣添加到Grand Total中。 – 2014-09-30 10:30:57

回答

2

這是我面臨的同樣的問題,目前您在之前只在一個擴展中添加標籤,因此刪除此行。

<before>fee</before> 

你必須設置和兩個延伸以前標籤。

在擴展config.xml文件利用這個

<after>subtotal,discount,shipping</after> 
<before>tax,grand_total</before> 

,並在您的擴展區B Config.xml文件使用本

<after>fee</after> 
<before>tax,grand_total</before> 

希望這將幫助你

+0

非常感謝你。Vishal Sharma – 2014-09-30 11:49:54