How to set minimum purchase order amount

大兔子大兔子 提交于 2020-02-03 04:51:20

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/17017866/how-to-set-minimum-purchase-order-amount

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!