Reputation: 1869
When customer places an order, how to set minimum order amount?
i.e) Total amount of order not below than $500.
I know how to get total order amount. But I don't know where to place that code and where to check
sOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$oOrder = Mage::getModel('sales/order')->load($sOrderId);
if($oOrder >=$500)
{
.....
}
If customer has purchased total less than $500, they won't allow to checkout at the cart.
Upvotes: 7
Views: 13100
Reputation: 1
You need to change the scope of the minimum amount setting. For that you need a new module with a system.xml
file that contains the same path to the minimum amount field and just changes the <show_in_store>
value. Read more about this here.
Upvotes: 0
Reputation: 1646
Login as admin, then go to System->configuration, then select ‘Sales‘ from left Nav and click on ‘Minimum order amount‘. Then select Yes from Enable dropdown, enter Minimum order amount, enter message and also enter error message that will be shown whenever the order will be less than specified amount at the shopping cart.
Thanks.
Upvotes: 15