Browse Source

Correction bug product_order avec une quantité à 0

dev
Guillaume Bourgeois 6 years ago
parent
commit
a655e71cb3
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      backend/controllers/OrderController.php

+ 1
- 1
backend/controllers/OrderController.php View File



foreach ($products as $key => $quantity) { foreach ($products as $key => $quantity) {
$product = Product::findOne($key); $product = Product::findOne($key);
if ($product) {
if ($product && $quantity) {
$productOrder = new ProductOrder; $productOrder = new ProductOrder;
$productOrder->id_order = $order->id; $productOrder->id_order = $order->id;
$productOrder->id_product = $key; $productOrder->id_product = $key;

Loading…
Cancel
Save