Core Concepts

Carts

Carts are a collection of Cart Items that a User or Guest has added to be checked out all at once. Carts are used to keep track of what a User wants to purchase before they are ready to complete their purchase.

Every Cart Items has a Product, Product, and a Quantity.

Statuses

Carts have a status that can be one of the following:

  • Active - The cart is currently being used and has not been checked out.
  • Checkout - The cart is currently being checked out and pending final purchase.
  • Completed - The cart has been checked out and the order has been created.
  • Abandoned - The cart was not checked out and has been marked abandoned by the user, usually when a user clears or "deletes" their card.
  • Error - There was an error with the payment.

Creation

Carts are created when a User or Guest adds a Price to their cart.

For an authenticated Users, the cart is created with their unique User ID.

For an non-authenticated Users, the cart is created by using a unique Cookie that is tied to the Guest's browser. So they are able to shop and add items to their cart without needing to create an account, but if they clear their cookies, they will lose their cart.

Previous
Prices
Code highlighting provided by Torchlight