Koovira Dev Docs
20-modules/classifieds/overview.md

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-)

IDFeatureActorMethodTablesStatus
CLS-001Categories + dynamic fieldsanylistCategories :899, getCategoryFields :950category tables๐ŸŸข
CLS-002Create listingusercreateListing :1042classified_listings๐ŸŸข
CLS-003Merchant company listingmerchantmerchantSaveCompanyListing :1753classified_listings๐ŸŸข
CLS-004Searchanon+usersearchListings :2947classified_listings๐ŸŸข
CLS-005View listing (publicOnly)anon+usergetListing :3315, getListingForPublicView :3648โ€”๐ŸŸข
CLS-006Express interest / enquirybuyerexpressInterest :3683interest store๐ŸŸข
CLS-007Report listinguserreportListing :3756report store๐ŸŸข
CLS-008Escrow purchase + logisticsbuyermaybeCreateLogisticsForEscrow :111classified_escrow_orders (0)๐ŸŸก (never fires)
CLS-009Admin activateadminadminSetListingActive :3654classified_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.