Class

CartService

CartService()

Ecommerce SDK cart service. Contains cart operations.

Constructor

# new CartService()

View Source service/cart-service.ts, line 7

Methods

# get() → {Promise.<Cart>}

Get cart data in current store.

View Source service/cart-service.ts, line 80

Promise of current Cart data.

Promise.<Cart>

# goToCheckout(storeLocationPath)

Navigate to checkout page with current cart data.

Parameters:
Name Type Description
storeLocationPath string

Relative URL path to store page. In case argument is provided, it will be used for checkout URL composition. In case argument is not provided and initial StoreOptions contains storeLocationPath, path from StoreOptions will be used for checkout URL composition. In case argument is not provided and initial StoreOptions does not contain storeLocationPath, default path '/store' will be used for checkout URL composition.

View Source service/cart-service.ts, line 91