---
title: "au-widget-pim-ajax | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-pim-ajax/"
---

# au-widget-pim-ajax

> Provides methods for saving and restoring widget data.

## Classes

### AuWidgetProductInformationAJAX

#### Implements

- [`IRestorableWidget`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/widget.interface.IRestorableWidget.md#irestorablewidget)

#### Constructors

##### Constructor

```ts
new AuWidgetProductInformationAJAX(): AuWidgetProductInformationAJAX;
```

###### Returns

[`AuWidgetProductInformationAJAX`](#auwidgetproductinformationajax)

###### Overrides

```ts
AuBaseInvisibleWidget.constructor
```

#### Properties

##### params

```ts
params: any;
```

Compiled widget configuration.

###### Inherited from

```ts
AuBaseInvisibleWidget.params
```

#### Accessors

##### backOfficeUrl

###### Get Signature

```ts
get backOfficeUrl(): string;
```

###### Returns

`string`

##### costDetails

###### Get Signature

```ts
get costDetails(): ProductCostDetailsDto;
```

###### Returns

`ProductCostDetailsDto`

##### currencyCode

###### Get Signature

```ts
get currencyCode(): string;
```

###### Returns

`string`

##### currentChoices

###### Get Signature

```ts
get currentChoices(): Record<string, number[]>;
```

###### Returns

`Record`\<`string`, `number`[]\>

##### designs

###### Get Signature

```ts
get designs(): ProductInformationDesign[];
```

###### Returns

`ProductInformationDesign`[]

##### designsSettings

###### Get Signature

```ts
get designsSettings(): DesignVariantsApiPointParams;
```

###### Returns

`DesignVariantsApiPointParams`

##### driverChoices

###### Get Signature

```ts
get driverChoices(): Record<string, number[]>;
```

###### Returns

`Record`\<`string`, `number`[]\>

##### isPreselectSelectionStrategy

###### Get Signature

```ts
get isPreselectSelectionStrategy(): boolean;
```

###### Returns

`boolean`

##### mockups

###### Get Signature

```ts
get mockups(): ProductInformationMockup[];
```

###### Returns

`ProductInformationMockup`[]

##### mockupsSettings

###### Get Signature

```ts
get mockupsSettings(): ApiParams;
```

###### Returns

`ApiParams`

##### options

###### Get Signature

```ts
get options(): ProductInformationOption[];
```

###### Returns

`ProductInformationOption`[]

##### price

###### Get Signature

```ts
get price(): number;
```

###### Returns

`number`

##### priceIsFetching

###### Get Signature

```ts
get priceIsFetching(): boolean;
```

###### Returns

`boolean`

##### productId

###### Get Signature

```ts
get productId(): string | number;
```

###### Returns

`string` \| `number`

##### productInfo

###### Get Signature

```ts
get productInfo(): ProductInformation;
```

###### Returns

`ProductInformation`

##### productLinkId

###### Get Signature

```ts
get productLinkId(): string | number;
```

###### Returns

`string` \| `number`

##### productVersionId

###### Get Signature

```ts
get productVersionId(): string | number;
```

###### Returns

`string` \| `number`

##### quantity

###### Get Signature

```ts
get quantity(): number;
```

###### Returns

`number`

##### reference

###### Get Signature

```ts
get reference(): string;
```

###### Returns

`string`

##### selectedVariantSku

###### Get Signature

```ts
get selectedVariantSku(): string;
```

###### Returns

`string`

##### selectionStrategy

###### Get Signature

```ts
get selectionStrategy(): SelectionStrategy;
```

###### Returns

`SelectionStrategy`

##### storefrontId

###### Get Signature

```ts
get storefrontId(): string;
```

###### Returns

`string`

##### storefrontUserId

###### Get Signature

```ts
get storefrontUserId(): string;
```

###### Returns

`string`

##### summary

###### Get Signature

```ts
get summary(): any;
```

###### Returns

`any`

##### tenantId

###### Get Signature

```ts
get tenantId(): number;
```

###### Returns

`number`

##### token

###### Get Signature

```ts
get token(): string;
```

###### Returns

`string`

##### variants

###### Get Signature

```ts
get variants(): ProductInformationVariant[];
```

###### Returns

`ProductInformationVariant`[]

##### variantsHashMap

###### Get Signature

```ts
get variantsHashMap(): Record<string, number[]>[];
```

###### Returns

`Record`\<`string`, `number`[]\>[]

##### variantsSettings

###### Get Signature

```ts
get variantsSettings(): ApiParams;
```

###### Returns

`ApiParams`

##### template

###### Get Signature

```ts
get static template(): any;
```

###### Returns

`any`

###### Inherited from

```ts
AuBaseInvisibleWidget.template
```

#### Methods

##### checkInitDependenciesWidgets()

```ts
checkInitDependenciesWidgets(): string[];
```

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

###### Returns

`string`[]

###### Inherited from

```ts
AuBaseInvisibleWidget.checkInitDependenciesWidgets
```

##### exportWidgetData()

```ts
exportWidgetData(force): Promise<any>;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `force` | `boolean` |

###### Returns

`Promise`\<`any`\>

###### Implementation of

[`IRestorableWidget`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/widget.interface.IRestorableWidget.md#irestorablewidget).[`exportWidgetData`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/widget.interface.IRestorableWidget.md#exportwidgetdata)

##### getDesignVariants()

```ts
getDesignVariants(productId, params): Promise<PagedOfProductVariantDesignDto>;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `productId` | `number` |
| `params` | `DesignVariantsApiPointParams` |

###### Returns

`Promise`\<`PagedOfProductVariantDesignDto`\>

##### getMockupVariants()

```ts
getMockupVariants(productId, params): Promise<PagedOfProductVariantDesignDto>;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `productId` | `number` |
| `params` | `ApiParams` |

###### Returns

`Promise`\<`PagedOfProductVariantDesignDto`\>

##### getProductVariants()

```ts
getProductVariants(productId, params): Promise<PagedOfProductVariantDto>;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `productId` | `number` |
| `params` | `ApiParams` |

###### Returns

`Promise`\<`PagedOfProductVariantDto`\>

##### resetPreloaderState()

```ts
resetPreloaderState(): void;
```

###### Returns

`void`

###### Inherited from

```ts
AuBaseInvisibleWidget.resetPreloaderState
```

##### restoreWidgetFromData()

```ts
restoreWidgetFromData(data, force): Promise<void>;
```

###### Parameters

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

###### Returns

`Promise`\<`void`\>

###### Implementation of

[`IRestorableWidget`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/widget.interface.IRestorableWidget.md#irestorablewidget).[`restoreWidgetFromData`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/widget.interface.IRestorableWidget.md#restorewidgetfromdata)

##### showPreloader()

```ts
showPreloader(
   isPreload, 
   message?, 
   timeout?): void;
```

Shows a preloader.

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

###### Parameters

| Parameter | Type | Default value | Description |
| ------ | ------ | ------ | ------ |
| `isPreload` | `boolean` | `undefined` | If `true`, enables the preloader. |
| `message` | `string` \| `string`[] | `...` | A text message that appears next to the preloader. |
| `timeout` | `number` | `5` | - |

###### Returns

`void`

###### Inherited from

```ts
AuBaseInvisibleWidget.showPreloader
```

##### showToast()

```ts
showToast(data?, duration?): void;
```

Shows a toast.

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

###### Parameters

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

###### Returns

`void`

###### Inherited from

```ts
AuBaseInvisibleWidget.showToast
```

## References

### widget

Renames and re-exports [AuWidgetProductInformationAJAX](#auwidgetproductinformationajax)
