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
data
data: Object;
Custom data (as a JSON object).
Inherited from
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
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
logRequest
logRequest: boolean;
If true, logging 'add-to-cart' requests (for Shopify only).
Inherited from
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
quantity
quantity: number;
The number of ordered products. The default value is 1.
Inherited from
sku
sku: string;
Order line item SKU (for option-based product).
Inherited from
useBackOffice
useBackOffice: boolean;
Indicates if driver should perform some BackOffice actions.
Inherited from
IOrderInitModel
Provides properites for the order model.
Extends
Properties
customPrice
customPrice: number;
The custom price for the order.
Inherited from
data
data: Object;
Custom data (as a JSON object).
Inherited from
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
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
logRequest
logRequest: boolean;
If true, logging 'add-to-cart' requests (for Shopify only).
Inherited from
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
quantity
quantity: number;
The number of ordered products. The default value is 1.
Inherited from
settings
settings: IPluginSettings;
Settings of the e-commerce plugin.
sku
sku: string;
Order line item SKU (for option-based product).
Inherited from
useBackOffice
useBackOffice: boolean;
Indicates if driver should perform some BackOffice actions.