my client want to be able to buy products with decimal quantity, like 1.5 or 3.5, is there any way to codeigniter’s Shopping Cart class can handle this?
Because right now if i try to put and decimal quantity it remover the comas, exemple, if i type 1.5, it goes as 15.
Thanks for the attention
EDIT: I FIXED IT BY GOING TO 'SYSTEM\LIBRARIES\CART.PHP' AND CHANGING THE LINE 161:
from this:
$items['qty'] = trim(preg_replace('/([^0-9])/i', '', $items['qty']));
to this:
$items['qty'] = trim(preg_replace('/([^0-9\.])/i', '', $items['qty']));
Doing this, you can add decimals on quantity.