|
|
|
|
|
|
|
|
$orderOverride = $orderModule->getBuilder()->instanciateOrderFromProductOrdersArray($productOrderArray, $order); |
|
|
$orderOverride = $orderModule->getBuilder()->instanciateOrderFromProductOrdersArray($productOrderArray, $order); |
|
|
foreach($productOrderArray as $idProduct => $productOrder) { |
|
|
foreach($productOrderArray as $idProduct => $productOrder) { |
|
|
$product = $productModule->getRepository()->findOneProductById($idProduct); |
|
|
$product = $productModule->getRepository()->findOneProductById($idProduct); |
|
|
$productOrderArray[$idProduct]['quantity_remaining'] = $orderModule->getResolver()->getProductQuantityRemaining($product, $distribution, $orderOverride); |
|
|
|
|
|
|
|
|
if($product) { |
|
|
|
|
|
$productOrderArray[$idProduct]['quantity_remaining'] = $orderModule->getResolver()->getProductQuantityRemaining($product, $distribution, $orderOverride); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return $productOrderArray; |
|
|
return $productOrderArray; |