What I want to do:
Sort products based on price. yes there can be multi prices per item but in my case the prices[0] for all products suites my needs for ordering.
What I have tried
function compareProducts($a, $ { return $a['pricing'][0]['price'] - $b['pricing'][0]['price']; } $packages = usort($packages, ' compareProducts');
But this is not chaning the order. Or can I change this in the Controler, with a order by statement as this would be the correct place to change this.
Thanks