|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getTotalOrderProductsWithReductions(OrderShopInterface $orderShop) |
|
|
public function getTotalOrderProductsWithReductions(OrderShopInterface $orderShop) |
|
|
{ |
|
|
{ |
|
|
|
|
|
$total = $this->getTotalOrderProducts($orderShop) ; |
|
|
|
|
|
|
|
|
|
|
|
$totalReductionAmount = 0 ; |
|
|
foreach ($orderShop->getOrderReductionCarts() as $orderReductionCart) { |
|
|
foreach ($orderShop->getOrderReductionCarts() as $orderReductionCart) { |
|
|
$reductionAmount = $this->amountOrderProductsReductionCart($orderShop,$orderReductionCart); |
|
|
|
|
|
|
|
|
$totalReductionAmount += $this->amountOrderProductsReductionCart($orderShop,$orderReductionCart); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$total -= $totalReductionAmount ; |
|
|
|
|
|
|
|
|
|
|
|
return $total ; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|