You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 text was updated successfully, but these errors were encountered:
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
/**
* get cart sub total without conditions
* @param bool $formatted
* @return float
*/
public function getSubTotalWithoutConditions($formatted = true)
{
$cart = $this->getContent();
ItemCollection.php
The text was updated successfully, but these errors were encountered: