
ms3FirstTimeBuyerDiscount
First-order discount for MiniShop3 — auto-applied when 0 paid orders (percent or fixed)


Component for MiniShop3: automatic first-order discount. When the customer has zero paid orders, a discount (percent or fixed amount) is applied to the cart. For logged-in users user_id is used; for guests — email/phone from the order draft Address. Paid order statuses come from ms3_status_for_stat (with ms3_status_new taken into account).
msOnGetCartCost), no template changesuser_id for users, by email/phone for guests, using statuses from ms3_status_for_statftb_allow_combination can block FTB when the cart already has another discountftbOnBeforeApply (cancel or override amount), ftbOnApply (logging, analytics)ms3ftbDiscountBanner + frontend eligibility check by email/phonems3ftb_discount, extend FtbDiscountService| Requirement | Version |
|---|---|
| MODX Revolution | 3.x |
| PHP | 8.1+ |
| MySQL | 5.7+ / MariaDB 10.3+ |
msOnGetCartCost, setting ms3_status_for_statConfigure the discount in Settings → ms3firsttimebuyerdiscount.
See: Quick start.
| Term | Description |
|---|---|
| First-Time Buyer | Logged-in user or guest with zero orders in statuses from ms3_status_for_stat (with ms3_status_new) |
| Paid order | Order in one of the statuses listed in ms3_status_for_stat (e.g. "Paid", "Delivered") |
| Discount | Amount or percent subtracted from cart total in msOnGetCartCost |