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