The sum method in the get sub total without conditions method uses get price sum
/**
* get cart sub total without conditions
* @param bool $formatted
* @return float
*/
public function getSubTotalWithoutConditions($formatted = true)
{
$cart = $this->getContent();
$sum = $cart->sum(function ($item) {
return $item->getPriceSum();
});
return Helpers::formatValue(floatval($sum), $formatted, $this->config);
}
I would propose that the getPriceSum method should take a formatted boolean value to turn off formatting on the get price sum. Any values over 1000 add a , which means that the value cannot be summed correctly.
Proposed solution:
Cart.php
/**
get cart sub total without conditions
@param bool $formatted
@return float
*/
public function getSubTotalWithoutConditions($formatted = true)
{
$cart = $this->getContent();
/**
* get the sum of price
*
* @return mixed|null
*/
public function getPriceSum($formatted = true)
{
return Helpers::formatValue($this->price * $this->quantity, $formatted, $this->config);
}
The sum method in the get sub total without conditions method uses get price sum
I would propose that the getPriceSum method should take a formatted boolean value to turn off formatting on the get price sum. Any values over 1000 add a , which means that the value cannot be summed correctly.
Proposed solution:
Cart.php /**
@return float */ public function getSubTotalWithoutConditions($formatted = true) { $cart = $this->getContent();
}
ItemCollection.php