Skip to content

Instantly share code, notes, and snippets.

Created March 14, 2014 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/9550247 to your computer and use it in GitHub Desktop.
Save anonymous/9550247 to your computer and use it in GitHub Desktop.
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