|
|
|
|
|
|
|
|
|
|
|
|
|
|
$favoritePointSale = User::getCurrent()->getFavoritePointSale() ; |
|
|
$favoritePointSale = User::getCurrent()->getFavoritePointSale() ; |
|
|
|
|
|
|
|
|
/*if($favoritePointSale) { |
|
|
|
|
|
$newPointSaleArray = [] ; |
|
|
|
|
|
|
|
|
|
|
|
foreach($pointsSaleArray as $pointSale) { |
|
|
|
|
|
if($pointSale['id'] != $favoritePointSale->id) { |
|
|
|
|
|
$newPointSaleArray[] = $pointSale ; |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
$theFavoritePointSale = $pointSale ; |
|
|
|
|
|
|
|
|
if($favoritePointSale) { |
|
|
|
|
|
foreach($pointsSaleArray as $key => $pointSale) { |
|
|
|
|
|
if($pointSale['id'] == $favoritePointSale->id) { |
|
|
|
|
|
unset($pointsSaleArray[$key]) ; |
|
|
|
|
|
array_unshift($pointsSaleArray, $pointSale) ; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(isset($theFavoritePointSale)) { |
|
|
|
|
|
array_unshift($newPointSaleArray, $theFavoritePointSale) ; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
else { |
|
|
|
|
|
$newPointSaleArray = $pointsSaleArray ; |
|
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
|
|
$newPointSaleArray = $pointsSaleArray ; |
|
|
|
|
|
|
|
|
|
|
|
$json['points_sale'] = $newPointSaleArray; |
|
|
|
|
|
|
|
|
$json['points_sale'] = $pointsSaleArray ; |
|
|
|
|
|
|
|
|
// Commandes totales |
|
|
// Commandes totales |
|
|
$ordersArray = Order::searchAll([ |
|
|
$ordersArray = Order::searchAll([ |