RTML Operator “AND”
In an RTML Template the “AND” operator looks like:
The operator AND may contain operators and arguments. If any of them returns false or nil, then the operator AND returns false (nil). If all arguments return true or contain some values, the operator returns the value of last arguments.
This operator could be used in combination with the “IF”, “WHEN”, “OR” and “WITH=” operators.
IF test AND @custom-free-shipping < value1 @ship-weight value2 2 then TEXT "Free Shipping For This Item" else nil
In this example, we are verifying if the “Free Shipping” option could be applied for a particular item. If the property @custom-free-shipping is “ON” and the item shipping weight is less than 2 (lb), then the text “Free Shipping For This Item” will appear on the page spot.
IF test AND @orderable OR @sale-price @price then TEXT "This is Item" else nil
In this example we are checking if this is the Item page. If the orderable property is set to the value “Yes” and the sale-price or price is defined, then the text “This is the Product page” will appear on the page spot.
This entry was posted on Friday, March 23rd, 2012 at 10:55 am and is filed under Description of RTML Operators. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.