Cart
cart in @open-mercato/core
Channel-agnostic basket module: priced lines, promotions, totals, and token-bound public access.
- Built-in
- Orders & Checkout
Ships with Open Mercato 0.10.1
Enable it
In a new app:
yarn mercato module enable @open-mercato/core --module customer_groups yarn mercato module enable @open-mercato/core --module promotions yarn mercato module enable @open-mercato/core --module cart
Run them in this order: each module needs the ones before it.
In an app from the empty preset
yarn mercato module enable @open-mercato/core --module currencies yarn mercato module enable @open-mercato/core --module dictionaries yarn mercato module enable @open-mercato/core --module catalog yarn mercato module enable @open-mercato/core --module progress yarn mercato module enable @open-mercato/core --module feature_toggles yarn mercato module enable @open-mercato/core --module customers yarn mercato module enable @open-mercato/core --module sales yarn mercato module enable @open-mercato/core --module customer_groups yarn mercato module enable @open-mercato/core --module promotions yarn mercato module enable @open-mercato/core --module cart
Run them in this order: each module needs the ones before it.
Then run yarn generate. Core is already installed, so nothing is downloaded.
Anatomy
ADDS 5 TABLES · 9 PERMISSIONS · EMITS 25 EVENTS
Data
cartscart_lines cart_promotion_ applications cart_idempotency_ keys cart_merge_ logs
API
Routes are not listed for built-in modules.
Security
cart.
carts.view carts.manage settings.manage proposals.author proposals.view channel.pos channel.payLink channel.agent channel.api
Events
cart.
- emits
cart.created - emits
cart.updated - emits
cart.expired - emits
cart.abandoned - emits
cart.merged - emits
cart.adopted - emits
cart.converted - emits
cart.purged - emits
line.added - emits
line.updated - emits
line.removed - emits
promotion.applied - emits
promotion.removed - emits
promotion.no_ longer_ valid - emits
price.changed - emits
approval.requested - emits
lock.acquired - emits
lock.released - emits
lock.timed_ out - emits
line.visibility_ rejected - +5 more
Background
4 workers
Not present: UI, AI tools.
Not read: credentials and env, hosts (not in module-facts.v2.json).
From module-facts.v2.json in @open-mercato/cli 0.10.1. Read statically, not executed.