Browse Source

[Frontend] Rayons : produits déjà dans le panier

feature/export_comptable
Guillaume 4 years ago
parent
commit
f56c73ca92
1 changed files with 15 additions and 0 deletions
  1. +15
    -0
      ShopBundle/Services/Order/OrderUtils.php

+ 15
- 0
ShopBundle/Services/Order/OrderUtils.php View File

return false ; 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) public function groupOrderProductsByProductFamily($orderProducts)
{ {
$orderProductsByProductFamily = []; $orderProductsByProductFamily = [];

Loading…
Cancel
Save