title: Magento recently viewed products
body: <p>What I have tried. Just get viewed products and display it, as result i got nothing:</p>
  
  <pre><code> &lt;?php $_recentlyViewed =
   Mage::getSingleton('Mage_Reports_Block_Product_Viewed')-&gt; getItemsCollection(); ?&gt;
  
       &lt;?php foreach ($_recentlyViewed as $_recentlyProduct): ?&gt;
           &lt;?php var_dump($_recentlyProduct); ?&gt;
       &lt;?php endforeach; ?&gt;
  </code></pre>
  
  <p>The next thing, it was trying to display the default block, then I got nothing. In local.xml I addded:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;layout version="0.1.0"&gt;
      &lt;catalog_product_view&gt;
          &lt;reference name="content"&gt;
              &lt;reference name="product.info"&gt; 
                  &lt;block type="reports/product_viewed" name="product.recently.viewed" as="product_recently_viewed" template="reports/product_viewed.phtml"/&gt; 
                  &lt;block type="poll/activePoll" name="right.poll" after="product_recently_viewed"&gt;
                      &lt;action method="setPollTemplate"&gt;&lt;template&gt;poll/active.phtml&lt;/template&gt;&lt;type&gt;poll&lt;/type&gt;&lt;/action&gt;
                      &lt;action method="setPollTemplate"&gt;&lt;template&gt;poll/result.phtml&lt;/template&gt;&lt;type&gt;results&lt;/type&gt;&lt;/action&gt;
                  &lt;/block&gt;
             &lt;/reference&gt;
      &lt;/reference&gt;
  &lt;/catalog_product_view&gt;
  </code></pre>
  
  <p></p>
  
  <p>And </p>
  
  <pre><code>&lt;?php echo $this-&gt;getChildHtml('product_recently_viewed'); ?&gt;
  </code></pre>
  
  <p>In view.phtml, but still I got nothing.
  I checked the table in mysql, there's records about last viewd products. So my question is, what made I wrong? Any ideas?</p>