Module: Classifieds (classifieds / classifieds)
Status: ๐ก Partially implemented (listings live; escrow/commission never fires) ยท Last validated: 2026-09-06 ยท Priority: P1
Buy/sell classified listings with optional escrow + logistics. Validated against classs/ClassifiedsModule.php + schema.
A. Purpose
Users post ads; buyers express interest / negotiate / buy (escrow). Revenue = 5% on escrow orders โ but classified_escrow_orders = 0, so commission never fires.
B. Actors
Seller (individual or merchant company); buyer; admin.
C. Entry points
/classifieds.php, /classifieds_post_ad.php.
E. Feature registry (prefix CLS-)
| ID | Feature | Actor | Method | Tables | Status |
|---|---|---|---|---|---|
| CLS-001 | Categories + dynamic fields | any | listCategories :899, getCategoryFields :950 | category tables | ๐ข |
| CLS-002 | Create listing | user | createListing :1042 | classified_listings | ๐ข |
| CLS-003 | Merchant company listing | merchant | merchantSaveCompanyListing :1753 | classified_listings | ๐ข |
| CLS-004 | Search | anon+user | searchListings :2947 | classified_listings | ๐ข |
| CLS-005 | View listing (publicOnly) | anon+user | getListing :3315, getListingForPublicView :3648 | โ | ๐ข |
| CLS-006 | Express interest / enquiry | buyer | expressInterest :3683 | interest store | ๐ข |
| CLS-007 | Report listing | user | reportListing :3756 | report store | ๐ข |
| CLS-008 | Escrow purchase + logistics | buyer | maybeCreateLogisticsForEscrow :111 | classified_escrow_orders (0) | ๐ก (never fires) |
| CLS-009 | Admin activate | admin | adminSetListingActive :3654 | classified_listings | ๐ข |
G. Data model (2026-09-06)
classified_listings 182 ยท classified_escrow_orders 0. Negotiation is available on this surface (see the Negotiation engine).
H. Financial impact โ the gap
5% rule active + escrow code path exists, but classified_escrow_orders = 0 (no buyer has completed an escrow purchase), so โน0 collected on 182 listings. Most classified activity is interest/ contact, not on-platform escrow purchase.
K. State machine
Listing: draft โ active โ reserved โ sold / deleted. (corrected 2026-09-06: doc previously said draft โ pending โ active โ sold/expired โ archived; the code's own comment at classs/ClassifiedsModule.php:5767-5769 states the real enum is "draft/active/reserved/sold/deleted" โ there is no pending, expired, or archived value. merchantSetListingStatus() (:5771) only allows the caller to set active/reserved/sold; draft is set by the save flow and deleted by delete.) Escrow order (when used): held โ released / cancelled (with payment_status separately moving to refunded on cancellation, e.g. :6618-6627) โ validate the full created/paid/shipped/delivered leg against maybeCreateLogisticsForEscrow before citing it verbatim (Requires Verification).
L / M / N
Errors: CLS-E001 escrow never created (buyers contact off-platform). Depends on escrow, logistics (maybeCreateLogisticsForEscrow, โค35km), negotiation, wallet, commission. Change-impact: enabling escrow purchase turns on commission โ re-test escrow create โ release.