I'm trying out CodeIgniter's Shopping Cart Library for the first time. I've got all my sessions setup, and when I go to add an item to cart, it appears in $this->cart->contents(); So far so good. The add looks like this:
$data = array( 'id' => 1,
'qty' => 1,
'price' => 20,
'name' => "Item1");
$rowid = $this->cart->insert($data);
But when I try to add that same item again, it doesn't increase the quantity of that item in the cart. I imagined that performing that same insert would add one more, increasing the quantity of that row to 2, but it doesn't.
If I add a different product, it appears alongside the first. But again, attempts to add another of that product fail to increase the count.
I am certainly missing something. Perhaps you know what it is.
Many thanks!