Attributes (Liquid Objects)
Liquid objects (also simply known as attributes) are variables, written in the Shopify Liquid template language, that provide dynamic output.
Together with Liquid filters, Liquid objects are used to modify and format the dynamic data for the product feed.
To call a Liquid object inside your feed's template editor, place the object the between double curly brackets: {{ object.attribute }}
.
Example
Here's how you would call the title attributes of a product:
{{ product.title }}
Superheroes Attack Playset
Context
The context object contains all information on products, product variants, and product collections in your store's catalog.
You obtain attributes of a specific item within the context.products
, context.product_variants
, and context.collections
iteration cycles.
context.products
Returns an array of all parent products from the store's catalog.
Example of iteration over context.products
{% for product in context.products %}
<item>
<title>{{ product.title }}</title>
</item>
{% endfor %}
<item>
<title>Superheroes Attack Playset</title>
</item>
context.product_variants
Returns an array of all product variants from the store's catalog.
Example of iteration over context.product_variants
{% for variant in context.product_variants %}
<item>
<title>{{ variant.title }}</title>
<price>{{ variant.price }}</price>
</item>
{% endfor %}
<item>
<title>Superheroes Attack Playset</title>
<price>100.00</price>
</item>
context.collections
Returns an array of all collections from the store's product catalog.
Example of iteration over context.collections
{% for collection in context.collections %}
<item>
<collection><![CDATA[{{ collection.title }}]]></collection>
</item>
{% endfor %}
<item>
<collection><![CDATA[ Playsets ]]></collection>
<collection><![CDATA[ Toys ]]></collection>
<collection><![CDATA[ Summer Sale ]]></collection>
</item>
Product
The product object contains all information on a specific product.
Product attributes have to be called inside the context.products
iterative cycle.
product.id
Returns the product's identifier.
Example of using product.id
{{ product.id }}
41507219767494
product.title
Returns the product's title (name).
Example of using product.title
{{ product.title }}
Superheroes Attack Playset
product.sku
Returns the product's stock keeping unit.
Example of using product.sku
{{ product.sku }}
TOY01
product.url
Returns the product page URL.
Example of using product.url
{{ product.url }}
https://store.myshopify.com/products/super-heroes-attack-set?om=8179
product.image_url
Returns the URL of the product's main image.
Example of using product.image_url
{{ product.image_url }}
https://cdn.shopify.com/s/files/1/0549/3103/0214/products/a1bc38d22e49bd96073851fa589dffdb.jpg?v=1644932714
product.extra_image_urls
Returns an array of URLs of all additional product images.
Example of using product.extra_image_urls
{% for url in product.extra_image_urls %}
<img_url>{{ url }}</img_url>
{% endfor %}
<img_url>https://cdn.shopify.com/s/files/1/0549/3103/0214/products/84a7e34f1ec16870f3dec205e78a21ad.jpg?v=1650892525</img_url>
product.image_urls
Returns an array of URLs of all product images (main + extra).
Example of using product.image_urls
{% for url in product.image_urls %}
<img_url>{{ url }}</img_url>
{% endfor %}
<img_url>https://cdn.shopify.com/s/files/1/0549/3103/0214/products/a1bc38d22e49bd96073851fa589dffdb.jpg?v=1644932714</img_url>
<img_url>https://cdn.shopify.com/s/files/1/0549/3103/0214/products/84a7e34f1ec16870f3dec205e78a21ad.jpg?v=1650892525</img_url>
product.video_urls
Returns an array of URLs of all product videos.
Example of using product.video_urls
{% for url in product.video_urls %}
<vid_url>{{ url }}</vid_url>
{% endfor %}
<vid_url>https://cdn.shopify.com/videos/c/vp/b6ccec2f6f8a4f09902abf7a79f2dbf1/b6ccec2f6f8a4f09902abf7a79f2dbf1.SD-480p-0.9Mbps-33565983.mp4</vid_url>
product.price
Returns the product's price.
Example of using product.price
{{ product.price }}
100
product.compare_at_price
Returns the lowest price among the compare at price fields of all the product's variants.
Example of using product.compare_at_price
{{ product.compare_at_price }}
<!-- Assume that a product has 2 variants with compare at prices 175 and 150 -->
150
product.body_html
Returns the product's description. HTML formatting is supported.
Example of using product.body_html
{{ product.body_html }}
Help superheroes defeat evil and save the world with our Superheroes Attack Playset.
product.vendor
Returns the product's vendor name.
Example of using product.vendor
{{ product.vendor }}
Funtoy
product.product_type
Returns the product's type.
Example of using product.product_type
{{ product.product_type }}
PLAYSET
product.category_ids
Returns an array with identifiers of Shopify categories which the product is assigned to.
Example of using product.category_ids
{% for category_id in product.category_ids %}
<category_id>{{ category_id }}</category_id>
{% endfor %}
<category_id>tg-5-8-12-1</category_id>
product.category_taxonomy
Returns the full path of a product's Shopify category.
Example of using product.category_taxonomy
{{ product.category_taxonomy }}
Toys & Games > Toys > Dolls, Playsets & Toy Figures > Toy Playsets > Action Figure Playsets
product.category_taxonomy_name
Returns the last level name of a product's Shopify category.
Example of using product.category_taxonomy_name
{{ product.category_taxonomy_name }}
Action Figure Playsets
product.category_taxonomy_id
Returns the identifier of a product's Shopify category.
Example of using product.category_taxonomy_id
{{ product.category_taxonomy_id }}
tg-5-8-12-1
product.collection_id
Returns the first collection identifier from the array of all collections the product is assigned to.
Example of using product.collection_id
{{ product.collection_id }}
284736127174
product.collection_title
Returns the first collection name from the array of all collections the product is assigned to.
Example of using product.collection_title
{{ product.collection_title }}
Playsets
product.collection_titles
Returns an array of all collection names which the product is assigned to.
Example of using product.collection_titles
{% for collection_title in product.collection_titles %}
<collection_title>{{ collection_title }}</collection_title>
{% endfor %}
<collection_title>Playsets</collection_title>
<collection_title>Toys</collection_title>
<collection_title>Summer Sale</collection_title>
You can turn this array into a string with the join
modifier in such way:
{{ product.collection_titles | join: ', ' }}
Playsets, Toys, Summer Sale
product.mapping_collection_id
Returns the identifier of the first collection which the product is mapped to.
For more information about category mapping, please visit the Category Mapping page.
Example of using product.mapping_collection_id
{{ product.mapping_collection_id }}
3166
product.mapping_collection_title
Returns the name of the first collection which the product is mapped to.
For more information about category mapping, please visit the Category Mapping page.
Example of using product.mapping_collection_title
{{ product.mapping_collection_title }}
Toys & Games > Toys > Dolls, Playsets & Toy Figures > Toy Playsets
product.mapping_collection_titles
Returns an array of collection names which the product is mapped to.
For more information about category mapping, please visit the Category Mapping page.
Example of using product.mapping_collection_titles
{% for collection in product.mapping_collection_titles %}
<collection_title>{{ collection }}</collection_title>
{% endfor %}
<collection_title>Toys & Games > Toys > Dolls, Playsets & Toy Figures > Toy Playsets</collection_title>
<collection_title>Toys & Games > Toys > Dolls, Playsets & Toy Figures</collection_title>
<collection_title>Toys & Games</collection_title>
product.tags
Returns an array of product tags.
Example of using product.tags
{% for item in product.tags %}
<tag>{{ item }}</tag>
{% endfor %}
<tag>playsets</tag>
<tag>toys</tag>
You can turn this array into a string with the join
modifier in such way:
{{ product.tags | join: ', ' }}
playsets, toys
product.published_scope
Returns an array of names of the sales channels in which the product is displayed.
Example of using product.published_scope
{{ product.published_scope }}
global
product.metafields
Returns an object with the product's metafields.
To use metafields, you first must create a metafield in the Shopify admin, fill the metafield's data for each product, and activate metafields in Mulwi.
Example of using product.metafields
Assume that products in the store have a metafield with the name my_fields. Here's how you would get the value of this metafield:
{{ product.metafields }}
map[my_fields:map[length:{"value":1400.0,"unit":"mm"} width:{"value":340.0,"unit":"mm"}]]
To access a specific metafield element, add to the product.metafields
variable the metafield name after the dot. For example, here's how you would get the length value:
{{ product.metafields.my_fields.length }}
{"value":1400.0,"unit":"mm"}
product.variants
Returns an array of product's variants.
Example of using product.variants
{{ product.variants }}
[map[barcode: body_html:Mobile Command Center Playset collection_id:0 collection_title: collection_titles:[] color: compare_at_price:0 cost:0 created_at:2022-02-15 08:45:20 -0500 -0500 id:41598888313030 image_url:https://cdn.shopify.com/s/files/1/0549/3103/0214/products/fd22f7965849f923e9f32e5cd1ad9577.jpg?v=1644932720 in_stock:true inventory_item_id:0 inventory_item_tracked:true inventory_management:shopify mapping_collection_id: mapping_collection_title: mapping_collection_titles:[] metafields:map[] option1:Default Title option2: option3: parent_id:7200553631942 parent_image_url:https://cdn.shopify.com/s/files/1/0549/3103/0214/products/fd22f7965849f923e9f32e5cd1ad9577.jpg?v=1644932720 parent_image_urls:[] parent_metafields:map[] parent_published_scope:global parent_sku: parent_url: price:75 product_type:TOYS qty:6 size: sku:TOY04 tags:[playsets toys] title:Mobile Command Center Playset updated_at:2022-02-15 08:59:10 -0500 -0500 url:https://store.myshopify.com/products/mobile-command-center?variant=41598888313030&om=8179 vendor:Funtoy weight_grams:0]]
product.variant_id
Returns the identifier of the product's first variant.
Example of using product.variant_id
{{ product.variant_id }}
41507219767494
product.variant_title
Returns the name of the product's first variant.
Example of using product.variant_title
{{ product.variant_title }}
VARIANT-TOY3
product.variant_sku
Returns the stock keeping unit of the product's first variant.
Example of using product.variant_sku
{{ product.variant_sku }}
TOY03
product.variant_qty
Returns the stock quantity of the product's first variant.
Example of using product.variant_qty
{{ product.variant_qty }}
94
product.variant_url
Returns the page URL of the product's first variant.
Example of using product.variant_url
{{ product.variant_url }}
https://store.myshopify.com/products/super-heroes-attack-set?variant=41598888149190&om=8179
product.variant_image_url
Returns the image URL of the product's first variant.
Example of using product.variant_image_url
{{ product.variant_image_url }}
https://cdn.shopify.com/s/files/1/0549/3103/0214/products/84a7e34f1ec16870f3dec205e78a21ad.jpg?v=1650892525
product.variant_price
Returns the price of the product's first variant.
Example of using product.variant_price
{{ product.variant_price }}
100
product.variant_compare_at_price
Returns the original price before an adjustment or a sale of the product's first variant.
Example of using product.variant_compare_at_price
{{ product.variant_compare_at_price }}
175
product.variant_cost
Returns the cost of the product's first variant.
Example of using product.variant_cost
{{ product.variant_cost }}
50
product.variant_unit_price
Returns the unit price of the product's first variant.
This attribute is available only to merchants selling in the European Union (EU) and in Switzerland.
Example of using product.variant_unit_price
{{ product.variant_unit_price }}
10
product.variant_measured_type
Returns the type of unit measurement of the product's first variant.
This attribute is available only to merchants selling in the European Union (EU) and in Switzerland.
Example of using product.variant_measured_type
{{ product.variant_measured_type }}
WEIGHT
product.variant_base_measure
Returns the base measure value of the product's first variant.
This attribute is available only to merchants selling in the European Union (EU) and in Switzerland.
Example of using product.variant_base_measure
{{ product.variant_base_measure }}
1
product.variant_base_measure_unit
Returns the base measure unit of the product's first variant.
This attribute is available only to merchants selling in the European Union (EU) and in Switzerland.
Example of using product.variant_base_measure_unit
{{ product.variant_base_measure_unit }}
KG
product.variant_total_measure
Returns the total measure value of the product's first variant.
This attribute is available only to merchants selling in the European Union (EU) and in Switzerland.
Example of using product.variant_total_measure
{{ product.variant_total_measure }}
3
product.variant_total_measure_unit
Returns the total measure unit of the product's first variant.
This attribute is available only to merchants selling in the European Union (EU) and in Switzerland.
Example of using product.variant_total_measure_unit
{{ product.variant_total_measure_unit }}
KG
product.variant_weight_grams
Returns the weight (in grams) of the product's first variant.
Example of using product.variant_weight_grams
{{ product.variant_weight_grams }}
400
product.variant_barcode
Returns the barcode of the product's first variant.
Example of using product.variant_barcode
{{ product.variant_barcode }}
ABC-1234
product.variant_country_code_of_origin
Returns the ISO 3166-1 alpha-2 code of the origin country of the product's first variant.
Example of using product.variant_country_code_of_origin
{{ product.variant_country_code_of_origin }}
CN
product.variant_harmonized_system_code
Returns the Harmonized System Code of the product's first variant.
Example of using product.variant_harmonized_system_code
{{ product.variant_harmonized_system_code }}
9503
product.variant_inventory_management
Returns the name of the inventory management system of the product's first variant.
Example of using product.variant_inventory_management
{{ product.variant_inventory_management }}
shopify
product.variant_inventory_item_id
Returns the inventory identifier of the product's first variant.
Example of using product.variant_inventory_item_id
{{ product.variant_inventory_item_id }}
43605311717574
product.variant_inventory_item_tracked
Returns a boolean value of true
if the inventory of the product's first variant is tracked, otherwise returns false
.
Example of using product.variant_inventory_item_tracked
{{ product.variant_inventory_item_tracked }}
true
product.variant_inventory_policy
Returns deny
if the product's first variant cannot be purchased once it is out-of-stock, or continue
otherwise.
Example of using product.variant_inventory_policy
{{ product.variant_inventory_policy }}
deny
product.variant_option1
Returns the first of the product's variant option values.
Example of using product.variant_option1
{{ product.variant_option1 }}
Black
product.variant_option2
Returns the second of the product's variant option values.
Example of using product.variant_option2
{{ product.variant_option2 }}
GIFT
product.variant_option3
Returns the third of the product's variant option values.
Example of using product.variant_option3
{{ product.variant_option2 }}
ENGRAVING
product.variant_metafields
Returns an object with the product's variant metafields.
To use metafields, you first must create a metafield in the Shopify admin, fill the metafield's data for each product, and activate metafields in Mulwi.
Example of using product.variant_metafields
Assume that product's variants in the store have a metafield with the name my_fields. Here's how you would get the value of this metafield:
{{ product.variant_metafields }}
map[my_fields:map[length:{"value":1400.0,"unit":"mm"} width:{"value":340.0,"unit":"mm"}]]
To access a specific metafield element, add to the product.variant_metafields
variable the metafield name after the dot. For example, here's how you would get the length value:
{{ product.variant_metafields.my_fields.length }}
{"value":1400.0,"unit":"mm"}
product.variant_created_at
Returns the date and time of creation of the product's first variant.
Example of using product.variant_created_at
{{ product.variant_created_at }}
2022-01-28 14:27:56 +0200 EET
product.variant_updated_at
Returns date and time of the last update of the product's first variant.
Example of using product.variant_updated_at
{{ product.variant_updated_at }}
2022-01-29 13:12:26 +0200 EET
Variant
The variant object contains all information on a specific product's variant.
Product variant attributes have to be called inside the context.product_variants
iterative cycle.
variant.id
Returns the product variant's identifier.
Example of using variant.id
{{ variant.id }}
41507219767494
variant.title
Returns the product variant's title (name).
Example of using variant.title
{{ variant.title }}
VARIANT-TOY3
variant.sku
Returns the product variant's stock keeping unit.
Example of using variant.sku
{{ variant.sku }}
TOY03
variant.qty
Returns the product variant's stock quantity.
Example of using variant.qty
{{ variant.qty }}
94
variant.url
Returns the product variant's URL.
Example of using variant.url
{{ variant.url }}
https://store.myshopify.com/products/super-heroes-attack-set?variant=41598888149190&om=8179
variant.image_url
Returns the product variant's image URL.
Example of using variant.image_url
{{ variant.image_url }}
https://cdn.shopify.com/s/files/1/0549/3103/0214/products/84a7e34f1ec16870f3dec205e78a21ad.jpg?v=1650892525
variant.price
Returns the product variant's price.
Example of using variant.price
{{ variant.price }}
100
variant.compare_at_price
Returns the product variant's original price before an adjustment or a sale.
Example of using variant.compare_at_price
{{ variant.compare_at_price }}
175
variant.cost
Returns the product variant's cost.
Example of using variant.cost
{{ variant.cost }}
50
variant.in_stock
Returns a boolean value of true
if the product variant is in stock, otherwise returns false
.
Example of using variant.in_stock
{{ variant.in_stock }}
true
variant.body_html
Returns the product variant's description. HTML formatting is supported.
Example of using variant.body_html
{{ variant.body_html }}
Team up with the superheroes team to defeat evil and save the world in the Superheroes Attack Playset.
variant.vendor
Returns the product variant's vendor name.
Example of using variant.vendor
{{ variant.vendor }}
Funtoy
variant.product_type
Returns the product variant's type.
Example of using variant.product_type
{{ variant.product_type }}
TOYS
variant.category_taxonomy
Returns the full path of a product variant's Shopify category.
Example of using variant.category_taxonomy
{{ variant.category_taxonomy }}
Toys & Games > Toys > Dolls, Playsets & Toy Figures > Toy Playsets > Action Figure Playsets
variant.category_taxonomy_name
Returns the last level name of a product variant's Shopify category.
Example of using variant.category_taxonomy_name
{{ variant.category_taxonomy_name }}
Action Figure Playsets
variant.category_taxonomy_id
Returns the identifier of a product variant's Shopify category.
Example of using variant.category_taxonomy_id
{{ variant.category_taxonomy_id }}
tg-5-8-12-1
variant.collection_id
Returns the first collection identifier from the array of all collections the product variant is assigned to.
Example of using variant.collection_id
{{ variant.collection_id }}
284736127174
variant.collection_title
Returns the first collection name from the array of all collections the product variant is assigned to.
Example of using variant.collection_title
{{ variant.collection_title }}
Playsets
variant.collection_titles
Returns an array of all collection names which the product variant is assigned to.
Example of using variant.collection_titles
{% for collection_title in {{ variant.collection_titles }} %}
<collection_title>{{ collection_title }}</collection_title>
{% endfor %}
<collection_title>Playsets</collection_title>
<collection_title>Toys</collection_title>
<collection_title>Summer Sale</collection_title>
You can turn this array into a string with the join
modifier in such way:
{{ variant.collection_titles | join: ', ' }}
Playsets, Toys, Summer Sale
variant.mapping_collection_id
Returns the identifier of the first collection which the product variant is mapped to.
For more information about category mapping, please visit the Category Mapping page.
Example of using variant.mapping_collection_id
{{ variant.mapping_collection_id }}
3166
variant.mapping_collection_title
Returns the name of the first collection which the product variant is mapped to.
For more information about category mapping, please visit the Category Mapping page.
Example of using variant.mapping_collection_title
{{ variant.mapping_collection_title }}
Toys & Games > Toys > Dolls, Playsets & Toy Figures > Toy Playsets
variant.mapping_collection_titles
Returns an array of collection names which the product variant is mapped to.
For more information about category mapping, please visit the Category Mapping page.
Example of using variant.mapping_collection_titles
{% for collection in variant.mapping_collection_titles %}
<collection_title>{{ collection }}</collection_title>
{% endfor %}
<collection_title>Toys & Games > Toys > Dolls, Playsets & Toy Figures > Toy Playsets</collection_title>
<collection_title>Toys & Games > Toys > Dolls, Playsets & Toy Figures</collection_title>
<collection_title>Toys & Games</collection_title>
variant.tags
Returns an array of product variant's tags.
Example of using variant.tags
{% for item in variant.tags %}
<tag>{{ item }}</tag>
{% endfor %}
<tag>playsets</tag>
<tag>toys</tag>
You can turn this array into a string with the join
modifier in such way:
{{ product.tags | join: ', ' }}
playsets, toys
variant.unit_price
Returns the product variant's unit price.
This attribute is available only to merchants selling in the European Union (EU) and in Switzerland.
Example of using variant.unit_price
{{ variant.unit_price }}
10
variant.measured_type
Returns the product variant's type of unit measurement.
This attribute is available only to merchants selling in the European Union (EU) and in Switzerland.
Example of using variant.measured_type
{{ variant.measured_type }}
WEIGHT
variant.base_measure
Returns the product variant's base measure value.
This attribute is available only to merchants selling in the European Union (EU) and in Switzerland.
Example of using variant.base_measure
{{ variant.base_measure }}
1
variant.base_measure_unit
Returns the product variant's base measure unit.
This attribute is available only to merchants selling in the European Union (EU) and in Switzerland.
Example of using variant.base_measure_unit
{{ variant.base_measure_unit }}
KG
variant.total_measure
Returns the product variant's total measure value.
This attribute is available only to merchants selling in the European Union (EU) and in Switzerland.
Example of using variant.total_measure
{{ variant.total_measure }}
3
variant.total_measure_unit
Returns the product variant's total measure unit.
This attribute is available only to merchants selling in the European Union (EU) and in Switzerland.
Example of using variant.total_measure_unit
{{ variant.total_measure_unit }}
KG
variant.weight_grams
Returns the product variant's weight in grams.
Example of using variant.weight_grams
{{ variant.weight_grams }}
400
variant.barcode
Returns the product variant's barcode.
Example of using variant.barcode
{{ variant.barcode }}
ABC-1234
variant.country_code_of_origin
Returns the ISO 3166-1 alpha-2 code of the origin country of the product variant.
Example of using variant.country_code_of_origin
{{ variant.country_code_of_origin }}
CN
variant.harmonized_system_code
Returns the product variant's Harmonized System Code.
Example of using variant.harmonized_system_code
{{ variant.harmonized_system_code }}
9503
variant.inventory_management
Returns the name of the product variant's inventory management system.
Example of using variant.inventory_management
{{ variant.inventory_management }}
shopify
variant.inventory_item_id
Returns the product variant's inventory identifier.
Example of using variant.inventory_item_id
{{ variant.inventory_item_id }}
43605311717574
variant.inventory_item_tracked
Returns a boolean value of true
if the product variant's inventory is tracked, otherwise returns false
.
Example of using variant.inventory_item_tracked
{{ variant.inventory_item_tracked }}
true
variant.inventory_policy
Returns deny
if the product variant cannot be purchased once it is out-of-stock, or continue
otherwise.
Example of using variant.inventory_policy
{{ variant.inventory_policy }}
deny
variant.inventory_locations
Returns an array of names of the product variant's stock locations and quantities at each location.
Example of using variant.inventory_locations
{{ variant.inventory_locations }}
map[Germany Warehouse:50 My Custom Location:20 Shop location:30]
To access the product variant's quantity at a specific location, add the name of the location, encased in quotes and square brackets, after variant.inventory_locations
.
For example, here's how you would get the quantity of the product's variant in a location named Germany Warehouse:
{{ variant.inventory_locations["Germany Warehouse"] }}
50
You can also check if the product's variant is available at a specific location in such way:
{% if variant.inventory_locations["Germany Warehouse"] and variant.inventory_locations["Germany Warehouse"] > 0 %}
<quantity>{{ variant.inventory_locations["Germany Warehouse"] }}</quantity>
{% endif %}
<quantity>50</quantity>
In case you are using the product context, you can access the variant's locations in the product.variants
iterative cycle.
variant.size
Returns the product variant's size.
Example of using variant.size
{{ variant.size }}
43
variant.color
Returns the product variant's color.
Example of using variant.color
{{ variant.color }}
Black
variant.option1
Returns the first of the product variant's option values.
Example of using variant.option1
{{ variant.option1 }}
Black
variant.option2
Returns the second of the product variant's option values.
Example of using variant.option2
{{ variant.option2 }}
GIFT
variant.option3
Returns the third of the product variant's option values.
Example of using variant.option3
{{ variant.option3 }}
ENGRAVING
variant.metafields
Returns an object with the product variant's metafields.
To use metafields, you first must create a metafield in the Shopify admin, fill the metafield's data for each product, and activate metafields in Mulwi.
Example of using variant.metafields
Assume that product's variants in the store have a metafield with the name my_fields. Here's how you would get the value of this metafield:
{{ variant.metafields }}
map[my_fields:map[length:{"value":1400.0,"unit":"mm"} width:{"value":340.0,"unit":"mm"}]]
To access a specific metafield element, add to the variant.metafields
variable the metafield name after the dot. For example, here's how you would get the length value:
{{ variant.metafields.my_fields.length }}
{"value":1400.0,"unit":"mm"}
variant.created_at
Returns the product variant's date and time of creation.
Example of using variant.created_at
{{ variant.created_at }}
2022-01-28 14:27:56 +0200 EET
variant.updated_at
Returns the product variant's date and time of the last update.
Example of using variant.updated_at
{{ variant.updated_at }}
2022-01-29 13:12:26 +0200 EET
variant.parent_id
Returns the identifier of the product variant's parent item.
Example of using variant.parent_id
{{ variant.parent_id }}
41507219767494
variant.parent_sku
Returns the stock keeping unit of the product variant's parent item.
Example of using variant.parent_sku
{{ variant.parent_sku }}
TOY01
variant.parent_url
Returns the page URL of the product variant's parent item.
Example of using variant.parent_url
{{ variant.parent_url }}
https://store.myshopify.com/products/super-heroes-attack-set?om=8179
variant.parent_image_url
Returns the main image URL of the product variant's parent item.
Example of using variant.parent_image_url
{{ variant.parent_image_url }}
https://cdn.shopify.com/s/files/1/0549/3103/0214/products/a1bc38d22e49bd96073851fa589dffdb.jpg?v=1644932714
variant.parent_extra_image_urls
Returns an array of URLs of all additional images of the product variant's parent item.
Example of using variant.parent_extra_image_urls
{% for url in variant.parent_extra_image_urls %}
<img_url>{{ url }}</img_url>
{% endfor %}
<img_url>https://cdn.shopify.com/s/files/1/0549/3103/0214/products/84a7e34f1ec16870f3dec205e78a21ad.jpg?v=1650892525</img_url>
variant.parent_image_urls
Returns an array of URLs of all images (main + extra) of the product variant's parent item.
Example of using variant.parent_image_urls
{% for url in variant.parent_image_urls %}
<img_url>{{ url }}</img_url>
{% endfor %}
<img_url>https://cdn.shopify.com/s/files/1/0549/3103/0214/products/a1bc38d22e49bd96073851fa589dffdb.jpg?v=1644932714</img_url>
<img_url>https://cdn.shopify.com/s/files/1/0549/3103/0214/products/84a7e34f1ec16870f3dec205e78a21ad.jpg?v=1650892525</img_url>
variant.parent_published_scope
Returns an array of names of the sales channels in which the product variant's parent item is displayed.
Example of using variant.parent_published_scope
{{ variant.parent_published_scope }}
global
variant.parent_metafields
Returns an object with the metafields of the product variant's parent item.
To use metafields, you first must create a metafield in the Shopify admin, fill the metafield's data for each product, and activate metafields in Mulwi.
Example of using variant.parent_metafields
Assume that products in the store have a metafield with the name my_fields. Here's how you would get the value of this metafield:
{{ variant.parent_metafields }}
map[my_fields:map[length:{"value":1400.0,"unit":"mm"} width:{"value":340.0,"unit":"mm"}]]
To access a specific metafield element, add to the variant.parent_metafields
variable the metafield name after the dot. For example, here's how you would get the length value:
{{ variant.parent_metafields.my_fields.length }}
{"value":1400.0,"unit":"mm"}
Collection
The collection object contains all information on a store's specific collection.
Collection attributes have to be called inside the context.collections
iterative cycle.
collection.id
Returns the collection's identifier.
Example of using collection.id
{{ collection.id }}
284736127174
collection.title
Returns the collection's title (name).
Example of using collection.title
{{ collection.title }}
Playsets
collection.metafields
Returns an object with the collection's metafields.
To use metafields, you first must create a metafield in the Shopify admin, fill the metafield's data for each product, and activate metafields in Mulwi.
Example of using collection.metafields
Assume that collections in the store have a metafield with the name my_fields. Here's how you would get the value of this metafield:
{{ collection.metafields }}
map[my_fields:map[offer_details:{"value":"Buy 3 playsets and pay only for 2!"}]]
To access a specific metafield element, add to the collection.metafield
variable the metafield name after the dot. For example, here's how you would get the offer_details value:
{{ product.metafields.my_fields.offer_details }}
{"value":"Buy 3 playsets and pay only for 2!"}