Home > widget-integration > FormattedVariant

FormattedVariant interface

Variant formatted for template rendering. Primary values (price, compare_at_price) are formatted strings for direct display. Raw numeric values are available with _raw suffix.

Signature:

export interface FormattedVariant 

Properties

Property

Modifiers

Type

Description

available

boolean

compare_at_price_formatted

string | null

Formatted compare price (alias)

compare_at_price_raw

number | null

Raw numeric compare price or null

compare_at_price

string | null

Formatted compare price or null

id

number

image?

string

(Optional)

price_formatted

string

Formatted price string (alias)

price_raw

number | null

Raw numeric price value or null if not available

price

string

Formatted price string (e.g., "$19.99" or "100đ") - primary value for templates

title

string