🚨 Announcing Vendure v2 Beta

ProductOption

ProductOption

A ProductOption is used to differentiate ProductVariants from one another.

Signature

class ProductOption extends VendureEntity implements Translatable, HasCustomFields, SoftDeletable {
  constructor(input?: DeepPartial<ProductOption>)
  @Column({ type: Date, nullable: true })
    deletedAt: Date | null;
  name: LocaleString;
  @Column() code: string;
  @OneToMany(type => ProductOptionTranslation, translation => translation.base, { eager: true })
    translations: Array<Translation<ProductOption>>;
  @ManyToOne(type => ProductOptionGroup, group => group.options)
    group: ProductOptionGroup;
  @EntityId()
    groupId: ID;
  @Column(type => CustomProductOptionFields)
    customFields: CustomProductOptionFields;
}

Extends

Implements

Members

constructor

method
type:
(input?: DeepPartial<ProductOption>) => ProductOption

deletedAt

property
type:
Date | null

name

property
type:
LocaleString

code

property
type:
string

translations

property
type:
Array<Translation<ProductOption>>

group

property

groupId

property
type:
ID

customFields

property
type:
CustomProductOptionFields