Created by potrace 1.16, written by Peter Selinger 2001-2019

Miva Developer Docs

Channels such as Google list each size and color as its own item, grouped by item_group_id. Turn on Include product variants as separate feed rows on the Source tab to do this.

What a variant row contains#

A product with variants writes one row per variant. A product without variants writes one row as usual.

Each variant row starts as a copy of its product, then takes these values from the variant:

Field Variant row value
code The variant part’s product code
sku The part’s SKU, or its code when the SKU is blank
name The product name followed by the option names, for example T-Shirt (Red, M)
price, cost, weight Worked out by Miva for the variant, using the product’s variant pricing setting
item_group_id The product’s code
product_url The product’s URL with Variant_ID=<id> added, so the product page opens with that variant selected
in_stock, inventory_count From the variant’s parts. In stock only if every part has enough stock for its quantity.
description and custom fields The part’s value when it has one, otherwise the product’s
Main Image, Additional Images The part’s images when it has them, otherwise the product’s
shipping dimensions The part’s shipping rules, otherwise the product’s
attribute columns The variant’s option for each attribute (below)

Everything else, such as the link, active flag and taxable flag, comes from the product.

Conditions on the Source tab are checked against the product before its variants are written.

Color, size and other attributes#

Every attribute code in the store appears in the field list as “Attribute: “. Map it to a column to write each variant’s option.

The value is the option’s prompt, the text shoppers see, such as Red or 38. When the prompt is blank, the option code is used.

Example: a T-shirt with Color (Red, Blue) and Size (S, M) gives:

id item_group_id color size
TEE-RED-S TEE Red S
TEE-RED-M TEE Red M
TEE-BLUE-S TEE Blue S
TEE-BLUE-M TEE Blue M

The ready-made channel files map color, size, material and pattern. If your attributes use other codes, such as colour or shoe_size, change source= to your codes. Each column is left out of the row when the product has no such attribute.

Variant rows link to the product page with ?Variant_ID= added (or &Variant_ID= when the URL already has a query string), for example:

https://www.example.com/sweatshirt.html?Variant_ID=18231

Miva selects that variant’s options when the page opens.

Variants with Data Builder#

A Data Builder field with Store a value for each variant stores a row per variant. A Feed Builder feed with variants on and the field mapped as Use Value as Feed writes one line per variant from those stored rows. See Use with Feed Builder.