|
|
@@ -338,19 +338,20 @@ class OrderUtils |
|
|
|
return false ; |
|
|
|
} |
|
|
|
|
|
|
|
public function getOrderProductByProductFamilyInCart($productFamily) |
|
|
|
public function getOrderProductsByProductFamilyInCart($productFamily) |
|
|
|
{ |
|
|
|
$arrayOrderProducts = [] ; |
|
|
|
$orderShop = $this->getCartCurrent() ; |
|
|
|
|
|
|
|
if($orderShop) { |
|
|
|
foreach($orderShop->getOrderProducts() as $orderProduct) { |
|
|
|
if($orderProduct->getProduct()->getProductFamily() == $productFamily) { |
|
|
|
return $orderProduct ; |
|
|
|
$arrayOrderProducts[] = $orderProduct ; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return false ; |
|
|
|
return $arrayOrderProducts ; |
|
|
|
} |
|
|
|
|
|
|
|
public function groupOrderProductsByProductFamily($orderProducts) |