Skip to content

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 ​

PropertyTypeDescription
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?stringOwn 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?stringOwn data mode: value of the second variant dimension, for example the size XL.
overrides?objectValues shown in the editor and stored in the print job instead of the catalog values.
overrides.productCode?stringVariant code to display instead of productCode.
overrides.productName?stringVariant name to display instead of the catalog name (in Own data mode: instead of the model title).
ownPreviewUrl?stringOwn data mode: URL of the variant's preview image, shown when the user selects variants.
productCodestringVariant code. Exact/Partial: the supplier's code of the product variant in TronCloud (compared case-insensitively). Own: your own variant code.
quantity?numberNumber 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.

Czech Republic – The Country for the FutureFunded by the European Union – NextGenerationEUThe project was implemented within the The Country for the Future programme of the Ministry of Industry and Trade and co-financed by the European Union under NextGenerationEU.Support · Examples

Czech Republic – The Country for the FutureFunded by the European Union – NextGenerationEUThe project was implemented within the The Country for the Future programme of the Ministry of Industry and Trade and co-financed by the European Union under NextGenerationEU.Support · Examples