Browse Source

[Administration] Produits > liste : mettre à jour le produit dans les distributions à venir quand on l'active/désactive #595

refactoring
Guillaume Bourgeois 2 years ago
parent
commit
8d1010f15e
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      backend/controllers/ProductController.php

+ 3
- 0
backend/controllers/ProductController.php View File

\Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
$product = $this->findModel($id); $product = $this->findModel($id);
$product->active = (int) $active; $product->active = (int) $active;

Distribution::linkProductIncomingDistributions($product);

return ['success', 'id' => $id, 'active' => $active]; return ['success', 'id' => $id, 'active' => $active];
} }



Loading…
Cancel
Save