Hello,
i create have create a Shopping Cart Price Rule with 5% discount amount.
The calculation of discount is correct but the grandtotal is wrong. On sales order mail and pdf the grand total is total without discount. On the invoices the grand total is correct.
I have no idee, who i can change this, so the grand total on order is correct.
For better understand i added two images.
WRONG! On Order print, Grand Total is 29.00 , but the correct value would be 27.85 (GrandTotal) = 23.00(Subtotal) - 1.15 (Discount) + 6.00 (Shipping & Handling ).
Below, is correct calculation from invoices.
Happy New Year,
I have found the solution for my problem.
in the file app/code/core/Mage/Sales/etc/config.xml there is the following section (line 1200)
<sales> <!-- .... other XML Elements --> <quote> <totals> <nominal> <class>sales/quote_address_total_nominal</class> <before>subtotal</before> </nominal> <subtotal> <class>sales/quote_address_total_subtotal</class> <after>nominal</after> <before>grand_total</before> </subtotal> <shipping> <class>sales/quote_address_total_shipping</class> <after>subtotal,freeshipping,tax_subtotal</after> <before>grand_total</before> </shipping> <grand_total> <class>sales/quote_address_total_grand</class> <after>subtotal</after> </grand_total> <msrp> <class>sales/quote_address_total_msrp</class> </msrp> </totals> <!-- .... other XML Elemets --> </sales>
in this there is no XML element discount
After I've added this element, it goes.
<discount> <class>sales/quote_address_total_discount</class> <after>subtotal</after> </discount>
But now another problem that this is a change in the core.
How can I grab a a separate module that uses Magento the discount to calculate the total?
I ran into the same problem - it seems that this is due to a change in the uasort algorithm in PHP7, so this problem will only pop up if you're running Magento on PHP7.
This module fixed things up for me: https://github.com/hartmut-co-uk/magento-php7-totals-fix
Hi,
I have facing the Grand Total wrong issue on cart page, This is my price value calculation
Subtotal $1,016.00
Discount -$152.40
Shipping & Handling (Flat Rate Shipping - Fixed) $18.00
GRAND TOTAL $729.60
See that grand total , it needs to be show the 881.6, but it subtracted the discount value as two times. How to fix this issue? Any help would be appreciated!!!
i noticed this same issue discount applied twice
<global> <sales> <quote> <totals> <!-- ** added new code for bug in grand total--> <discount> <class>sales/quote_address_total_discount</class> <after>subtotal</after> </discount> <!-- ** added ended code --> </totals> </quote> </sales> </global>
U can use custom module and use overwrite concept