Core Concepts
Product catalog settings
Settings reference
Currently there are three settings the marketplace admin can change:
global_product_catalog
- toggle whether sellers can only add inventory to admin-managed global products,require_product_approval
- decide whether seller-added products require admin approval before becoming ready to list,product_request_enabled
- allow sellers to propose new products for inclusion in the catalog.
All settings are false
by default.
Example Scenarios
- Global Catalog ON, Require Admin Approval ON, Sellers Can Request Products ON:
- Sellers can list inventory for global products.
- Sellers can request new global/unique products.
- All inventory and product additions require admin approval.
- Global Catalog OFF, Require Admin Approval OFF:
- Sellers freely add products without needing admin approval.
- Admin does not need to manage requests or approve listings.
- Hybrid Mode (Global Catalog ON, Sellers Can Request Products OFF):
- Sellers can list inventory for global products.
- Sellers cannot request new global/unique products.
Verification middleware
The middleware checkConfigurationRule
is used to restrict route availability according to the setting value, and can be found in apps/backend/src/shared/infra/http/middlewares/check-configuration-rule.ts
. It takes two arguments, rule_type
and expected_value
.
Advanced users can use it to modify the default Mercur behaviour.