cancel
Showing results for 
Search instead for 
Did you mean: 

Discount not applied to Grand Total

SOLVED

Discount not applied to Grand Total

We just rolled out an update to our store from CE 1.7.x to 1.9.3.1. It is a really simple store with no addon extensions. The upgrade was smooth and everything seems to be working as expected except our coupon codes have stopped working properly. The coupon code is accepted by Magento, and a discount line item shows up in the totals if it is relevant, but the grand total is not updated in the cart or at checkout. We don't have anything custom that we are aware of that touches the cart total functionality, what else could cause this issue?

 

discount-grand-total1.png

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Discount not applied to Grand Total

We fixed this by adding the following into /app/code/core/Mage/Sales/etc/config.xml sales/quote section. 

 

<discount>
   <class>sales/order_invoice_total_discount</class>
    <after>subtotal</after>
</discount>

This is a terrible solution, obviously, and I have no idea why it is needed. We will have to research it further to come up with a better solution than editing a core file!

View solution in original post

7 REPLIES 7

Re: Discount not applied to Grand Total

We fixed this by adding the following into /app/code/core/Mage/Sales/etc/config.xml sales/quote section. 

 

<discount>
   <class>sales/order_invoice_total_discount</class>
    <after>subtotal</after>
</discount>

This is a terrible solution, obviously, and I have no idea why it is needed. We will have to research it further to come up with a better solution than editing a core file!

Re: Discount not applied to Grand Total

Can you provide proper line number of before and after section. 

 

Re: Discount not applied to Grand Total

Perfectly Works

Re: Discount not applied to Grand Total

You should put it around line 1209, right after the nodes <quotes> -> <totals>

 

Re: Discount not applied to Grand Total

Thanks IT work Smiley Happy

Re: Discount not applied to Grand Total

This is known issue when you are running Magento 1 on PHP 7. If this is your case I will recommend to install the official patch PHP 7.2 support instead of changing 1 core file because the discount isn't the only problem.

Re: Discount not applied to Grand Total

Since this seems to be a PHP 7 issue, is there a better solution not modifying core for this? For example a type casting error or something.