title: In Magento, how can i put an items shipping cost on the product page?
body: <p>I want to put a shipping cost on the actual product page in Magento, so customers can see how much it will cost them. I can add in the shipping estimator from the basket page. But all i actually want is a line of text under the product price saying shipping from £XX.XX</p>
  
  <p>I have seen this tutorial: <a href="http://aneeshsreedharan.wordpress.com/2010/04/28/estimating-shipping-rate-on-product-details-page-in-magento/#comment-10" rel="nofollow">http://aneeshsreedharan.wordpress.com/2010/04/28/estimating-shipping-rate-on-product-details-page-in-magento/#comment-10</a> but it is not working for me on Magento 1.4.2 - i think this an older version is used on this tutorial.</p>
  
  <p>I am using a weight based table rate shipping method at the moment, with only one option.</p>
  
  <p>EDIT: I worked out the problem in the end: Rather embarrasingly I didnt realise the blog was stripping the formatting out. It was changing the ' to a ‘</p>
  
  <p>I can now confirm the code below does display the shipping:</p>
  
  <pre><code>&lt;?php
  if($_product-&gt;isSaleable())
  {
  $quote = Mage::getModel('sales/quote');
  $quote-&gt;getShippingAddress()-&gt;setCountryId('*');
  $quote-&gt;addProduct($_product);
  $quote-&gt;getShippingAddress()-&gt;collectTotals();
  $quote-&gt;getShippingAddress()-&gt;setCollectShippingRates(true);
  $quote-&gt;getShippingAddress()-&gt;collectShippingRates();
  $rates = $quote-&gt;getShippingAddress()-&gt;getShippingRatesCollection();
  
  foreach ($rates as $rate)
  {
  echo $rate-&gt;getPrice();
  }
  }
  ?&gt;
  </code></pre>