Variables

ProductPrices

declaration

const ProductPrices: { ~schema: { isOnSale: boolean; isStartingFrom: boolean; price: { amount: number; currency: string; }; savingsPercent?: number; strikethroughPrice?: { amount: number; currency: string; }; unitPrice?: { price: { amount: number; currency: string; }; quantity: { unit: MeasurementUnit; value: number; }; reference: { unit: MeasurementUnit; value: number; }; }; }; }

Represents an aggregate of all prices for a product.

This is a convenience component that aggregates the prices of all variants.

Type declaration

NameTypeDefault valueDescription

~schema

{ isOnSale: boolean; isStartingFrom: boolean; price: { amount: number; currency: string; }; savingsPercent?: number; strikethroughPrice?: { amount: number; currency: string; }; unitPrice?: { price: { amount: number; currency: string; }; quantity: { unit: MeasurementUnit; value: number; }; reference: { unit: MeasurementUnit; value: number; }; }; }

~schema.isOnSale

boolean

If true, indicates that the product is discounted from its original price. See strikethroughPrice for the original price and savingsPercent for the percentage of discount.

~schema.isStartingFrom

boolean

If true, indicates that there are multiple variants with different prices.

Can be used in the frontend to indicate a starting-from price, e.g. "from 100 EUR".

~schema.price

{ amount: number; currency: string; }

Money

Advertised selling price of the product. Generally the lowest price of all variants.

~schema.price.amount

number

Amount in smallest unit of currency. E.g. cents, pence, etc.

~schema.price.currency

string

ISO 4217 currency code. E.g. 'USD', 'EUR', 'GBP', etc.

~schema.savingsPercent?

number

Percentage of discount from the strikethroughPrice.

~schema.strikethroughPrice?

{ amount: number; currency: string; }

Original price of the product, non-discounted price or recommended retail price. If the product has multiple variants, this is the lowest non-discounted price of all variants.

See

https://support.google.com/merchants/answer/9017019?hl=en

~schema.strikethroughPrice.amount

number

Amount in smallest unit of currency. E.g. cents, pence, etc.

~schema.strikethroughPrice.currency

string

ISO 4217 currency code. E.g. 'USD', 'EUR', 'GBP', etc.

~schema.unitPrice?

{ price: { amount: number; currency: string; }; quantity: { unit: MeasurementUnit; value: number; }; reference: { unit: MeasurementUnit; value: number; }; }

Price per unit of the product. E.g. 100 EUR per 100g.

See

https://support.google.com/merchants/answer/6324455?hl=en&sjid=12076696190966471938-EU

~schema.unitPrice.price

{ amount: number; currency: string; }

Money

Price for the given reference measurement.

~schema.unitPrice.price.amount

number

Amount in smallest unit of currency. E.g. cents, pence, etc.

~schema.unitPrice.price.currency

string

ISO 4217 currency code. E.g. 'USD', 'EUR', 'GBP', etc.

~schema.unitPrice.quantity

{ unit: MeasurementUnit; value: number; }

Measurement

The quantity in the product variant. E.g. a bottle might be 330ml

~schema.unitPrice.quantity.unit

MeasurementUnit

~schema.unitPrice.quantity.value

number

~schema.unitPrice.reference

{ unit: MeasurementUnit; value: number; }

Measurement

The reference quantity for showing the price per unit. E.g. xx EUR / 100ml

~schema.unitPrice.reference.unit

MeasurementUnit

~schema.unitPrice.reference.value

number