2014-09-30 70 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