Skip to main content

BaseCart

Overview

The BaseCart type represents the base structure of a shopping cart in the High Velocity front-end app. It includes attributes applicable to all cart modes, and that are typically common to any vendor.

note

You are not stuck with these attributes, since you have full control of the code in High Velocity, you are free to modify, remove, or add attributes

Attributes

id

type: string


The unique identifier for the cart.

version

type: number | string


The version of the cart. Can be either a number or a string, depending on the vendor implementation.

customerID (optional)

type: string


The unique identifier for the customer associated with the cart, when authenticated.

customerEmail (optional)

type: string


The email address of the customer associated with the cart.

promotions (optional)

type: Promotion[]

A list of promotions applied to the cart.

taxTotal (optional)

type: Pricing

The total tax amount for the cart.

promotionsTotal (optional)

type: Money


The total amount of promotions applied to the cart.

total

type: Pricing

The total amount for the cart.

subTotal (optional)

type: Pricing

The subtotal amount for the cart.

shippingTotal (optional)

type: Pricing

The total shipping amount for the cart.

shippingMethod (optional)

type: CartShippingMethod

The shipping method selected for the cart.

shippingAddress (optional)

type: ShippingAddress

The shipping address associated with the cart.

billingAddress (optional)

type: BillingAddress

The billing address associated with the cart.

payment (optional)

type: Payment

The payment information associated with the cart.

itemCount

type: number


The total number of items in the cart. This attribute is required and must be a non-negative integer.

checkoutUrl (optional)

type: string


The URL for the checkout page, when using hosted checkout.