I'm trying to print out shopping cart orders, however, instead of displaying all products from that order I want to group the orders by the order ID so that I can display the sum of the order and link to a detail page.
Instead of this
---------------------------------------
date order number total
---------------------------------------
today 1234WEDK 600
---------------------------------------
today 1234WEDK 500
---------------------------------------
I'd like to display this
---------------------------------------
date order number total
---------------------------------------
today 1234WEDK 1100
---------------------------------------
Here's a sample array
array:2 [▼
0 => array:9 [▼
"id" => 57
"order_id" => 51
"order_hash" => "1234WEDK"
"price" => 600
]
1 => array:9 [▼
"id" => 58
"order_id" => 51
"order_hash" => "1234WEDK"
"price" => 500
]
]