Seller Rating and Reviews Setup on 1C-Bitrix Marketplace
A seller review system is not the same as product reviews in the standard Catalog module. A seller review is tied to a specific order, can only be left by a buyer who actually received the product, and affects seller visibility in the catalog.
Review and Rating Storage
The standard blog.post.list / forum component is not suitable. We need an HL-infoblock or custom table:
Reviews table mp_vendor_reviews:
| Field | Type | Description |
|---|---|---|
| ID | int, AI | |
| VENDOR_ID | int | FK to seller |
| USER_ID | int | FK to buyer |
| ORDER_ID | int | FK to order/sub-order |
| RATING | tinyint | 1–5 |
| TEXT | text | Review text |
| STATUS | varchar | pending / approved / rejected |
| CREATED_AT | datetime | |
| MODERATED_AT | datetime |
Index on (VENDOR_ID, STATUS) — for fast rating calculation.
Seller rating is stored denormalized in sellers table: UF_RATING (float) and UF_RATING_COUNT (int). Updated after each approved review.
Logic: Who and When Can Leave a Review
Only a buyer whose sub-order transitioned to delivered status can leave a review. Check when attempting to leave review:
$canReview = MpSubOrderTable::getList([
'filter' => [
'VENDOR_ID' => $vendorId,
'USER_ID' => $userId,
'STATUS' => 'delivered',
'!REVIEW_ID' => false // hasn't left review yet
]
])->fetch();
Repeated review for same seller within one order — forbidden. For another order — allowed.
Review Moderation
New reviews go to pending status. Moderator approves or rejects via administrative interface. On approval — seller rating recalculation:
$stats = MpVendorReviewTable::getList([
'select' => ['AVG_RATING' => new ExpressionField('AVG_RATING', 'AVG(RATING)'), 'CNT'],
'filter' => ['VENDOR_ID' => $vendorId, 'STATUS' => 'approved']
])->fetch();
VendorTable::update($vendorId, [
'UF_RATING' => round($stats['AVG_RATING'], 2),
'UF_RATING_COUNT' => $stats['CNT']
]);
Reviews without moderation are possible but risky — spam and forgery.
Rating Display
Rating and reviews are displayed on seller page and on cards of their products. Component templates read UF_RATING from sellers table — this is fast. Review list — separate AJAX request with pagination to avoid loading page entirely.
Timeline
Review storage, access logic, rating recalculation, basic moderation — 1–2 weeks. Adding seller responses to reviews, sorting by rating in catalog — additional 3–5 days.







