-
Notifications
You must be signed in to change notification settings - Fork 112
Checkout totals sort order broken with 1.9.3 & PHP7 #80
Comments
There is already a totals fix in this module, are you saying that 1.9.3.0 somehow undoes it? |
I wouldn't call that a fix, it only solves the immediate symptom - not the underlying cause. This patch actually fixes the problem - and was the only solution that worked for my specific set of third-party modules that added sorting of their own. The Stackoverflow posts linked will go into more detail about how this is happening, but it has to do with the sorting used and some highly technical details I'm not so familiar with... @ http://stackoverflow.com/a/9258826/653721
|
@bubach , @durzel - first of all, big thanks for all your work on fixing totals sort. Following the information you provided, I added topological sort to 1.9.2.4 branch of this extension. (It will probably be needed in the master branch, too. I plan to add it there later.) The version I added is the very nice implementation that @IvanChepurnyi made for Magento 2 (https://github.com/magento/magento2/pull/49/files). It adds topological sorting right into _getSortedCollectorCodes() method. Following that, I removed the XML order fix, as it shouldn't be needed any more. My first tests seem to show everything works fine, but I would like to hear your experience with it, if you've got the time to try and test it on projects where you had problems. |
Will do. I'm on 1.9.3.1 so I would be on the 2.x branch, so I would need to wait for the master branch to be updated in order to be able to give you some constructive feedback. 👍 |
@durzel , master branch updated. |
Thanks @icurdinj, you're a star. Will update my dev site later, run some tests and give some feedback as soon as I can. |
I believe that 2.0.1 release fixes this problem. |
As described in these Stackoverflow posts, the sorting algorithm for the totals collector classes is broken - and it seems to only be a problem in combination with PHP7. The consequences of this is devastating for anything relating to a quote or order totals sum, especially when using third party modules for giftcard and or storecredit calculations on top of the core.
http://stackoverflow.com/questions/9194281/sort-algorithm-magento-checkout-totals-sorted-wrongly-causing-wrong-shipping-ta
http://magento.stackexchange.com/questions/92783/magento-grand-total-without-taxes-in-1-9-with-php7
There is a couple of suggested fixes in both threads, but what finally solved it for me was this patch to class "Mage_Core_Config_Base", http://stackoverflow.com/a/11954867/653721
The text was updated successfully, but these errors were encountered: