import { ShopifyUnitPriceMeasurement } from '@daffodil/driver/shopify'
The measurement data used to calculate unit prices for a ProductVariant. Unit pricing helps customers compare costs across different package sizes by showing a standardized price, such as "$9.99 / 100ml".
The object includes the quantity being sold (value and unit) and the reference measurement used for price comparison. Use this alongside the variant's unitPrice field to display complete unit pricing information.
interface ShopifyUnitPriceMeasurement {
__typename: "UnitPriceMeasurement"
measuredType: ShopifyUnitPriceMeasurementMeasuredType
quantityUnit: ShopifyUnitPriceMeasurementMeasuredUnit
quantityValue: number
referenceUnit: ShopifyUnitPriceMeasurementMeasuredUnit
referenceValue: number
}
__typename "UnitPriceMeasurement" |
|---|
measuredType ShopifyUnitPriceMeasurementMeasuredType |
|---|
The type of unit of measurement for the unit price measurement. |
quantityUnit ShopifyUnitPriceMeasurementMeasuredUnit |
|---|
The quantity unit for the unit price measurement. |
quantityValue number |
|---|
The quantity value for the unit price measurement. |
referenceUnit ShopifyUnitPriceMeasurementMeasuredUnit |
|---|
The reference unit for the unit price measurement. |
referenceValue number |
|---|
The reference value for the unit price measurement. |