|
|
(43 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.
| + | |
− | | + | |
− | === Keywords Not Used For Pricing Rules ===
| + | |
− | | + | |
− | 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
| + | |
− | | + | |
− | === Keywords Used For Pricing Rules ===
| + | |
− | | + | |
− | * <code>F:</code> - [[#Nested_Formulas|Formula]]
| + | |
− | * <code>I:</code>, <code>=></code>, and <code>,</code> - [[#Conditional_Expressions|Conditional]]
| + | |
− | * <code>H:</code> - Hinging Option Group
| + | |
− | * <code>N:</code> - Style Option Selections Count
| + | |
− | * <code>O:</code> - Style Option
| + | |
− | * <code>P:</code> - Product
| + | |
− | * <code>L:</code> - Product Line
| + | |
− | * <code>M:</code> - Variable Price Code
| + | |
− | * <code>Q:</code> - Style Option Selection
| + | |
− | * <code>R:</code> - Price
| + | |
− | * <code>S:</code> - Style Category
| + | |
− | * <code>T:</code> - Tag
| + | |
− | * <code>U:</code> - Upcharge
| + | |
− | * <code>V:</code> - Variable
| + | |
− | * <code>W:</code> - Modification Variable
| + | |
− | * <code>X:</code> - Constant
| + | |
− | | + | |
− | === 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.
| + | |