Ver código fonte

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

feature/export_comptable
Guillaume 4 anos atrás
pai
commit
f56c73ca92
1 arquivos alterados com 15 adições e 0 exclusões
  1. +15
    -0
      ShopBundle/Services/Order/OrderUtils.php

+ 15
- 0
ShopBundle/Services/Order/OrderUtils.php Ver arquivo

@@ -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 = [];

Carregando…
Cancelar
Salvar