title: Magento: Showing only simple products on checkout success page
body: <p>I've successfully displayed the products ordered on checkout success (success.phtml), but the problem is it's displaying the configurable <em>and</em> the associated simple product when I want to display only the simple one. I tried doing it as below but then it doesn't display anything. I can't even use typeof on $item so obviously doing something wrong. 
  Would someone kindly take a look at my code and give me a hint as to how to get it working properly? Cheers.</p>
  
  <pre><code>&lt;?php $order_id = 
  
  Mage::getSingleton('checkout/session')-&gt;getLastRealOrderId();
  $order_details = Mage::getModel('sales/order')-&gt;loadByIncrementId($order_id); 
  foreach ($order_details-&gt;getAllItems() as $item): ?&gt;
  &lt;?php if ($item-&gt;getParentProductId()): ?&gt;
  &lt;h4&gt; &lt;?php echo $item-&gt;getName(); ?&gt; &lt;/h4&gt;
  &lt;br /&gt;
  &lt;h4&gt;Quantity: &lt;?php echo round($item-&gt;getQtyOrdered(), 0); ?&gt; &lt;/h4&gt;
  &lt;br /&gt;
  &lt;img src="&lt;?php echo $this-&gt;helper('catalog/image')-&gt;init($item, 'small_image')-&gt;resize(200); ?&gt;" width="200" height="200" class="media-object img-responsive" alt="&lt;?php echo $this-&gt;getImageLabel($item, 'small_image'); ?&gt;"/&gt;
  &lt;?php endif; ?&gt;
  &lt;?php endforeach; ?&gt;
  </code></pre>