0

I just upgraded my Magento from 1.9.2.4 to 1.9.3.1. FYI, I'm using HHVM 3.15 not Zend. Everything works fine, except for the coupon. I noticed even when using vanilla installation, problem exists.

I tried to dig deeper with the couponPostAction() method (Mage_Checkout_CartController) and pay attention to this line:

$this->_getQuote()->setCouponCode($isCodeLengthValid ? $couponCode : '')->collectTotals()->save();

I also checked the sales_flat_quote table and found that subtotal_with_discount and base_subtotal_with_discount fields are already correct, however the the grand_total and base_grand_total are not because both are still showing the original amount.

I couldn't figure it out why the quote model didn't calculate the discount amount and save to grand_total and base_grand_total correctly.

Any help would be appreciated.

EDIT: I tried with PHP 7 and the problem appears to be the same. It works on PHP 5.5

0

If you upgrade your server to php 7 then this issue arise.

This module fixed things up for me: https://github.com/hartmut-co-uk/magento-php7-totals-fix

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.