Skip to main content

ProductVariantPrice

ProductVariantPrice

A ProductVariantPrice is a Channel-specific price for a ProductVariant. For every Channel to which a ProductVariant is assigned, there will be a corresponding ProductVariantPrice entity.

Signature
class ProductVariantPrice extends VendureEntity implements HasCustomFields {
constructor(input?: DeepPartial<ProductVariantPrice>)
@Money() price: number;
@EntityId({ nullable: true }) channelId: ID;
@Column('varchar')
currencyCode: CurrencyCode;
@Index()
@ManyToOne(type => ProductVariant, variant => variant.productVariantPrices, { onDelete: 'CASCADE' })
variant: ProductVariant;
@Column(type => CustomProductVariantPriceFields)
customFields: CustomProductVariantPriceFields;
}

constructor

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

price

property
number

channelId

property

currencyCode

property

variant

customFields

property
CustomProductVariantPriceFields