Cart

cart in @open-mercato/core

Channel-agnostic basket module: priced lines, promotions, totals, and token-bound public access.

Ships with Open Mercato 0.10.1

Enable it

In a new app:

  1. yarn mercato module enable @open-mercato/core --module customer_groups
  2. yarn mercato module enable @open-mercato/core --module promotions
  3. 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

  1. yarn mercato module enable @open-mercato/core --module currencies
  2. yarn mercato module enable @open-mercato/core --module dictionaries
  3. yarn mercato module enable @open-mercato/core --module catalog
  4. yarn mercato module enable @open-mercato/core --module progress
  5. yarn mercato module enable @open-mercato/core --module feature_toggles
  6. yarn mercato module enable @open-mercato/core --module customers
  7. yarn mercato module enable @open-mercato/core --module sales
  8. yarn mercato module enable @open-mercato/core --module customer_groups
  9. yarn mercato module enable @open-mercato/core --module promotions
  10. 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

  • carts
  • cart_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.

  • emitscart.created
  • emitscart.updated
  • emitscart.expired
  • emitscart.abandoned
  • emitscart.merged
  • emitscart.adopted
  • emitscart.converted
  • emitscart.purged
  • emitsline.added
  • emitsline.updated
  • emitsline.removed
  • emitspromotion.applied
  • emitspromotion.removed
  • emitspromotion.no_longer_valid
  • emitsprice.changed
  • emitsapproval.requested
  • emitslock.acquired
  • emitslock.released
  • emitslock.timed_out
  • emitsline.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.