Hello everybody, as the title,
I use the library cart
And when I added 1 product on the code below:
The result is a multiple of 2 qty as follows:
Similarly QTY will add 2 as 4,6,8 ... when I add 1 ITEM into cart
I use the library cart
And when I added 1 product on the code below:
PHP Code:
$data = array(
'id' => 'sku_123ABC',
'qty' => 1,
'price' => 39.95,
'name' => 'T-Shirt',
'options' => array('Size' => 'L', 'Color' => 'Red')
);
$this->cart->insert($data);
The result is a multiple of 2 qty as follows:
PHP Code:
Array
(
[0256a32c98ce49afbe2a4eb8c96c5884] => Array
(
[id] => sku_123ABC
[qty] => 2
[price] => 39.95
[name] => T-Shirt
[options] => Array
(
[Size] => L
[Color] => Red
)
[rowid] => 0256a32c98ce49afbe2a4eb8c96c5884
[subtotal] => 79.9
)
)
Similarly QTY will add 2 as 4,6,8 ... when I add 1 ITEM into cart