title: How to set minimum purchase order amount
body: <p>When customer places an order, how to set minimum order amount?</p>
  
  <p>i.e) Total amount of order not below than $500.</p>
  
  <p>I know how to get total order amount. But I don't know where to place that code and where to check</p>
  
  <pre><code>   sOrderId = Mage::getSingleton('checkout/session')-&gt;getLastOrderId();
     $oOrder = Mage::getModel('sales/order')-&gt;load($sOrderId);
      if($oOrder &gt;=$500)
      {
     .....
       }
  </code></pre>
  
  <p>If customer has purchased total less than $500, they won't allow to checkout at the cart.</p>