directory
Version:
v1.0.1
Opens a new window with list of versions in this module.
Published: Dec 26, 2024
License: Unlicense
Opens a new window with license information.
README
¶
Introduction to DCDQL(Discount Condition Definition Query Language)
Condition := Expression (LogicalOperator Expression)*
Expression := Key ComparisonOperator Value
Key := "min_cart_value" | "total_price" | "product_id" | "total_category_price" | "category_id"
ComparisonOperator := "==" | "!=" | ">" | "<" | ">=" | "<=" | "in"
Value := Float | String | []String | []Float
LogicalOperator := "AND" | "OR"
Action := "THEN" DiscountType AssignmentOperator Value
DiscountType := "Percentage" | "FlatAmount" | "BOGO"
AssignmentOperator := "="
Syntax Examples
1. min_cart_value > 100 AND product_category == "dairy" THEN Percentage=10
2. product_id IN [1,2,3] OR total_category_price >= 50 THEN FlatAmount=5
Directories
¶
Click to show internal directories.
Click to hide internal directories.