Skip to content

Interface: IEditorArgumentsPartialProductBuilder ​

Sets the model of a catalog product and optionally preselects variants. You get it as the argument of the buildProduct callback of setPartialProduct.

Methods ​

selectVariant() ​

ts
selectVariant(
   productCode: string, 
   quantity?: number, 
   codeOverride?: string, 
   nameOverride?: string
): IEditorArgumentsPartialProductBuilder;

Preselects a variant of the model.

Parameters ​

ParameterTypeDescription
productCodestringSupplier code of the product variant.
quantity?numberQuantity of the variant.
codeOverride?stringVariant code to show instead of the catalog one.
nameOverride?stringVariant name to show instead of the catalog one.

Returns ​

IEditorArgumentsPartialProductBuilder

Example ​

js
window.tronDesigner.setPartialProduct('PFC', undefined, (b) =>
  b.setProductModel('100860').selectVariant('10086021', 100)
);

selectVariants() ​

ts
selectVariants(...variants: ArgAddProductVariant[]): IEditorArgumentsPartialProductBuilder;

Preselects several variants of the model.

Parameters ​

ParameterTypeDescription
...variantsArgAddProductVariant[]The variants, each with at least productCode (see ArgAddProductVariant).

Returns ​

IEditorArgumentsPartialProductBuilder


setProductModel() ​

ts
setProductModel(modelCode: string): IEditorArgumentsPartialProductBuilder;

Sets the product model; the customer chooses its variants in the editor.

Parameters ​

ParameterTypeDescription
modelCodestringModel code of the product in the catalog, e.g. '100860'.

Returns ​

IEditorArgumentsPartialProductBuilder

Example ​

js
window.tronDesigner.setPartialProduct('PFC', undefined, (b) => b.setProductModel('100860'));

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