Options
All
  • Public
  • Public/Protected
  • All
Menu

Module CreateProductRelationType

Create a new ProductRelationType.

Index

Properties

Optional BackendID

BackendID: undefined | string

Direction

The direction of the relation. This can either be; Unidirectional; one-way relation. For example 'parent-child' or 'replaced by' Bidirectional; two-way relation. For example 'maybe your also intrested in' or 'others also bought' Group; collective relation which allows for many products as part of a group. For example 'all products that are blue' or 'all products from summer-2022'. This type does not accept a StockRelationType.

PrimaryName

PrimaryName: string

This is the primary name the relation. For example; if primary name is 'Blocks', the secondary name could be something in the lines of 'Blocked by'.

Optional ProductSearchFilters

ProductSearchFilters: undefined | {}

Only available when Direction is set to Group.

Optional ProductSearchTemplateID

ProductSearchTemplateID: undefined | number

Only available when Direction is set to Group.

Optional Relations

Relations: Relation[]

Optional SecondaryName

SecondaryName: undefined | string

This is the secondary name the relation. For example; if primary name is 'Blocks', the secondary name could be something in the lines of 'Blocked by'.

StockRelationType

StockRelationType: StockRelationType

Indicates which stock relation type the relation has. In most cases this will be 'None'. The following options are available: None; No stock relation Replacing; When the PrimaryProduct is no longer in stock, the system can automaticly use the RelatedProduct as it's replacement (or vice versa if Direction is set to Bidirectional).