/admin/ecommerce/discounts/config. All discount types are managed from the hub at /admin/ecommerce/discounts.
Admin Routes
The hub lists all discount types — Coupons, Item Specifics, Category/Brand Promos, BOGOs, Customer Preferred — with search and pagination at 25 per page.
Priority Sequence Execution
Discounts are applied in a fixed two-tier sequence. The engine processes Item-Level deductions first, then Order Sub-Total deductions.Tier 1 — Individual Item Discounts
Applied per line item in this order:1
Category & Brand Level
Category or brand-wide promotional price rules.
2
Item Specific
Discount targeting a single product SKU.
3
Special Sale Price
Direct sale/clearance price override on the product.
4
Item Quantity Breaks
Volume-based price tiers (buy more, pay less per unit).
5
Wholesale Price
Wholesale-specific price for customers with
role_id = 2.Tier 2 — Order Sub-Total Discounts
Applied to the running subtotal after Tier 1:1
Coupon Code
Customer-entered promo code validated against cart constraints.
2
General Order Discount
Storewide or segment-wide automatic deduction.
3
Preferred Customer Discount
Discount for accounts flagged as preferred customers.
4
New User Promo
One-time discount for first-time registrants.
Stacking Configuration
Navigate to Admin → Discounts → Config (/admin/ecommerce/discounts/config) to set the global stacking rule.
The stacking rule applies to Tier 2 (Order Sub-Total) discounts. Tier 1 item-level deductions are always evaluated independently per line item.
Tax and Shipping Exclusions
- All discount deductions are applied before sales tax and shipping costs are calculated.
- Promotional coupons can grant Free Shipping when the coupon’s
free_shippingflag is set totrue.
Coupon Filter Validation
When a customer applies a coupon code, the engine validates it against all configured constraints:Dynamic Auto-Rejection
Brand or Category Rules
Cascading Category Discounts
Category-level discount rules check recursive nested ancestor relations. A discount applied to a parent category automatically cascades to all subcategories at every depth level.Live Search Selectors
Admin forms for targeting Brand and Category use debounced live search inputs. Results filter as you type — optimized for stores with large product catalogs. No full page reload required.Buy X Get Y (BOGO)
Configuration
Set up a BOGO deal from Admin → Discounts → Create by selecting the BOGO type:- Trigger Product (Buy X): the product the customer must add to qualify the deal.
- Target Product (Get Y): the product the customer receives at the discounted or free price.
Target Isolation
Once a BOGO deal triggers in the cart:- The target item is locked with
is_bogo_target = truein the cart metadata. - Manual quantity adjustment on the locked target item is blocked — the BOGO quantity is managed by the engine, not the customer.
Target isolation prevents customers from artificially inflating the discounted quantity by manually editing the cart.
Dynamic Promo Info on Storefront Product Page
When the Show Promo Info on Detail Page toggle is enabled for a discount, a custom promotional message (edited with the built-in TinyMCE editor) appears on the public product detail view. The promotional text displays when any of the following conditions are true:Wholesale Constraints
- Customers with
role_id = 2receive wholesale-specific prices as configured in the discount engine. - The storewide config (
/admin/ecommerce/discounts/config) includes a toggle to bypass coupons and promotional discounts for wholesale accounts entirely.
Discount Creator Features
When creating or editing any discount at/admin/ecommerce/discounts/create, the following tools are available:
Date Range Picker
Set a precise start date and end date for the promotion. The discount deactivates automatically after the end date.
Live Search Selectors
Debounced live search for Products, Brands, and Categories — no manual ID lookup required.
Buy-X-Get-Y Setup
Select trigger product and target product, set the BOGO quantity, and configure the discount amount or free-item logic.
Custom S3 Image Override
Supply a custom S3 bucket, key, and credentials for discount-specific promotional images, independent of the global S3 configuration.
