Welcome Guest, Not a member yet? Register   Sign In
Adding an item to the Cart always returns 2 (qty items)
#1
Sad 
(This post was last modified: 04-17-2016, 04:14 AM by thanhthangnet.)

Hello everybody, as the title,

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
Reply


Messages In This Thread
Adding an item to the Cart always returns 2 (qty items) - by thanhthangnet - 04-16-2016, 10:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB