[eluser]Unknown[/eluser]
I'm fairly new to CI, and may or may not have found a bug. Specifically, free products with a price of 0.00 do not display when you try to display the cart total or subtotal as shown in the user manual.
For example, the example in the user manual displays the cart subtotal using:
Code:
<?php echo $this->cart->format_number($items['subtotal']); ?>
If you put 0.00 (i.e., a free product) into that, the subtotal does not display. The same happens with the total. I opened system/libraries/Cart.php and in the format_number() function, I changed this:
Code:
if ($n == '')
{
return '';
}
to this:
Code:
if ($n == '' && $n !== 0.00)
{
return '';
}
After making that change, the subtotal and total display properly with values of 0.00.
Is this by design, or is it a bug?