$indexProduct = 0 ; | $indexProduct = 0 ; | ||||
foreach($productsArray as &$product) { | foreach($productsArray as &$product) { | ||||
if(!isset($theProduct['productDistribution'][0])) { | |||||
$theProduct['productDistribution'][0] = $distribution->linkProduct($product) ; | |||||
} | |||||
$coefficient_unit = Product::$unitsArray[$product['unit']]['coefficient'] ; | $coefficient_unit = Product::$unitsArray[$product['unit']]['coefficient'] ; | ||||
if(is_null($product['photo'])) { | if(is_null($product['photo'])) { |