conflicting two magento extension
Asked Answered
O

2

1

I have two same extension but both are using for a different-different purpose.

Extension 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> 

Extension 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>   

Both are conflicting in total price , Please help how can i solve this issue.

Oralle answered 30/9, 2014 at 10:18 Comment(4)
Can you explain with a scenario regarding how the price gets affected by both the modules ,how the insurance and fees totals get calculated etc.Wescott
i am using this extenstion excellencemagentoblog.com/magento-add-fee-discount-order-total , and i made a another copy of this extension , please see the problem in this question ....#26101247Oralle
When both these modules are active, I have Grand Total calculation errors, specifically, the tax is not being added to the Grand Total as it should be.Oralle
Are you sure that the tax is not added to Grand total only when these modules are enabled.?Also there are several setting's in Magento (System > Configuration > Sales > Tax ) using which we can include tax to the sutotal ,include tax to the product price etc. Please double check your tax display configuration here System > Configuration > Sales > Tax .Wescott
K
2

This is the same issue which i faced ,Currently you are adding before tag only in one extension so remove this line.

<before>fee</before>

you have to set the after and before tag in both of the extension.

In Extension A Config.xml file use this

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

and in your Extension B Config.xml file use this

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

Hope this will help yours

Kink answered 30/9, 2014 at 11:39 Comment(1)
Thank you so much.. Vishal SharmaOralle
G
0

The sort algorithm used by Magento is not stable and can lead to wrong results. You can use this patch: https://mcmap.net/q/407053/-sort-algorithm-magento-checkout-totals-sorted-wrongly-causing-wrong-shipping-tax-calculation

Grus answered 1/10, 2014 at 11:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.