title: How to get current cart items for logged in user
body: <p>Following is my code:-</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> try
              {
                $store = $this-&gt;_getStore();
                Mage::app()-&gt;setCurrentStore($store-&gt;getId());
                $customer_ID = 3;
                $customer = Mage::getModel('customer/customer')-&gt;load($customer_ID);
  
                // load quote by customer
                $quote = Mage::getModel('sales/quote')-&gt;loadByCustomer($customer_ID);
  
                $quote-&gt;assignCustomer($customer);
                $product = Mage::getModel('catalog/product')
                           // set the current store ID
                           -&gt;setStoreId(Mage::app()-&gt;getStore()-&gt;getId())
                           // load the product object
                           -&gt;load(3);
  
                 // Add Product to Quote
                 $quote-&gt;addProduct($product,1);
  
                 // Calculate the new Cart total and Save Quote
                 $quote-&gt;collectTotals()-&gt;save();
      
                 return json_encode(array("", $quote-&gt;getId()));
                 
              }catch(Exception $e)
              {
                  return $e-&gt;getMessage();;
              }   </code></pre>
  </div>
  </div>
  </p>
  
  <p>Using this the product is getting added in cart successfully and returning quote_id, but using this id i want to fetch current cart items details for currently logged in user.</p>