|
|
@@ -246,8 +246,16 @@ class OrderShopBuilder |
|
|
|
$updated = false; |
|
|
|
|
|
|
|
$this->orderProductBuilder->init($orderProductAdd); |
|
|
|
$this->orderProductBuilder->initReductionCatalog($orderShop->getSection(), $orderProductAdd); |
|
|
|
|
|
|
|
//TODO vérifier ma modif ici |
|
|
|
if(is_null($orderProductAdd->getOrderProductReductionCatalog())) { |
|
|
|
$productFamily = $this->productFamilyStore->setSection($orderShop->getSection())->getOneBySlug( |
|
|
|
$orderProductAdd->getProduct()->getProductFamily()->getSlug() |
|
|
|
); |
|
|
|
if($productFamily) { |
|
|
|
$this->orderProductBuilder->initReductionCatalog($orderShop->getSection(), $orderProductAdd, $productFamily); |
|
|
|
} |
|
|
|
} |
|
|
|
foreach ($orderShop->getOrderProducts() as $orderProduct) { |
|
|
|
if ($this->orderProductSolver->compare($orderProduct, $orderProductAdd)) { |
|
|
|
$orderProduct->setQuantityOrder( |