|
|
@@ -571,12 +571,18 @@ class OrderController extends ProducerBaseController |
|
|
|
$favoritePointSale = User::getCurrent()->getFavoritePointSale() ; |
|
|
|
|
|
|
|
if($favoritePointSale) { |
|
|
|
foreach($pointsSaleArray as $key => $pointSale) { |
|
|
|
if($pointSale['id'] == $favoritePointSale->id) { |
|
|
|
unset($pointsSaleArray[$key]) ; |
|
|
|
array_unshift($pointsSaleArray, $pointSale) ; |
|
|
|
for( $i = 0; $i < count($pointsSaleArray) ; $i++) { |
|
|
|
if($pointsSaleArray[$i]['id'] == $favoritePointSale->id) { |
|
|
|
$theFavoritePointSale = $pointsSaleArray[$i] ; |
|
|
|
unset($pointsSaleArray[$i]) ; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(isset($theFavoritePointSale)) { |
|
|
|
$pointsSaleArray = array_reverse($pointsSaleArray, false) ; |
|
|
|
$pointsSaleArray[] = $theFavoritePointSale ; |
|
|
|
$pointsSaleArray = array_reverse($pointsSaleArray, false) ; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$json['points_sale'] = $pointsSaleArray ; |