Skip to content

Configuration ​

Global settings live in shared/config.lua; feature defaults and schemas live in shared/config/features.lua and integrations/np_jobs.lua. Configure before restarting the resource.

Businesses and venues ​

Business keys are np_faction identifiers; venue keys identify a location. No framework job name is hardcoded in the pack.

lua
NpCommerce.Config.Businesses['my_business'] = {
  label = 'My business', icon = 'burger', tint = 'green'
}
NpCommerce.Config.Venues['my_counter'] = {
  business = 'my_business', label = 'Main counter',
  coords = { x = 0.0, y = 0.0, z = 72.0 }
}

Replace the example coordinates with the actual counter. Database venue records override configured rows on load. Menus are keyed by business and shared by its venues.

Faction place types registered by the addon are commerce_register, commerce_station, commerce_board, commerce_stock, commerce_pickup, commerce_npc and commerce_zone. Add the relevant places through np_faction. Targets use ox_target or qb-target when available, with an E-key proximity fallback.

Features and permission nodes ​

With np_jobs running, staff access calls hasFeature(src, id) and requires the resolved faction to match the venue business. Without that host, np_faction checks feature.<id>; register, orders and tips also require duty. Permission-sensitive limits are feature configuration, not hardcoded job grades.

Feature Node Important configuration
commerce.register feature.commerce.register methods, maxDiscountPct, canVoid, refundLimit, tabs, maxTabOpen, receipt, ringUp
commerce.menu feature.commerce.menu categories, priceMin, priceMax, canPublish, happyHour, boards
commerce.stock feature.commerce.stock canOrder, orderLimit, suppliers, autoReorder, canWriteOff, countOnClose
commerce.tips feature.commerce.tips mode, split, payout, houseCutPct
commerce.hours feature.commerce.hours canEdit, canForce, npcFallback, npcMarkupPct, npcSharePct, graceMinutes
commerce.orders feature.commerce.orders stations, canRecall, lateAfter, preorders, leadTime, holdMinutes, delivery, catering
commerce.loyalty feature.commerce.loyalty canEnroll, maxManualPoints, canEditProgram
commerce.reports feature.commerce.reports scope, canExport, canSendPayroll, publicRating

The schemas mark rank-dependent values with perGrade. Let np_jobs resolve those values; the pack reads the resulting feature config. Declared schema options include future extension seams; check the server handlers and installed providers before enabling a workflow.

Global limits ​

Defaults include PriceMin = 0, PriceMax = 100000, MaxLines = 40, MaxQuantity = 100, RefundWindowMinutes = 10080 and TillFraudThreshold = 500. NPC defaults are 25% markup, 60% business share and a 25000 daily wholesale cap. Server rate limits default to 8 requests per 5 seconds; checkout has 3 per 10 seconds.

Staff nodes are np_commerce.admin, np_commerce.venues, np_commerce.menus and np_commerce.sales. Resource-owned item names can be changed through Config.Items if the inventory registration is changed too.