title: Magento remove items from cart at loggin out
body: <p>I want to clear or remove all items from cart after logout user.
  I found this but I don't know where I have to put it exactly</p>
  
  <pre><code>foreach( Mage::getSingleton('checkout/session')-&gt;getQuote()-&gt;getItemsCollection() as $item ){
   Mage::getSingleton('checkout/cart')-&gt;removeItem( $item-&gt;getId() )-&gt;save();
  }
  </code></pre>