ChemPal Documentation - v0.0.13-beta.5
    Preparing search index...

    Interface Magento2ConfigurableVariant

    Variant of a ConfigurableProduct. Each variant pairs a set of attribute selections (e.g. size = 100g) with the underlying simple product that gets added to cart when those selections are chosen.

    const variant: Magento2ConfigurableVariant = {
    attributes: [{ code: "size", label: "100g", value_index: 42 }],
    product: {
    uid: "MTAxMzkwMA==",
    sku: "S770339-100g",
    name: "[S770339-100g] Sodiumthiophosphatedodecahydrate (100g)",
    stock_status: "IN_STOCK",
    quantity: null,
    price_range: { minimum_price: { regular_price: { value: 57.9, currency: "USD" } } }
    }
    };
    interface Magento2ConfigurableVariant {
        attributes: { code: string; label?: string; value_index: number }[];
        product: {
            uid: string;
            sku: string;
            name: string;
            stock_status: string;
            quantity: null | number;
            price_range: Pick<Magento2PriceRange, "minimum_price">;
        };
    }
    Index

    Properties

    Properties

    attributes: { code: string; label?: string; value_index: number }[]

    Attribute selections that identify this variant

    Type declaration

    • code: string

      Machine-readable attribute code (e.g. "size")

    • Optionallabel?: string

      Human-readable label for the selected option

    • value_index: number

      Numeric option identifier within the attribute

    product: {
        uid: string;
        sku: string;
        name: string;
        stock_status: string;
        quantity: null | number;
        price_range: Pick<Magento2PriceRange, "minimum_price">;
    }

    The underlying simple product backing this variant

    Type declaration

    • uid: string

      Magento UID of the variant product

    • sku: string

      SKU of the variant product

    • name: string

      Display name of the variant product

    • stock_status: string

      Stock status string (e.g. "IN_STOCK", "OUT_OF_STOCK")

    • quantity: null | number

      Stock count, if exposed by the storefront

    • price_range: Pick<Magento2PriceRange, "minimum_price">

      Variant price (only minimum_price is requested)