adding an item to the cart codeigniter codeigniter

Solutions on MaxInterview for adding an item to the cart codeigniter codeigniter by the best coders in the world

showing results for - "adding an item to the cart codeigniter codeigniter"
Noemi
27 May 2020
1$data = array(
2        array(
3                'id'      => 'sku_123ABC',
4                'qty'     => 1,
5                'price'   => 39.95,
6                'name'    => 'T-Shirt',
7                'options' => array('Size' => 'L', 'Color' => 'Red')
8        ),
9        array(
10                'id'      => 'sku_567ZYX',
11                'qty'     => 1,
12                'price'   => 9.95,
13                'name'    => 'Coffee Mug'
14        ),
15        array(
16                'id'      => 'sku_965QRS',
17                'qty'     => 1,
18                'price'   => 29.95,
19                'name'    => 'Shot Glass'
20        )
21);
22
23$this->cart->insert($data);
24