Infos About Payment Expressions
For flexible display and usage of payment method or shipping method, you should explore and know how the rule expressions is working ,
rules expression give you the ability to change the behavoir of payment methods , yeah : “ for example the Check/Money Order it will be availible just with some conditions and other not , if the customer have less than 4 items don't give him the option of Check/Money Order“ , with expression you can find solutions for complex cases “ what's about b2b ? ” ,
Orocommerce give you this big tool , for example in other system like magento you don't have by default “ you need adding an extenssion for that like owebia shipping , but is just for expression shipping rule !!!! ”
1 – case : we want specific payment method be availible just with count items (total of items by product id) greater than 1 . you can use :
count(lineItems) > 1
2 case : we need the payemnt method be availible just for specifics country , you can use :
billingAddress.country.name in ['Morocco']
3 case : we need the payemnt method be availible just if the subtotal is greater than 20$ :
subtotal.value > 20
4 case : we need the payemnt method be availible just if the subtotal is greater than 20 and just for specifics country , you can use :
billingAddress.country.name in ['Morocco'] and subtotal.value > 20
Video :
Comments