Browse Source

Correction PriceUtils

master
Guillaume 4 years ago
parent
commit
477f2b6dbf
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      ShopBundle/Controller/Frontend/CartController.php
  2. +1
    -1
      ShopBundle/Services/PriceUtils.php

+ 1
- 1
ShopBundle/Controller/Frontend/CartController.php View File

foreach($data as $orderProduct) { foreach($data as $orderProduct) {
if($orderProduct instanceof OrderProductInterface) { if($orderProduct instanceof OrderProductInterface) {
$this->orderUtils->addOrderProduct($orderShop, $orderProduct) ; $this->orderUtils->addOrderProduct($orderShop, $orderProduct) ;
if($orderProduct->getQuantityorder() > 0) {
if($orderProduct->getQuantityOrder() > 0) {
$this->orderProducts[] = $orderProduct ; $this->orderProducts[] = $orderProduct ;
} }
} }

+ 1
- 1
ShopBundle/Services/PriceUtils.php View File

if($entity instanceof OrderShopInterface) { if($entity instanceof OrderShopInterface) {
return $this->getSumOrderProducts($entity->getOrderProducts(), $withTax, $withReduction) ; return $this->getSumOrderProducts($entity->getOrderProducts(), $withTax, $withReduction) ;
} }
if($entity instanceof Collection) {
if($entity instanceof Collection || is_array($entity)) {
return $this->getSumOrderProducts($entity, $withTax, $withReduction) ; return $this->getSumOrderProducts($entity, $withTax, $withReduction) ;
} }
} }

Loading…
Cancel
Save