
# Class: AuWidgetProductInformationAJAX

## Hierarchy

* AuBaseInvisibleWidget

  ↳ **AuWidgetProductInformationAJAX**

## Implements

* [IWidget](../interfaces/iwidget.md)
* [IRestorableWidget](../interfaces/irestorablewidget.md)

## Index

### Constructors

* [constructor](auwidgetproductinformationajax.md#constructor)

### Properties

* [_isRestoring](auwidgetproductinformationajax.md#_isrestoring)
* [params](auwidgetproductinformationajax.md#params)

### Accessors

* [backOfficeUrl](auwidgetproductinformationajax.md#backofficeurl)
* [designs](auwidgetproductinformationajax.md#designs)
* [designsSettings](auwidgetproductinformationajax.md#designssettings)
* [mockups](auwidgetproductinformationajax.md#mockups)
* [mockupsSettings](auwidgetproductinformationajax.md#mockupssettings)
* [options](auwidgetproductinformationajax.md#options)
* [reference](auwidgetproductinformationajax.md#reference)
* [storefrontId](auwidgetproductinformationajax.md#storefrontid)
* [tenantId](auwidgetproductinformationajax.md#tenantid)
* [token](auwidgetproductinformationajax.md#token)
* [variants](auwidgetproductinformationajax.md#variants)
* [variantsSettings](auwidgetproductinformationajax.md#variantssettings)
* [template](auwidgetproductinformationajax.md#static-template)

### Methods

* [checkInitDependenciesWidgets](auwidgetproductinformationajax.md#checkinitdependencieswidgets)
* [exportWidgetData](auwidgetproductinformationajax.md#exportwidgetdata)
* [getDesignVariants](auwidgetproductinformationajax.md#getdesignvariants)
* [getMockupVariants](auwidgetproductinformationajax.md#getmockupvariants)
* [getProductVariants](auwidgetproductinformationajax.md#getproductvariants)
* [resetPreloaderState](auwidgetproductinformationajax.md#resetpreloaderstate)
* [restoreWidgetFromData](auwidgetproductinformationajax.md#restorewidgetfromdata)
* [showPreloader](auwidgetproductinformationajax.md#showpreloader)
* [showToast](auwidgetproductinformationajax.md#showtoast)

## Constructors

###  constructor

\+ **new AuWidgetProductInformationAJAX**(): *[AuWidgetProductInformationAJAX](auwidgetproductinformationajax.md)*

*Overrides void*

**Returns:** *[AuWidgetProductInformationAJAX](auwidgetproductinformationajax.md)*

## Properties

###  _isRestoring

• **_isRestoring**: *boolean*

___

###  params

• **params**: *any*

*Inherited from [AuBaseWidget](aubasewidget.md).[params](aubasewidget.md#params)*

Compiled widget configuration.

## Accessors

###  backOfficeUrl

• **get backOfficeUrl**(): *string*

**Returns:** *string*

___

###  designs

• **get designs**(): *[ProductInformationDesign](productinformationdesign.md)[]*

**Returns:** *[ProductInformationDesign](productinformationdesign.md)[]*

___

###  designsSettings

• **get designsSettings**(): *[ApiParams](apiparams.md)*

**Returns:** *[ApiParams](apiparams.md)*

___

###  mockups

• **get mockups**(): *[ProductInformationMockup](productinformationmockup.md)[]*

**Returns:** *[ProductInformationMockup](productinformationmockup.md)[]*

___

###  mockupsSettings

• **get mockupsSettings**(): *[ApiParams](apiparams.md)*

**Returns:** *[ApiParams](apiparams.md)*

___

###  options

• **get options**(): *[ProductInformationOption](productinformationoption.md)[]*

**Returns:** *[ProductInformationOption](productinformationoption.md)[]*

___

###  reference

• **get reference**(): *string*

**Returns:** *string*

___

###  storefrontId

• **get storefrontId**(): *string*

**Returns:** *string*

___

###  tenantId

• **get tenantId**(): *number*

**Returns:** *number*

___

###  token

• **get token**(): *string*

**Returns:** *string*

___

###  variants

• **get variants**(): *[ProductInformationVariant](productinformationvariant.md)[]*

**Returns:** *[ProductInformationVariant](productinformationvariant.md)[]*

___

###  variantsSettings

• **get variantsSettings**(): *[ApiParams](apiparams.md)*

**Returns:** *[ApiParams](apiparams.md)*

___

### `Static` template

• **get template**(): *HTMLTemplateElement*

*Inherited from void*

**Returns:** *HTMLTemplateElement*

## Methods

###  checkInitDependenciesWidgets

▸ **checkInitDependenciesWidgets**(): *string[]*

*Inherited from [AuBaseWidget](aubasewidget.md).[checkInitDependenciesWidgets](aubasewidget.md#checkinitdependencieswidgets)*

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

**Returns:** *string[]*

___

###  exportWidgetData

▸ **exportWidgetData**(`force`: boolean): *Promise‹any›*

*Implementation of [IRestorableWidget](../interfaces/irestorablewidget.md)*

**Parameters:**

Name | Type |
------ | ------ |
`force` | boolean |

**Returns:** *Promise‹any›*

___

###  getDesignVariants

▸ **getDesignVariants**(`productId`: number, `options`: string, `params`: [ApiParams](apiparams.md)): *Promise‹PagedOfProductVariantDesignDto›*

**Parameters:**

Name | Type |
------ | ------ |
`productId` | number |
`options` | string |
`params` | [ApiParams](apiparams.md) |

**Returns:** *Promise‹PagedOfProductVariantDesignDto›*

___

###  getMockupVariants

▸ **getMockupVariants**(`productId`: number, `options`: string, `params`: [ApiParams](apiparams.md)): *Promise‹PagedOfProductVariantDesignDto›*

**Parameters:**

Name | Type |
------ | ------ |
`productId` | number |
`options` | string |
`params` | [ApiParams](apiparams.md) |

**Returns:** *Promise‹PagedOfProductVariantDesignDto›*

___

###  getProductVariants

▸ **getProductVariants**(`productId`: number, `options`: string, `params`: [ApiParams](apiparams.md)): *Promise‹PagedOfProductVariantDto›*

**Parameters:**

Name | Type |
------ | ------ |
`productId` | number |
`options` | string |
`params` | [ApiParams](apiparams.md) |

**Returns:** *Promise‹PagedOfProductVariantDto›*

___

###  resetPreloaderState

▸ **resetPreloaderState**(): *void*

*Inherited from [AuBaseWidget](aubasewidget.md).[resetPreloaderState](aubasewidget.md#resetpreloaderstate)*

**Returns:** *void*

___

###  restoreWidgetFromData

▸ **restoreWidgetFromData**(`data`: any, `force`: boolean): *Promise‹void›*

*Implementation of [IRestorableWidget](../interfaces/irestorablewidget.md)*

**Parameters:**

Name | Type |
------ | ------ |
`data` | any |
`force` | boolean |

**Returns:** *Promise‹void›*

___

###  showPreloader

▸ **showPreloader**(`isPreload`: boolean, `message`: string | string[], `timeout`: number): *void*

*Inherited from [AuBaseWidget](aubasewidget.md).[showPreloader](aubasewidget.md#showpreloader)*

Shows a preloader.

```
"onClick": [
  "{{#function main.showPreloader(true, 'Creating print files...')}}",
  "{{#function $["editor"].getHiResImages(800,800)}}",
  "{{#function main.showPreloader(false)}}"
]
```

**Parameters:**

Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`isPreload` | boolean | - | If `true`, enables the preloader. |
`message` | string &#124; string[] |  [""] | A text message that appears next to the preloader.  |
`timeout` | number | 5 | - |

**Returns:** *void*

___

###  showToast

▸ **showToast**(`data?`: string, `duration?`: number): *void*

*Inherited from [AuBaseWidget](aubasewidget.md).[showToast](aubasewidget.md#showtoast)*

Shows a toast.

```
return editor.loadUserInfo(data)
    .catch(err => {
        this.widget.showToast("Error: Invalid data");
        console.log(err);
    });
```

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`data?` | string | A string message to display in the toast. |
`duration?` | number | Defines how long to show the toast for.  |

**Returns:** *void*
