Browse Source

Merge branch 'dev'

master
Guillaume Bourgeois 5 years ago
parent
commit
19e3b50712
1 changed files with 6 additions and 19 deletions
  1. +6
    -19
      producer/controllers/OrderController.php

+ 6
- 19
producer/controllers/OrderController.php View File

$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([

Loading…
Cancel
Save