Type Alias: ArgAddProductVariant
ts
type ArgAddProductVariant = object;A product variant to add to the print job — one entry of ArgAddProduct.variants.
Remarks
In Exact and Partial data mode (DataMode) the variant is identified by productCode and its name, colors and images are loaded from TronCloud. In Own data mode you describe the variant yourself with the dimension* fields and ownPreviewUrl.
Properties
| Property | Type | Description |
|---|---|---|
dimension1Colors? | string[] | Own data mode: colors of the first dimension value as CSS colors, for example ['#FF0000']. The editor shows them as the color swatch of the variant; several colors produce a multi-color swatch. |
dimension1Title? | string | Own data mode: value of the first variant dimension, for example the color name Red. |
dimension2Colors? | string[] | Own data mode: colors of the second dimension value as CSS colors. Used for the color swatch when the first dimension is not the color (ArgAddProductModel.isDimension1Color is false). |
dimension2Title? | string | Own data mode: value of the second variant dimension, for example the size XL. |
overrides? | object | Values shown in the editor and stored in the print job instead of the catalog values. |
overrides.productCode? | string | Variant code to display instead of productCode. |
overrides.productName? | string | Variant name to display instead of the catalog name (in Own data mode: instead of the model title). |
ownPreviewUrl? | string | Own data mode: URL of the variant's preview image, shown when the user selects variants. |
productCode | string | Variant code. Exact/Partial: the supplier's code of the product variant in TronCloud (compared case-insensitively). Own: your own variant code. |
quantity? | number | Number of pieces of this variant, stored with the variant in the print job. Remarks When you add a variant that is already in the print job (openMode: 'Edit'), its quantity is updated. |