Skip to content

MultipleCartModule

Module in @evolve-framework/commercetools

Several named carts per customer on commercetools: creating, renaming and deleting a named cart, and choosing which is current.

import { MultipleCartModule } from "@evolve-framework/commercetools";

Serves the Multiple carts part of the GraphQL API: cartCreateNamed, cartDelete, cartRename, cartSetCurrent.

new MultipleCartModule(options: MultipleCartModuleOptions)
OptionTypeDescription
customTypesMultipleCartCustomTypeKeys

Key of the custom type this project has provisioned for a cart. The same one CartModule is given, which is what verifies it: this module is composed alongside it and writes into the same cart/order type.

archiveCartsAfterDays?number

How many days a cart may go untouched before it is archived. Defaults to 60. commercetools deletes a cart itself after its deleteDaysAfterLastModification, so keep this below that.

Extends AbstractModule<unknown>.

The same module on medusa.