CartModule
The basket.
Medusa has no "active cart" of its own — a cart is reachable only by id — so
the shopper's cart id rides on the session, which exists for guests too. That
is what makes cart answerable without the storefront holding the id.
import { CartModule } from "@evolve-framework/medusa/modules";Serves the Cart part of the GraphQL API: addressValidate, cart, cartBundleAdd, cartChangesAcknowledge, cartCreate, cartDiscountCodeAdd, cartDiscountCodeRemove, cartLineItemsAdd, cartLineItemsRemove, cartLineItemsUpdate, cartPaymentRemove, cartSetDeliveryRemarks, cartSetPurchaseOrderNumber, cartSetVatNumber, cartUpdate.
new CartModule(options?: CartModuleOptions)| Option | Type | Description |
|---|---|---|
giftCards? | boolean | Offer paying with a gift card. The backend needs the gift card plugin, since Medusa itself has no gift cards. |
Extends AbstractModule<unknown>.
The same module on commercetools and sfcc.

