| @@ 516-525 (lines=10) @@ | ||
| 513 | * @param bool $formatted |
|
| 514 | * @return float |
|
| 515 | */ |
|
| 516 | public function getSubTotalWithoutConditions($formatted = true) |
|
| 517 | { |
|
| 518 | $cart = $this->getContent(); |
|
| 519 | ||
| 520 | $sum = $cart->sum(function ($item) { |
|
| 521 | return $item->getPriceSum(); |
|
| 522 | }); |
|
| 523 | ||
| 524 | return Helpers::formatValue(floatval($sum), $formatted, $this->config); |
|
| 525 | } |
|
| 526 | ||
| 527 | /** |
|
| 528 | * get cart sub total |
|
| @@ 532-541 (lines=10) @@ | ||
| 529 | * @param bool $formatted |
|
| 530 | * @return float |
|
| 531 | */ |
|
| 532 | public function getSubTotal($formatted = true) |
|
| 533 | { |
|
| 534 | $cart = $this->getContent(); |
|
| 535 | ||
| 536 | $sum = $cart->sum(function ($item) { |
|
| 537 | return $item->getPriceSumWithConditions(false); |
|
| 538 | }); |
|
| 539 | ||
| 540 | return Helpers::formatValue(floatval($sum), $formatted, $this->config); |
|
| 541 | } |
|
| 542 | ||
| 543 | /** |
|
| 544 | * the new total in which conditions are already applied |
|