title: Database query for fetching products in customer cart programmatically
body: <p>How to build a query for fetching all the product details from magento customer cart,</p>
  
  <p>actually we have tried </p>
  
  <pre><code>$quote = Mage::getModel('checkout/cart')-&gt;getQuote();
  $quote-&gt;setSharedStoreIds($storeIds)-&gt;loadByCustomer($customer);
  
  foreach ($quote-&gt;getAllItems() as $item) { 
  
              $product = $item-&gt;getProduct(); 
              $productsResult[] = array(// Basic product data
               'product_id' =&gt; $product-&gt;getId()
  }
  </code></pre>
  
  <p>but the issue is we are not getting proper data as we are expecting, if we able to found this <strong>database query</strong> so it would be better</p>