문제

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.

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top