Back to Website
Show / Hide Table of Contents

Class AuWidgetOrder

A widget that is used to control the data that will be passed to the e-commerce driver when the user finishes editing data. For details, you can refer to the Order widget topic.

{
  "widgets": [
    {
      "name": "order-details",
      "type": "order",
      "params": {
        "images": "{{$['editor'].proofImages}}",
        "downloadUrls": "{{$['editor'].hiResUrls}}",
        "data": {
          "stateId": "{{$['editor'].stateId}}"
        },
        "props": {
          "_hidden": {},
          "_fields": {},
        }
      }
    }
  ]
}
Package: ui-framework

Properties

customPrice

The custom price for the order.

Declaration
customPrice: number
Property Value
Type Description
number

The custom price for the order.

data

Custom data.

Declaration
data: Object
Property Value
Type Description
Object

Custom data.

downloadUrls

An array of the print-ready files.

Declaration
downloadUrls: Array<string>
Property Value
Type Description
Array<string>

An array of the print-ready files.

images

An array of URLs to preview images.

Declaration
images: Array<string>
Property Value
Type Description
Array<string>

An array of URLs to preview images.

logRequest

Send submit request to logging service if true (shopify-only)

Declaration
logRequest: boolean = false
Property Value
Type Description
boolean

Send submit request to logging service if true (shopify-only)

params

Properties of the widget.

Declaration
params: IOrderConfig
Property Value
Type Description
IOrderConfig

Properties of the widget.

props

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

Declaration
props: Object
Property Value
Type Description
Object

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

quantity

The number of ordered products.

Declaration
quantity: number
Property Value
Type Description
number

The number of ordered products.

sku

Declaration
sku: string = ""
Property Value
Type Description
string

template

Declaration
static HTMLTemplateElement template
Property Value
Type Description
HTMLTemplateElement

useBackOffice

Flag indicates if driver should perform some backOffice actions

Declaration
useBackOffice: boolean = false
Property Value
Type Description
boolean

Flag indicates if driver should perform some backOffice actions

Methods

checkInitDependenciesWidgets()

Returns an array of widget names, due to which the current widget cannot receive parameters.

Declaration
function checkInitDependenciesWidgets()
Returns
Type Description
string[]

resetPreloaderState()

Declaration
function resetPreloaderState()

showPreloader(boolean, string | string[], number)

Shows a preloader.

"onClick": [
  "{{#function main.showPreloader(true, 'Creating print files...')}}",
  "{{#function $['editor'].getHiResImages(800,800)}}",
  "{{#function main.showPreloader(false)}}"
]
Declaration
function showPreloader(isPreload: boolean, message: string | string[], timeout: number)
Parameters
Type Name Description
boolean isPreload

If true, enables the preloader.

string | string[] message

A text message that appears next to the preloader.

number timeout

showToast(string, number)

Shows a toast.

return editor.loadUserInfo(data)
    .catch(err => {
        this.widget.showToast("Error: Invalid data");
        console.log(err);
    });
Declaration
function showToast(data?: string, duration?: number)
Parameters
Type Name Description
string data

A string message to display in the toast.

number duration

Defines how long to show the toast for.

Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2024 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback