title: Codeigniter Shopping Cart: Adding the Same Product Again
body: <p>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:</p>
  
  <pre><code>$data = array( 'id'      =&gt; 1,
                 'qty'     =&gt; 1,
                 'price'   =&gt; 20,
                 'name'    =&gt; "Item1");
  
  $rowid = $this-&gt;cart-&gt;insert($data);
  </code></pre>
  
  <p>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.</p>
  
  <p>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. </p>
  
  <p>I am certainly missing something. Perhaps you know what it is.</p>
  
  <p>Many thanks!</p>