|
|
|
|
|
|
|
|
$updated = false; |
|
|
$updated = false; |
|
|
|
|
|
|
|
|
$this->orderProductBuilder->init($orderProductAdd); |
|
|
$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) { |
|
|
foreach ($orderShop->getOrderProducts() as $orderProduct) { |
|
|
if ($this->orderProductSolver->compare($orderProduct, $orderProductAdd)) { |
|
|
if ($this->orderProductSolver->compare($orderProduct, $orderProductAdd)) { |
|
|
$orderProduct->setQuantityOrder( |
|
|
$orderProduct->setQuantityOrder( |