首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >互相冲突的两个magento扩张

互相冲突的两个magento扩张
EN

Stack Overflow用户
提问于 2014-09-30 10:18:52
回答 2查看 453关注 0票数 1

我有两个相同的扩展,但两个都是为了不同的目的而使用的。

扩展A Config.xml

代码语言:javascript
复制
<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

代码语言:javascript
复制
 <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>   

两者的总价格相互矛盾,请帮助我如何解决这个问题。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2014-09-30 11:39:25

这与我所面临的问题相同,目前您只在一个扩展中在标记之前添加,所以请删除这一行。

代码语言:javascript
复制
<before>fee</before>

在扩展中,您必须在后面设置,在之前设置

在扩展名中,Config.xml文件使用以下内容

代码语言:javascript
复制
<after>subtotal,discount,shipping</after> 
<before>tax,grand_total</before> 

在您的扩展名B Config.xml文件中使用以下

代码语言:javascript
复制
<after>fee</after> 
<before>tax,grand_total</before> 

希望这能帮到你

票数 2
EN

Stack Overflow用户

发布于 2014-10-01 11:38:10

Magento使用的排序算法不稳定,可能导致错误的结果。您可以使用此修补程序:https://stackoverflow.com/a/11954867/288568

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26118357

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档