Skip to main content

au-widget-cart/ICartConfig

Interfaces

ICartConfig

Provides items for a cart.

The following example illustrates how you can define carts.

{
"widgets": [
{
"name": "cart",
"type": "cart",
"params": {
"lineItems": [
{
"productIndex": 0,
"images": "{{ getOrDefault(\" $['cc'].proofImageUrls.map(item=>item[0])\",[]) }}",
"downloadUrls": "{{ getOrDefault(\" $['cc'].hiResUrls \",[]) }}",
"data": {
"stateId": "{{ getOrDefault(\" $['cc'].stateId \",'') }}",
"orderUrl": "{{ getOrDefault(\" settings.customersCanvasBaseUrl.toLowerCase().split('users')[0] + '/orders/DepositPhotos?userId=' + $['cc'].userId + '&stateId=' + $['cc'].stateId\",'') }}"
}
}
]
}
}
]
}

Properties

lineItems
lineItems: ILineItem[];

An array of orders that represents a cart.


ILineItem

Provides properties for a single order in a cart.

Extends

Properties

active
active: boolean;
customPrice
customPrice: number;

The custom price for the order.

Inherited from

IOrderConfig.customPrice

data
data: Object;

Custom data (as a JSON object).

Inherited from

IOrderConfig.data

downloadUrls
downloadUrls: string[];

An array of the print-ready files, which should be stored along with the order in your e-commerce system.

Inherited from

IOrderConfig.downloadUrls

images
images: string[];

An array of URLs to preview images which should be stored along with the order in your e-commerce system.

Inherited from

IOrderConfig.images

logRequest
logRequest: boolean;

If true, logging 'add-to-cart' requests (for Shopify only).

Inherited from

IOrderConfig.logRequest

productIndex
productIndex: number;

The product index for this line item.

props
props: Object;

Custom properties. They don't appear in the order, but are available in the onSubmitting callback.

Inherited from

IOrderConfig.props

quantity
quantity: number;

The number of ordered products. The default value is 1.

Inherited from

IOrderConfig.quantity

sku
sku: string;

Order line item SKU (for option-based product).

Inherited from

IOrderConfig.sku

useBackOffice
useBackOffice: boolean;

Indicates if driver should perform some BackOffice actions.

Inherited from

IOrderConfig.useBackOffice


IOrderInitModel

Provides properites for the order model.

Extends

Properties

customPrice
customPrice: number;

The custom price for the order.

Inherited from

IOrderConfig.customPrice

data
data: Object;

Custom data (as a JSON object).

Inherited from

IOrderConfig.data

downloadUrls
downloadUrls: string[];

An array of the print-ready files, which should be stored along with the order in your e-commerce system.

Inherited from

IOrderConfig.downloadUrls

images
images: string[];

An array of URLs to preview images which should be stored along with the order in your e-commerce system.

Inherited from

IOrderConfig.images

logRequest
logRequest: boolean;

If true, logging 'add-to-cart' requests (for Shopify only).

Inherited from

IOrderConfig.logRequest

product
product: IProduct;

A product to initialize the order.

props
props: Object;

Custom properties. They don't appear in the order, but are available in the onSubmitting callback.

Inherited from

IOrderConfig.props

quantity
quantity: number;

The number of ordered products. The default value is 1.

Inherited from

IOrderConfig.quantity

settings
settings: IPluginSettings;

Settings of the e-commerce plugin.

sku
sku: string;

Order line item SKU (for option-based product).

Inherited from

IOrderConfig.sku

useBackOffice
useBackOffice: boolean;

Indicates if driver should perform some BackOffice actions.

Inherited from

IOrderConfig.useBackOffice

Was this page helpful?