Create a gist now

Instantly share code, notes, and snippets.

anonymous /Ordered.php
Created Mar 14, 2014

Temporary fix for totals sorting problem in Magento
protected function _compareTotals($a, $b)
{
$aCode = $a['_code'];
$bCode = $b['_code'];
if (in_array($aCode, $b['after']) || in_array($bCode, $a['before'])) {
$res = -1;
} else {
$res = 1;
}
return $res;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment