title: Display Shopping Cart items in phtml Contactform (Magento)
body: <p>Hello i just signed in to ask this question. i try to fix that issue with the given answers in that forum, but somthing won´t work. 
  I just want to include the items in the shopping cart to an text-field in an <strong><code>magento kontactform</code></strong>. i use form.phtml</p>
  
  <p>i try to display the sidebar cart with:</p>
  
  <pre><code>  &lt;label for="comment"&gt;Artikel&lt;/label&gt;
              &lt;div class="input-box"&gt;
                  &lt;textarea name="comment" id="comment" title="Artikel" class="required-entry input-text" cols="5" rows="3"&gt;
  
                  &lt;?php echo $this-&gt;getLayout()-&gt;createBlock('core/template')-&gt;setTemplate('checkout/cart/sidebar/default.phtml')-&gt;toHtml(); ?&gt;
                  &lt;/textarea&gt;
              &lt;/div&gt;
          &lt;/li&gt;
          &lt;li class="wide"&gt;
              &lt;label for="comment" class="required"&gt;&lt;em&gt;*&lt;/em&gt;&lt;?php echo Mage::helper('contacts')-&gt;__('Comment') ?&gt;&lt;/label&gt;
              &lt;div class="input-box"&gt;
                  &lt;textarea name="comment" id="comment" title="&lt;?php echo Mage::helper('contacts')-&gt;__('Comment') ?&gt;" class="required-entry input-text" cols="5" rows="3"&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>but i get this error:</p>
  
  <blockquote>
    <p><b>Fatal error</b>:  Call to a member function getProduct() on a
    non-object in
    <b>/www/htdocs/xxxxx/magento/app/design/frontend/base/default/template/checkout/cart/sidebar/default.phtml</b>
    on line <b>29</b><br /></p>
  </blockquote>
  
  <p>in line 29 is:</p>
  
  <pre><code>$isVisibleProduct = $_item-&gt;getProduct()-&gt;isVisibleInSiteVisibility();
  </code></pre>
  
  <p>so may someone can help me, and sorry for my cruel english :-)</p>