Interactive Shopping Cart
Add multiple different items and checkout in a single atomic transaction.
coe_shopsRetail Commerce & Cart Checkout
Convenience Stores, Pharmacies & Ammu-Nation with Visual Shopping Cart
Shopping interface for commercial establishments. Citizens browse products, adjust item quantities in a shopping cart, review order subtotals with sales taxes, and choose payment methods (Cash or Debit Card). Natively integrates with coe_inventory and coe_economy.
Hardware-accelerated DX12 interface loads the 233 high-resolution item icons without hesitation during store browsing.
Add multiple different items and checkout in a single atomic transaction.
Pay using physical cash banknotes or direct debit against bank accounts.
Player-owned stores maintain real finite stocks replenished by freight truckers.
Business owners can fine-tune markups and seasonal discounts.
Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:
Built with vanilla HTML5, CSS3 tokens, and modern JavaScript. No heavyweight frameworks (React/Vue/Electron). Rendered directly in FiveM DX12's Chromium Embedded Framework at 0.00 ms while closed.
Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:
IsPlayerAceAllowed(src, "coe.admin")
exports.coe_audit:Record(severity, category, event, context)
Clean Architecture & HAL
Typed contracts to call from other resources. Full types live in types.lua and in the docs reference.
exports['coe_shops']:IsReady()
→ boolean
Verifies if database migrations are applied and store business records are initialized.
No parameters.
local result = exports['coe_shops']:IsReady()exports['coe_shops']:GetShelves(storeId)
→ table<string,CoeShopsShelf>|nil
Retrieves the product shelves of a player-owned store. Returns `nil` for staff stores (infinite stock) or unknown stores. Serves as the foundation for logistics restocking missions.
| Parameter | Type |
|---|---|
storeId | string |
local result = exports['coe_shops']:GetShelves(storeId)exports['coe_shops']:IsStore(businessId)
→ boolean
Checks if a registered business is a retail store managed by `coe_shops`. Used by the business management app to render the Store tab.
| Parameter | Type |
|---|---|
businessId | string |
local result = exports['coe_shops']:IsStore(businessId)exports['coe_shops']:BusinessTablet(playerId, characterId, businessId, payload)
→ table
Handles Store tab operations in the business management tablet app. Invoked exclusively by `coe_businesses` (permission validation performed beforehand). `payload.op`: `overview` (shelves, pricing, sales metrics, and cash balance) or `price` (`productId`, `price`; `false` resets to default wholesale price). Restocking and cash withdrawals take place physically at the counter. Error codes: `forbidden`, `not_ready`, `not_a_store`, `unknown_action`, `invalid_price`.
| Parameter | Type |
|---|---|
playerId | integer |
characterId | string |
businessId | string |
payload | table |
local result = exports['coe_shops']:BusinessTablet(playerId, characterId, businessId, payload)exports['coe_shops']:RegisterPaymentMethod(def)
→ boolean|table
Registers an extensible payment provider from the calling resource (requires ACE permission `coe.shops.payments`). Registration automatically unbinds when the provider resource stops. `def`: `{ id, label, kind = 'instant'|'pin'|'device', charge, refund, options?, client? (device), order? }`, pointing to export names hosted by the provider. Error codes: `forbidden`, `invalid_method`, `method_taken`, `too_many_methods`.
| Parameter | Type |
|---|---|
def | table |
local result = exports['coe_shops']:RegisterPaymentMethod(def)/lojadebug
F8 diagnostics: nearest store, distance, clerk and interior.