title: Removing Item From Basket Opencart Custom button
body: <p>Basically When a customer 'Likes' our Facebook page i add an item to the cart, but to ensure they don't take huge advantage of this offer i would like to remove the item from the cart should they unlike the page.</p>
  
  <p>So using an Ajax call i would like to remove an item from the basket. Now i have noticed that removing an item from the basket you need a product key.</p>
  
  <p>It makes a get request as such:</p>
  
  <pre><code>index.php?route=module/cart&amp;remove=1286:YToxOntpOjYyMzk0O3M6NjoiMTI1MDQxIjt9:
  </code></pre>
  
  <p>Looking at this request i found that in the controller it calls a function from within this statement:</p>
  
  <pre><code>if (isset($this-&gt;request-&gt;get['remove'])) {
          $this-&gt;cart-&gt;remove($this-&gt;request-&gt;get['remove']);
  
          unset($this-&gt;session-&gt;data['vouchers'][$this-&gt;request-&gt;get['remove']]);
      }
  </code></pre>
  
  <p>And then from here it calls a remove function in the system/library/cart.php</p>
  
  <pre><code>public function remove($key) {
      if (isset($this-&gt;session-&gt;data['cart'][$key])) {
          unset($this-&gt;session-&gt;data['cart'][$key]);
      }
  
      $this-&gt;data = array();
  }
  </code></pre>
  
  <p>Now.. I know i can easily do a similar get command.. but that key seems to be the product id followed by something else.. Im not sure what this is or how i can access it so i can remove an item from the basket.</p>
  
  <p>If anyone can shed any light on this i'd really appreciate that.</p>