Browse Source

[backend] Abonnements : ordre produits

dev
Guillaume Bourgeois 5 years ago
parent
commit
ac3585532f
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      backend/controllers/SubscriptionController.php

+ 7
- 3
backend/controllers/SubscriptionController.php View File

} }
// produits // produits
$productsArray = Product::searchAll() ;
$productsArray = Product::searchAll([], [
'orderby' => 'product.order ASC'
]) ;
if ($model->load(Yii::$app->request->post()) && $model->validate() if ($model->load(Yii::$app->request->post()) && $model->validate()
&& $model->save()) && $model->save())
} }


// produits // produits
$productsArray = Product::searchAll() ;
$productsArray = Product::searchAll([], [
'orderby' => 'product.order ASC'
]) ;


if ($model->load(Yii::$app->request->post()) && $model->validate()) { if ($model->load(Yii::$app->request->post()) && $model->validate()) {
if (!strlen($model->date_end)) { if (!strlen($model->date_end)) {
}]) ; }]) ;
} }
$productsArray = $productsQuery->asArray()->all() ;
$productsArray = $productsQuery->asArray()->orderBy('order ASC')->all() ;
foreach($productsArray as &$theProduct) { foreach($productsArray as &$theProduct) {
$theProduct['unit_save'] = $theProduct['unit'] ; $theProduct['unit_save'] = $theProduct['unit'] ;

Loading…
Cancel
Save