Skip to main content

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>>;
@Index()
@ManyToOne(type => ProductOptionGroup, group => group.options)
group: ProductOptionGroup;
@EntityId()
groupId: ID;
@ManyToMany(type => ProductVariant, variant => variant.options)
productVariants: ProductVariant[];
@Column(type => CustomProductOptionFields)
customFields: CustomProductOptionFields;
}

constructor

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

deletedAt

property
Date | null

name

property
LocaleString

code

property
string

translations

property
Array<Translation<ProductOption>>

group

groupId

property

productVariants

property

customFields

property
CustomProductOptionFields