Procházet zdrojové kódy

[producer] Order : résactivation du point de vente favoris avec amélioration du script

dev
Guillaume Bourgeois před 5 roky
rodič
revize
de15f1910e
1 změnil soubory, kde provedl 6 přidání a 19 odebrání
  1. +6
    -19
      producer/controllers/OrderController.php

+ 6
- 19
producer/controllers/OrderController.php Zobrazit soubor

@@ -570,29 +570,16 @@ class OrderController extends ProducerBaseController
$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
$ordersArray = Order::searchAll([

Načítá se…
Zrušit
Uložit