|
|
(39 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | == Overview ==
| + | Test |
− | | + | |
− | Order Express utilizes a robust expression system designed by eVision Services which allows for the conditional pricing of items. These ''pricing rules'' are stored within the database in the <code>PricingRules</code> table. Rules are written in [[wikipedia:Reverse Polish Notation|postfix notation]], but includes a number of keywords that can be used to retrieve information about the item being priced (such as how a product can be priced differently based on which styles are applied to it.
| + | |
− | | + | |
− | == Unimplemented Keywords ==
| + | |
− | | + | |
− | These keywords are considered to be "valid" keywords/tokens within the ''Rules Engine'' but currently have no implementation for pricing rules, and are thus considered to be invalid.
| + | |
− | | + | |
− | * <code>C:</code> - Category
| + | |
− | * <code>E:</code> - Finished End Option Group
| + | |
− | * <code>H:</code> - Hinging Option Group
| + | |
− | * <code>N:</code> - Style Option Selections Count
| + | |
− | * <code>P:</code> - Product
| + | |
− | * <code>L:</code> - Product Line
| + | |
− | * <code>Q:</code> - Style Option Selection
| + | |
− | * <code>S:</code> - Style Category
| + | |
− | * <code>W:</code> - Modification Variable
| + | |
− | | + | |
− | == Implemented Keywords ==
| + | |
− | | + | |
− | * <code>F:</code> - [[#Nested_Formulas|Formula]]
| + | |
− | * <code>I:</code>, <code>=></code>, and <code>,</code> - [[#Conditional_Expressions|Conditional]]
| + | |
− | * <code>O:</code> - [[#Style_Options|Style Option]]
| + | |
− | * <code>M:</code> - [[#Variable_Price_Codes|Variable Price Code]]
| + | |
− | * <code>R:</code> - [[#Prices|Price]]
| + | |
− | * <code>T:</code> - [[#Tags|Tag]]
| + | |
− | * <code>U:</code> - [[#Upcharges|Upcharge]]
| + | |
− | * <code>V:</code> - [[#Variables|Variable]]
| + | |
− | * <code>X:</code> - [[#Constants|Constant]]
| + | |
− | | + | |
− | == Usage ==
| + | |
− | | + | |
− | === Nested Formulas ===
| + | |
− | | + | |
− | Format: <code>F:[parameter]</code>
| + | |
− | | + | |
− | Executes the pricing rule with a name of <code>[parameter]</code>. This is primarily used in conjunction with the conditional operators, or to split expressions into shorter pieces.
| + | |
− | | + | |
− | === Conditional Expressions ===
| + | |
− | | + | |
− | Tokens: <code>I:</code>, <code>=></code>, <code>,</code>
| + | |
− | | + | |
− | Format: <code>I:[conditional]=>[expression_if_true],[expression_if_false]</code>
| + | |
− | | + | |
− | Conditional expressions are defined using the above tokens. When these tokens are found within the expression, the expression is split into multiple ''parts''. The <code>[conditional]</code> parameter is ''always'' executed to determine if it evaluates to a <code>true</code> or <code>false</code> value. If this evaluates to <code>true</code>, the <code>[expression_if_true]</code> parameter is executed. If it evaluates to <code>false</code>, the <code>[expression_if_false]</code> parameter is executed.
| + | |
− | | + | |
− | === Style Options ===
| + | |
− | | + | |
− | Tokens: <code>O:</code>
| + | |
− | | + | |
− | Format: <code>O:[style_option_display_id]</code>
| + | |
− | | + | |
− | The value for the <code>[style_option_display_id]</code> parameter should match the StyleOptionDisplayID in the <code>StyleOptions</code> table.
| + | |
− | | + | |
− | === Variable Price Codes ===
| + | |
− | | + | |
− | Tokens: <code>M:</code>
| + | |
− | | + | |
− | Format: <code>M:[variable_code]</code>
| + | |
− | | + | |
− | Used to obtain the price for the current item. The value specified for the <code>[variable_code]</code> parameter is used, alongside the current price group, to obtain the price for the current item. The value for the <code>[variable_code]</code> parameter must match the <code>Code</code> column in the <code>OEVariablePriceCodes</code> table.
| + | |
− | | + | |
− | === Prices ===
| + | |
− | | + | |
− | Tokens: <code>R:</code>
| + | |
− | | + | |
− | Format: <code>R:[price_type]</code>
| + | |
− | | + | |
− | Only two values are valid for the <code>[price_type]</code> parameter. These values are <code>BOOK</code> and <code>LIST</code>.
| + | |
− | | + | |
− | === Tags ===
| + | |
− | | + | |
− | Tokens: <code>T:</code>
| + | |
− | | + | |
− | Format: <code>T:[tag_name]</code>
| + | |
− | | + | |
− | Used to determine if the current item is tagged as the value specified in the <code>[tag_name]</code> parameter.
| + | |
− | | + | |
− | === Upcharges ===
| + | |
− | | + | |
− | Tokens: <code>U:</code>
| + | |
− | | + | |
− | Format: <code>U:[style_option_category_short_name]</code>
| + | |
− | | + | |
− | Used to obtain the price of an upcharge for the style option category that matches the <code>[style_option_category_short_name]</code> parameter for the current item. The value for the <code>[style_option_category_short_name]</code> must match the <code>ShortName</code> column in the <code>StyleOptionCategories</code> table.
| + | |
− | | + | |
− | === Variables ===
| + | |
− | | + | |
− | Tokens: <code>V:</code>
| + | |
− | | + | |
− | Format: <code>V:[variable_code]</code>
| + | |
− | | + | |
− | Used to obtain the value of a variable for the current item. The value for the <code>[variable_code]</code> parameter must match the <code>VariableCode</code> column in the <code>OEVariables</code> table.
| + | |
− | | + | |
− | === Constants ===
| + | |
− | | + | |
− | Tokens: <code>X:</code>
| + | |
− | | + | |
− | Format: <code>X:[constant_name]</code>
| + | |
− | | + | |
− | Used to obtain the value of constant. The value for the <code>[constant_name]</code> parameter must match the <code>ShortName</code> column in the <code>Constants</code> table.
| + | |