Objects

Liquid objects represent variables that you can use to build your theme. Object types include store resources, standard Shopify content, and functional elements that help you to build interactivity.

Objects might represent a single data point, or contain multiple properties. Some properties might represent a related object, such as a product in a collection.


Note

Liquid objects are also often referred to as Liquid variables.


Usage

Objects, along with their properties, are wrapped in curly brace delimiters {{ }}.

For example, the product object contains a property called title that can be used to output the title of a product.

Object access

The way that you access an object depends on the object and the context in which you want to access it. An object might be accessed in the following ways:

  • Globally: The object can be accessed directly in any Liquid theme file, excluding checkout.liquid and Liquid asset files.

  • In a template: The object can be accessed directly in specific templates, or in sections or blocks included in the template. For example, you can access the product object directly in a product template, or a section referenced in a product template.

  • Through a parent object: Many objects are returned by another object, or as a property of a parent object. For example, you can access article objects through the global articles object, or through the articles property of the blog object.

Refer to each object to learn about how it can be accessed.

Creating

You can also create your own variables using variable tags. Variables are treated like objects syntactically.

Anchor to section titled '[object Object]'

additional_checkout_buttons
object

Returns true if a store has any payment providers with offsite checkouts, such as PayPal Express Checkout.

Use additional_checkout_buttons to check whether these payment providers exist, and content_for_additional_checkout_buttons to show the associated checkout buttons. To learn more about how to use these objects, refer to Accelerated checkout.

Copy
{% if additional_checkout_buttons %}
{{ content_for_additional_checkout_buttons }}
{% endif %}

Directly accessible in

  • Global
additional_checkout_buttons
Was this section helpful?
{
"address1": "150 Elgin Street",
"address2": "8th floor",
"city": "Ottawa",
"company": "Polina's Potions, LLC",
"country": {},
"country_code": "CA",
"first_name": null,
"id": 56174706753,
"last_name": null,
"name": "",
"phone": "416-123-1234",
"province": "Ontario",
"province_code": "ON",
"street": "150 Elgin Street, 8th floor",
"summary": "150 Elgin Street, 8th floor, Ottawa, Ontario, Canada",
"url": "/account/addresses/56174706753",
"zip": "K2P 1L4"
}
Was this section helpful?
Anchor to section titled '[object Object]'

all_country_option_tags
object

Creates an <option> tag for each country.

An attribute called data-provinces is set for each <option>, and contains a JSON-encoded array of the country or region's subregions. If a country doesn't have any subregions, then an empty array is set for its data-provinces attribute.


Tip

To return only the countries and regions included in the store's shipping zones, use the country_option_tags object.


You can wrap the all_country_option_tags object in <select> tags to build a country option selector.

Copy
<select name="country">
{{ all_country_option_tags }}
</select>

Directly accessible in

  • Global
all_country_option_tags
Was this section helpful?

All of the products on a store.


Note

The all_products object has a limit of 20 unique handles per page. If you want more than 20 products, then consider using a collection instead.


You can use all_products to access a product by its handle. This returns the product object for the specified product. If the product isn't found, then empty is returned.

Directly accessible in

  • Global
all_products
Was this section helpful?

An app. This object is usually used to access app-specific information for use with theme app extensions.

Properties

Was this section helpful?
{
"author": "Polina Waters",
"comment_post_url": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion/comments",
"comments": [],
"comments_count": 1,
"comments_enabled?": true,
"content": "<p>We've all had this problem before: we peek into the potions vault to determine which potions we are running low on, and the invisibility potion bottle looks completely empty.</p>\n<p>...</p>\n<p> </p>",
"created_at": "2022-04-14 16:56:02 -0400",
"excerpt": "And where to buy <strong>more</strong>!",
"excerpt_or_content": "And where to buy <strong>more</strong>!",
"handle": "potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion",
"id": 556510085185,
"image": {},
"metafields": {},
"moderated?": true,
"published_at": "2022-04-14 16:56:02 -0400",

Templates using article
object

Was this section helpful?

All of the articles across the blogs in the store.

You can use articles to access an article by its handle.

Directly accessible in

  • Global
articles
Was this section helpful?

The content and settings of a section block.

Sections and blocks are reusable modules of content that make up templates.

You can include a maxiumum of 50 blocks in a section. To learn more about using blocks, refer to the Building with sections and blocks.

{
"id": "column1",
"settings": "array",
"shopify_attributes": "data-shopify-editor-block=\"{\"id\":\"column1\",\"type\":\"column\"}\"",
"type": "column"
}
Was this section helpful?

Information about a specific blog in the store.

{
"all_tags": [],
"articles": [],
"articles_count": 3,
"comments_enabled?": true,
"handle": "potion-notions",
"id": 78580613185,
"metafields": {},
"moderated?": true,
"next_article": {},
"previous_article": {},
"tags": [],
"template_suffix": "",
"title": "Potion Notions",
"url": "/blogs/potion-notions"
}
Was this section helpful?

All of the blogs in the store.

You can use blogs to access a blog by its handle.

Directly accessible in

  • Global
blogs
Was this section helpful?
{
"colors": {},
"cover_image": {},
"favicon_url": {},
"logo": {},
"metafields": {},
"short_description": "Canada's foremost retailer for potions and potion accessories. Try one of our award-winning artisanal potions, or find the supplies to make your own!",
"slogan": "Save the toil and trouble!",
"square_logo": {}
}
Was this section helpful?

The colors defined as part of a store's brand assets.

To access a brand color, specify the following:

  • The brand color group: either primary or secondary
  • The color role: Whether the color is a background or foreground (contrasting) color
  • The 0-based index of the color within the group and role

Returned by

brand_color
Was this section helpful?

The canonical URL for the current page.

To learn about canonical URLs, refer to Google's documentation.

Directly accessible in

  • Global
canonical_url
Was this section helpful?

A customer’s cart.

Properties

Deprecated Properties

{
"attributes": {},
"cart_level_discount_applications": [],
"checkout_charge_amount": "380.25",
"currency": {},
"discount_applications": [],
"discounts": [],
"duties_included": false,
"empty?": false,
"item_count": 2,
"items": [],
"items_subtotal_price": "422.49",
"note": "Hello this is a note",
"original_total_price": "424.99",
"requires_shipping": true,
"taxes_included": false,
"total_discount": "44.74",
"total_price": "380.25",
"total_weight": 0
}

Templates using cart
object

Was this section helpful?

A customer's checkout.


Deprecated

The checkout object will be deprecated for the Information, Shipping, and Payment pages on August 13, 2024. Merchants who have customized these pages using checkout.liquid need to upgrade to Checkout Extensibility before August 13, 2024.

Learn how to build checkout extensions that extend the functionality of Shopify checkout.


You can access the checkout object on the Order status page.

Shopify Plus merchants can access the checkout object in the checkout.liquid layout.

Properties

Deprecated Properties

{
"applied_gift_cards": [],
"attributes": {},
"billing_address": {},
"buyer_accepts_marketing": false,
"cart_level_discount_applications": [],
"currency": "CAD",
"customer": {},
"discount_applications": [],
"discounts_amount": 4224,
"discounts_savings": -4224,
"email": "cornelius.potionmaker@gmail.com",
"gift_cards_amount": 0,
"id": 29944051400769,
"line_items": [],
"line_items_subtotal_price": 42249,
"name": "#29944051400769",
"note": null,
"order": null,
"order_id": null,
"order_name": "#29944051400769",
"order_number": "#29944051400769",
"requires_shipping": true,
"shipping_address": {},
"shipping_method": {},

Templates using checkout
object

Was this section helpful?
{
"all_products_count": 10,
"all_tags": [
"Burning",
"dried",
"extracts",
"fresh",
"ingredients",
"plant",
"supplies"
],
"all_types": [
"Animals & Pet Supplies",
"Baking Flavors & Extracts",
"Cooking & Baking Ingredients",
"Dried Flowers",
"Fruits & Vegetables",
"Seasonings & Spices",
"Water"
],
"all_vendors": [
"Clover's Apothecary",
"Polina's Potent Potions",
"Ted's Apothecary Supply"
],
"current_type": null,
"current_vendor": null,
"default_sort_by": "created-ascending",
"description": "Brew your own potions at home using our fresh, ethically-sourced ingredients.",

Templates using collection
object

Was this section helpful?

All of the collections on a store.

Anchor to section titled '[object Object]'

Iterate over the collections

You can iterate over collections to build a collection list.

Anchor to section titled '[object Object]'

Access a specific collection

You can use collections to access a collection by its handle.

Directly accessible in

  • Global
collections
Was this section helpful?

A color from a color setting.


Tip

Use color filters to modify or extract properties of a color object.


Anchor to section titled '[object Object]'

Referencing color settings directly

When a color setting is referenced directly, the hexidecimal color code is returned.

{
"alpha": 1,
"blue": 180,
"green": 79,
"hue": 227,
"lightness": 45,
"red": 51,
"rgb": "51 79 180",
"rgba": "51 79 180 / 1.0",
"saturation": 56
}
Was this section helpful?

A color_scheme from a color_scheme setting.


Tip

To learn about color scheme groups in themes, refer to color_scheme_group setting.


Anchor to section titled '[object Object]'

Referencing color_scheme settings directly

When a color_scheme setting is referenced directly, the color scheme ID is returned.

{
"id": "background-2",
"settings": {}
}
Was this section helpful?

A color_scheme_group from a color_scheme_group setting.


Tip

To learn about color schemes in themes, refer to color_scheme setting.


Anchor to section titled '[object Object]'

Referencing color_scheme_group settings directly

{}
Was this section helpful?
{
"author": "Cornelius",
"content": "Wow, this is going to save me a fortune in invisibility potion!",
"created_at": "2022-06-05 19:33:57 -0400",
"email": "cornelius.potionmaker@gmail.com",
"id": 129089273921,
"status": "published",
"updated_at": "2022-06-05 19:33:57 -0400",
"url": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion#129089273921"
}
Was this section helpful?

A company that a customer is purchasing for.

To learn about B2B in themes, refer to Support B2B customers in your theme.

{
"available_locations": [],
"available_locations_count": 1,
"external_id": null,
"id": 98369,
"metafields": {},
"name": "Cornelius' Custom Concoctions"
}
Was this section helpful?
{
"address1": "99 Cauldron Lane",
"address2": "Unit 4B",
"attention": "Cornelius' Custom Concoctions",
"city": "Edinburgh",
"country": {},
"country_code": "GB",
"first_name": "Cornelius",
"id": 65,
"last_name": "Potionmaker",
"province": null,
"province_code": null,
"street": "99 Cauldron Lane, Unit 4B",
"zip": "EH95 1AF"
}
Was this section helpful?
{
"company": {},
"current?": false,
"external_id": null,
"id": 98369,
"metafields": {},
"name": "99 Cauldron Lane",
"shipping_address": {},
"tax_registration_id": null,
"url_to_set_as_current": "https://polinas-potent-potions.myshopify.com/company_location/update?location_id=98369&return_to=/resource"
}
Was this section helpful?
Anchor to section titled '[object Object]'

content_for_additional_checkout_buttons
object

Returns checkout buttons for any active payment providers with offsite checkouts.

Use additional_checkout_buttons to check whether these payment providers exist, and content_for_additional_checkout_buttons to show the associated checkout buttons. To learn more about how to use these objects, refer to Accelerated checkout.

Copy
{% if additional_checkout_buttons %}
{{ content_for_additional_checkout_buttons }}
{% endif %}

Directly accessible in

  • Global
content_for_additional_checkout_buttons
Was this section helpful?

Dynamically returns all scripts required by Shopify.

Include the content_for_header object in your layout files between the <head> and </head> HTML tags.

You shouldn't try to modify or parse the content_for_header object because the contents are subject to change, which can change the behaviour of your code.


Note

The content_for_header object is required in theme.liquid.


Directly accessible in

  • Global
content_for_header
Was this section helpful?

Dynamically returns the content of sections to be rendered on the home page.

If you use a Liquid index template (templates/index.liquid), then you must include {{ content_for_index }} in the template. This object can't be used in JSON index templates.

Directly accessible in

  • Global
content_for_index
Was this section helpful?

Dynamically returns content based on the current template.

Include the content_for_layout object in your layout files between the <body> and </body> HTML tags.


Note

The content_for_layout object is required in theme.liquid.


Directly accessible in

  • Global
content_for_layout
Was this section helpful?

A country supported by the store's localization options.

To learn how to use the country object to offer localization options in your theme, refer to Support multiple currencies and languages.

Anchor to section titled '[object Object]'

Referencing the country object directly

When the country object is referenced directly, country.name is returned.

When the country object is passed to the image_url filter, a CDN URL for that country’s flag is returned. All country’s flags are SVGs, normalized to an aspect ratio of 4:3.

{
"available_languages": [],
"continent": "North America",
"currency": {},
"iso_code": "CA",
"market": {},
"name": "Canada",
"popular?": false,
"unit_system": "metric"
}
Was this section helpful?

Creates an <option> tag for each country and region that's included in a shipping zone on the Shipping page of the Shopify admin.

An attribute called data-provinces is set for each <option>, and contains a JSON-encoded array of the country or region's subregions. If a country doesn't have any subregions, then an empty array is set for its data-provinces attribute.


Tip

To return all countries and regions included in the store's shipping zones, use all_country_option_tags.


You can wrap the country_option_tags object in <select> tags to build a country option selector.

Directly accessible in

  • Global
country_option_tags
Was this section helpful?

Information about a currency, like the ISO code and symbol.

{
"iso_code": "CAD",
"name": "Canadian Dollar",
"symbol": "$"
}
Was this section helpful?

The current page number.

The current_page object has a value of 1 for non-paginated resources.

Directly accessible in

  • Global
current_page
Was this section helpful?

The currently applied tags.

You can add tags to articles and products. Article tags can be used to filter a blog page to show only articles with specific tags. Similarly, product tags can be used to filter a collection page to show only products with specific tags.

Directly accessible in

current_tags
Was this section helpful?

A customer of the store.

The customer object is directly accessible globally when a customer is logged in to their account. It's also defined in the following contexts:

Outside of the above contexts, if the customer isn't logged into their account, the customer object returns nil.

Anchor to section titled '[object Object]'

Check whether the customer object is defined

When using the customer object outside of customer-specific templates or objects that specifically return a customer, you should check whether the customer object is defined.

{
"accepts_marketing": true,
"addresses": [],
"addresses_count": 4,
"b2b?": false,
"company_available_locations": [],
"company_available_locations_count": 1,
"current_company": {},
"current_location": null,
"default_address": {},
"email": "cornelius.potionmaker@gmail.com",
"first_name": "Cornelius",
"has_account": true,
"has_avatar?": false,
"id": 5625411010625,
"last_name": "Potionmaker",
"last_order": {},
"name": "Cornelius Potionmaker",
"orders": [],
"orders_count": 1,
"phone": "+441314960905",
"tags": [
"newsletter"
],
"tax_exempt": false,
"total_spent": "56.00"
}
Was this section helpful?

A discount applied to a cart, line item, or order.


Deprecated

Deprecated because not all discount types and details are captured.

The discount object has been replaced by the discount_allocation and discount_application objects.


{
"amount": "40.00",
"code": "DIY",
"savings": "-40.00",
"title": "DIY",
"total_amount": "40.00",
"total_savings": "-40.00",
"type": "PercentageDiscount"
}
Was this section helpful?

Information about how a discount affects an item.

To learn about how to display discounts in your theme, refer to Discounts.

{
"amount": "40.00",
"discount_application": "DiscountApplicationDrop"
}
Was this section helpful?

Information about the intent of a discount.

To learn about how to display discounts in your theme, refer to Discounts.

{
"target_selection": "explicit",
"target_type": "line_item",
"title": "Bloodroot discount!",
"total_allocated_amount": "2.50",
"type": "script",
"value": "2.5",
"value_type": "fixed_amount"
}
Was this section helpful?

Information about an external video from YouTube or Vimeo.


Tip

Use the external_video_tag filter to output the video in an HTML <iframe> tag. Use the external_video_url filter to specify parameters for the external video player.


{
"alt": "Potion beats",
"aspect_ratio": "1.77",
"external_id": "vj01PAffOac",
"host": "youtube",
"id": 22015756402753,
"media_type": "external_video",
"position": 1,
"preview_image": {}
}
Was this section helpful?

To learn about supporting filters in your theme, refer to Support storefront filtering.

{
"active_values": [],
"inactive_values": [],
"label": "Strength",
"operator": "OR",
"param_name": "filter.v.option.strength",
"presentation": "text",
"type": "list",
"url_to_remove": "/resource?q=potion",
"values": []
}
Was this section helpful?
{
"active": false,
"count": 1,
"display": null,
"image": null,
"label": "High",
"param_name": "filter.v.option.strength",
"swatch": null,
"url_to_add": "/resource?filter.v.option.strength=High&q=potion",
"url_to_remove": "/resource?q=potion",
"value": "High"
}
Was this section helpful?
Anchor to section titled '[object Object]'

filter_value_display
deprecated

The visual representation of a filter value.


Deprecated

Deprecated in favor of the swatch drop.


Properties

filter_value_display
Was this section helpful?

The focal point for an image.

The focal point will remain visible when the image is cropped by the theme. Learn more about supporting focal points in your theme.


Tip

Use the image_tag filter to automatically apply focal point settings to an image on the storefront. This applies the focal point using the object-position CSS property.


Anchor to section titled '[object Object]'

Referencing the focal_point object directly

When a focal_point object is referenced directly, the coordinates are returned as a string, in the format X% Y%.

focal_point
Was this section helpful?

A font from a font_picker setting.

You can use the font object in Liquid assets or inside a style tag to apply font setting values to theme CSS.


Tip

Use font filters to modify properties of the font object, load the font, or obtain font variants.


{
"baseline_ratio": 0.133,
"fallback_families": "sans-serif",
"family": "Assistant",
"style": "normal",
"system?": false,
"variants": {},
"weight": "400"
}
Was this section helpful?
{
"first": true,
"index": 1,
"index0": 0,
"last": false,
"length": 4,
"rindex": 3
}
Was this section helpful?
{
"address1": "12 Phoenix Feather Alley",
"address2": "1",
"author": null,
"body": null,
"city": "Calgary",
"company": null,
"country": "Canada",
"email": null,
"errors": null,
"first_name": "Cornelius",
"id": "new",
"last_name": "Potionmaker",
"password_needed?": false,
"phone": "44 131 496 0905",
"posted_successfully?": true,
"province": "Alberta",
"set_as_default_checkbox": "<input type='checkbox' id='address_default_address_new' name='address[default]' value='1'>",
"zip": "T1X 0L4"
}
Was this section helpful?

The error category strings for errors from a form created by a form tag.

The following table outlines the strings that can be returned and the reason that they would be:

Form property nameReturn reason
authorThere were issues with required name fields.
bodyThere were issues with required text content fields.
emailThere were issues with required email fields.
formThere were general issues with the form.
passwordThere were issues with required password fields.

Properties

You can output the name of the field related to the error, and the error message, by using the error as a key to access the translated_fields and messages properties.

Copy
<ul>
{% for error in form.errors %}
<li>
{% if error == 'form' %}
{{ form.errors.messages[error] }}
{% else %}
{{ form.errors.translated_fields[error] }} - {{ form.errors.messages[error] }}
{% endif %}
</li>
{% endfor %}
</ul>
{
"messages": {},
"translated_fields": {}
}
Was this section helpful?

An order fulfillment, which includes information like the line items being fulfilled and shipment tracking.

{
"created_at": "2022-06-15 17:08:30 -0400",
"fulfillment_line_items": [
{
"quantity": 2,
"line_item": "LineItemDrop"
},
{
"quantity": 1,
"line_item": "LineItemDrop"
}
],
"item_count": 3,
"tracking_company": "Canada Post",
"tracking_number": "01189998819991197253",
"tracking_numbers": [
"01189998819991197253"
],
"tracking_url": "https://www.canadapost-postescanada.ca/track-reperage/en#/search?searchFor=01189998819991197253"
}
Was this section helpful?

A file from a file_reference type metafield that is neither an image or video.


Tip

To learn about metafield types, refer to Metafield types.


{
"alt": null,
"id": 21918386454593,
"media_type": "generic_file",
"position": null,
"preview_image": {},
"url": "//polinas-potent-potions.myshopify.com/cdn/shop/files/disclaimer.pdf?v=9043651738044769859"
}
Was this section helpful?
{
"balance": 5000,
"code": "WCGX 7X97 K9HJ DFR8",
"currency": "CAD",
"customer": {},
"enabled": true,
"expired": false,
"expires_on": null,
"initial_value": 5000,
"last_four_characters": "DFR8",
"message": null,
"send_on": null,
"pass_url": "https://polinas-potent-potions.myshopify.com/v1/passes/pass.com.shopify.giftcardnext/94af7fbe55d010130df8d8bc4a338d36/",
"product": {},
"properties": {},
"qr_identifier": "shopify-giftcard-v1-3TKWJKJBM3X7PBRK",
"recipient": null,
"template_suffix": null,
"url": "https://checkout.shopify.com/gift_cards/56174706753/0011c591fc720d0a51b80cdb694f969e"
}

Templates using gift_card
object

Was this section helpful?

A group of rules for the robots.txt file.

Properties

{
"rules": [],
"sitemap": {},
"user_agent": {}
}
Was this section helpful?

The handle of the resource associated with the current template.

The handle object will return a value only when the following templates are being viewed:

If none of the above templates are being viewed, then nil is returned.

Directly accessible in

  • Global
handle
Was this section helpful?

An image, such as a product or collection image.

To learn about the image formats that Shopify supports, visit the Shopify Help Center.


Tip

Use the image_url and image_tag filters to display images on the storefront.


Anchor to section titled '[object Object]'

Referencing the image object directly

When an image object is referenced directly, the image's relative URL path is returned.

{
"alt": "Charcoal",
"aspect_ratio": 1.50016818028927,
"attached_to_variant?": false,
"height": 2973,
"id": 29355706875969,
"position": 1,
"product_id": 6790277595201,
"src": {},
"variants": [],
"width": 4460
}
Was this section helpful?

The presentation settings for an image.

image_presentation
Was this section helpful?

All of the images that have been uploaded to a store.

You can access images from the images array by their filename.

Directly accessible in

  • Global
images
Was this section helpful?

A line in a cart, checkout, or order. Each line item represents a product variant.

Properties

Deprecated Properties

{
"discount_allocations": [],
"discounts": [],
"error_message": "",
"final_line_price": "74.97",
"final_price": "24.99",
"fulfillment": {},
"fulfillment_service": "manual",
"gift_card": false,
"grams": 0,
"id": 10974183882817,
"image": {},
"item_components": null,
"key": 10974183882817,
"line_level_discount_allocations": [],
"line_level_total_discount": "0.00",
"line_price": "74.97",
"message": "",
"options_with_values": [
{
"name": "Title",
"value": "Default Title"
}
],
"original_line_price": "74.97",
"original_price": "24.99",
"price": "24.99",
"product": {},
"product_id": 6792596455489,
Was this section helpful?

A link in a menu.

To learn about how to implement navigation in a theme, refer to Add navigation to your theme.

{
"active": false,
"child_active": false,
"child_current": false,
"current": false,
"handle": {},
"levels": 0,
"links": [],
"object": {},
"title": {},
"type": "page_link",
"url": "/pages/contact"
}
Was this section helpful?

A menu in a store.

To learn about how to implement navigation in a theme, refer to Add navigation to your theme.

{
"handle": "main-menu",
"levels": 2,
"links": [],
"title": "Main menu"
}
Was this section helpful?

All of the menus in a store.

You can access a specific menu through the linklists object using the menu's handle.

Directly accessible in

  • Global
linklists
Was this section helpful?

Information about the countries and languages that are available on a store.

The localization object can be used in a localization form.

To learn about how to offer localization options in your theme, refer to Support multiple currencies and languages.

{
"available_countries": [],
"available_languages": [],
"country": {},
"language": {},
"market": {}
}
Was this section helpful?

A store location.


Tip

The location object is defined only if one or more locations has local pickup enabled.


{
"address": {},
"id": 62002462785,
"latitude": 43.6556377,
"longitude": -79.38681079999999,
"metafields": {},
"name": "123 Edward Street"
}
Was this section helpful?

A group of one or more regions of the world that a merchant is targeting for sales.

To learn more about markets, refer to Shopify Markets. To make sure that visitors interact with the optimal version of a store using Shopify Markets, refer to Detect and set a visitor's optimal localization.

{
"handle": "ca",
"id": 6157828161,
"metafields": {}
}
Was this section helpful?

A measurement from one of the following metafield types:

  • dimension
  • volume
  • weight

Tip

To learn about metafield types, refer to Metafield types.


{
"type": "volume",
"unit": "mL",
"value": "500.0"
}
Was this section helpful?

An abstract media object that can represent the following object types:

The media object can be returned by the product.media array or a file_reference metafield.

You can use media filters to generate URLs and media displays. To learn about how to use media in your theme, refer to Support product media.


Note

Each media type has unique properties in addition to the general media properties. To learn about these additional properties, refer to the reference for each type.


Properties

{
"alt": "Dandelion milk",
"id": 21772527435841,
"media_type": "image",
"position": 1,
"preview_image": {}
}
Was this section helpful?

A metafield attached to a parent object.

To learn about how to access a metafield on a specific object, refer to Access metafields.

Metafields support multiple data types, which determine the kind of information that's stored in the metafield. You can also output the metafield content in a type-specific format using metafield filters.


Note

You can't create metafields in Liquid. Metafields can be created in only the following ways:



Note

Metafields of type integer, json_string, and string are older implementations that don't have the properties noted on this page, and aren't compatible with metafield filters. To learn more, refer to Deprecated metafields.


Properties

The access path for metafields consists of two layers:

  • namespace - A grouping of metafields to prevent conflicts.
  • key - The metafield name.

Given this, you can access the metafield object with the following syntax:

Copy
{{ resource.metafields.namespace.key }}
Anchor to section titled '[object Object]'

Accessing metafields of type json

The value property of metafields of type json returns a JSON object. You can access the properties of this object directly in Liquid, either by name or 0-based index. You can also iterate through the properties.

Anchor to section titled '[object Object]'

Accessing metafields of type list

The value property of metafields of type list returns an array. You can iterate through the array to access the values.



If the list is of type single_line_text_field, then you can access the items in the array directly in Liquid using a 0-based index.

Anchor to section titled '[object Object]'

Determining the length of a list metafield

The way that you determine the length of a list metafield depends on its type:

  • Reference types: Use the count property to determine the list length.
  • Non-reference types: These lists are rendered as arrays. Use the size filter to determine the number of items in the array.

Deprecated metafields are older metafield types with limited functionality. The following metafield types are deprecated:

  • integer
  • json_string
  • string

These metafield types don't have the same metafield object properties mentioned in the previous sections. Instead, they return the metafield value directly.

The following table outlines the value type for each deprecated metafield type:

Metafield typeValue type
integerAn integer
json_stringA JSON object
stringA string
{
"list?": false,
"type": "single_line_text_field",
"value": "Take with a meal."
}
Was this section helpful?

A metaobject entry, which includes the values for a set of fields. The set is defined by the parent metaobject_definition.

Anchor to section titled '[object Object]'

Access metaobjects individually

The access path for a metaobject consists of two layers:

  • type - The type of the parent metaobject definition.
  • handle - The unique handle of the metaobject.

Given this, you can access a metaobject with the following syntax:

Copy
{{ shop.metaobjects.type.handle }}

You can also use square bracket notation:

Copy
{{ shop.metaobjects['type']['handle'] }}

A metaobjects's field values can be accessed using the key of the desired field:

Copy
{{ shop.metaobjects.testimonials.homepage.title }}
{{ shop.metaobjects['highlights']['washable'].image.value }}

Note

When the publishable capability is enabled, a metaobject can only be accessed if its status is active. If its status is draft, then the return value is nil.


Anchor to section titled '[object Object]'

Usage in metaobject templates

Within a metaobject template, the metaobject Liquid object represents the metaobject drop being rendered by the template. You can access it directly as {{ metaobject }}.

Here's a basic example of accessing a field within the associated metaobject template:

Copy
{{ metaobject.title.value }}

In this example, replace title with the key of the field you want to access. This will output the value of that field for the current metaobject.

Directly accessible in

metaobject

Returned by

Templates using metaobject
object

Was this section helpful?

A metaobject_definition defines the structure of a metaobject type for the store, which consists of a merchant-defined set of field definitions.

One or more corresponding metaobject objects contain values for the fields specified in the metaobject definition.

Anchor to section titled '[object Object]'

Loop over entries of a metaobject definition

If a metaobject definition has multiple metaobject entries, then you can loop over them using the values property. You can loop over a maximum of 50 entries in a metaobject definition. For example, you can display the field author for each metaobject using the following forloop:

Copy
{% for testimonial in shop.metaobjects.testimonials.values %}
{{ testimonial.author.value }}
{% endfor %}

Note

When the publishable capability is enabled, loops return only metaobjects with a status of active. Metaobjects with a status of draft are skipped.


Was this section helpful?

Basic information about a metaobject. These properties are grouped under the system object to avoid collisions between system property names and user-defined metaobject fields.

Anchor to section titled '[object Object]'

Using the metaobject_system object

You can access the metaobject_system object and its properties through the metaobject's system property. You can use the following syntax:

Copy
{{ shop.metaobjects.testimonials["home_page"].system.id }}

You can also access metaobject_system properties when iterating over a list of metaobjects:

Copy
{% for metaobject in product.metafields.custom.mixed_metaobject_list.value %}
{% if metaobject.system.type == "testimonial" %}
{% render 'testimonial' with metaobject as testimonial %}
{% else %}
{{ metaobject.system.handle }}
{% endif %}
{% endfor %}
metaobject_system
Was this section helpful?

A 3D model uploaded as product media.


Tip

Use the model_viewer_tag filter to output a Google model viewer component for the model.


{
"alt": "Potion bottle",
"id": 22064203137089,
"media_type": "model",
"position": 1,
"preview_image": {},
"sources": []
}
Was this section helpful?
{
"format": "glb",
"mime_type": "model/gltf-binary",
"url": "//polinas-potent-potions.myshopify.com/cdn/shop/3d/models/o/eb9388299ce0557c/WaterBottle.glb?v=0"
}
Was this section helpful?

A money value, in the the customer's local (presentment) currency.


Tip

Use money filters to output a formatted price.


Properties

Anchor to section titled '[object Object]'

Referencing money objects directly

When a money object is referenced directly, the money value in cents is returned.

{
"currency": {}
}
Was this section helpful?

An order.

Properties

Deprecated Properties

{
"attributes": {},
"billing_address": {},
"cancel_reason": null,
"cancel_reason_label": null,
"cancelled": false,
"cancelled_at": null,
"cart_level_discount_applications": [],
"confirmation_number": "0YMJHPM8U",
"created_at": "2022-04-29 11:15:46 -0400",
"customer": {},
"customer_order_url": "https://shopify.com/56174706753/account/orders/4295688749121?locale=en&region_country=CA",
"customer_url": "https://polinas-potent-potions.myshopify.com/account/orders/8be02e56c658bcd1f034d28c496fddd9",
"discount_applications": [],
"discounts": null,
"email": "cornelius.potionmaker@gmail.com",
"financial_status": "paid",
"financial_status_label": "Paid",
"fulfillment_status": "partial",
"fulfillment_status_label": "Partial",
Was this section helpful?
{
"author": null,
"content": "<p>Polina's Potent Potions was started by Polina in 1654.</p>\n<p>We use all-natural locally sourced ingredients for our potions.</p>",
"handle": "about-us",
"id": 83536642113,
"metafields": {},
"published_at": "2022-05-04 17:47:03 -0400",
"template_suffix": "",
"title": "About us",
"url": {}
}

Templates using page
object

Was this section helpful?

The meta description of the current page.

The page_description object can be used to provide a brief description of a page for search engine listings and social media previews.

To learn about where to edit the meta description for a page, visit the Shopify Help Center.

Directly accessible in

  • Global
page_description
Was this section helpful?

An image to be shown in search engine listings and social media previews for the current page.

The resource's featured image for product and collection pages, and blog posts, is used. For all other pages, or pages where there's no featured image, the social sharing image is used.

Open Graph fallback tags

The page_image object can be used for creating Open Graph og:image meta tags.

If a theme doesn't include og:image tags for a page, then Shopify automatically generates the following tags using the page_image object:

  • og:image
  • og:image:secure_url
  • og:image:width
  • og:image:height

Directly accessible in

  • Global
page_image
Was this section helpful?

The page title of the current page.

The page_title object can be used to specify the title of page for search engine listings and social media previews.

To learn about where to edit the title for a page, visit the Shopify Help Center.

Directly accessible in

  • Global
page_title
Was this section helpful?

All of the pages on a store.

You can access a specific page through the pages object using the page's handle.

You can paginate the pages object, allowing you to iterate over up to 50 pages at a time.

Directly accessible in

  • Global
pages
Was this section helpful?

Information about the pagination inside a set of paginate tags.


Tip

Use the default_pagination filter to output pagination links.


{
"current_offset": 10,
"current_page": 3,
"items": 17,
"next": {},
"page_param": "page",
"page_size": 5,
"pages": 4,
"parts": [],
"previous": {}
}
Was this section helpful?

A part in the navigation for pagination.

Anchor to section titled '[object Object]'

Create pagination navigation with part

You can create a pagination navigation by iterating over each part of a paginate object.

{
"is_link": true,
"title": "2",
"url": "/collections/all?page=2"
}
Was this section helpful?
Anchor to section titled '[object Object]'

pending_payment_instruction_input
object

Header-value pairs that make up the list of payment information specific to the payment method. This information can be be used by the customer to complete the transaction offline.

pending_payment_instruction_input
Was this section helpful?
{
"body": "<p>We have a 30-day return policy, which means you have 30 days after receiving your item to request a return. ...</p>",
"id": 23805034561,
"title": "Refund policy",
"url": "/policies/refund-policy"
}
Was this section helpful?

Creates an HTML link element that links to a localized version of shopify.com, based on the locale of the store.

Directly accessible in

  • Global
powered_by_link
Was this section helpful?

Information about the results from a predictive search query through the Predictive Search API.


Note

The predictive_search object returns results only when rendered in a section using the Predictive Search API and the Section Rendering API. To learn about how to include predictive search in your theme, refer to Add predictive search to your theme.


{
"performed": true,
"resources": {},
"terms": "potion",
"types": []
}
Was this section helpful?
Anchor to section titled '[object Object]'

predictive_search_resources
object

Contains arrays of objects for each resource type that can be returned by a predictive search query.

You can check whether any resources of a specific type were returned using the size filter.

Copy
{% if predictive_search.resources.articles.size > 0 %}
{% for article in predictive_search.resources.articles %}
{{ article.title }}
{% endfor %}
{% endif %}
{
"articles": [],
"collections": [],
"pages": [],
"products": []
}
Was this section helpful?

A product in the store.

Properties

{
"available": true,
"category": {},
"collections": [],
"compare_at_price": "25.00",
"compare_at_price_max": "25.00",
"compare_at_price_min": "25.00",
"compare_at_price_varies": false,
"content": "<h3>Are you low on health? Well we've got the potion just for you!</h3>\n<p>Just need a top up? Almost dead? In between? No need to worry because we have a range of sizes and strengths!</p>",
"created_at": "2022-04-13 14:46:16 -0400",
"description": "<h3>Are you low on health? Well we've got the potion just for you!</h3>\n<p>Just need a top up? Almost dead? In between? No need to worry because we have a range of sizes and strengths!</p>",
"featured_image": {},
"featured_media": {},
"first_available_variant": {},

Templates using product
object

Was this section helpful?
{
"name": "Size",
"position": 1,
"selected_value": {},
"values": []
}
Was this section helpful?
{
"available": true,
"id": 2070385033281,
"name": "Bronze",
"product_url": null,
"selected": true,
"swatch": {},
"variant": {}
}
Was this section helpful?

The per-unit price of a variant when purchasing the minimum quantity or more.

{
"minimum_quantity": "10",
"price": "20.00"
}
Was this section helpful?

A variant order quantity rule.

If no rule exists, then a default value is returned.

This rule can be set as part of a B2B catalog.


Note

The default quantity rule is min=1,max=null,increment=1.


Anchor to section titled '[object Object]'

The variant order quantity rule

{
"min": 5,
"max": 100,
"increment": 5
}
Was this section helpful?

Information for a rating type metafield.


Tip

To learn about metafield types, refer to Metafield types.


{
"rating": "4.5",
"scale_max": "5.0",
"scale_min": "0.0"
}
Was this section helpful?

A recipient that is associated with a gift card.

{
"email": "cornelius.potionmaker@gmail.com",
"name": "Cornelius Potionmaker",
"nickname": "Cornelius"
}

Templates using recipient
object

Was this section helpful?

Product recommendations for a specific product based on sales data, product descriptions, and collection relationships.

Product recommendations become more accurate over time as new orders and product data become available. To learn more about how product recommendations are generated, refer to Product recommendations.


Note

The recommendations object returns products only when rendered in a section using the Product Recommendations API and the Section Rendering API. To learn about how to include product recommendations in your theme, refer to Show product recommendations.


{
"products": [],
"products_count": 4,
"performed?": true
}
Was this section helpful?

Information about the current URL and the associated page.

{
"design_mode": false,
"host": "polinas-potent-potions.myshopify.com",
"locale": {},
"origin": "https://polinas-potent-potions.myshopify.com",
"page_type": "index",
"path": "/",
"visual_preview_mode": false
}
Was this section helpful?

The default rule groups for the robots.txt file.

Properties

{
"default_groups": []
}
Was this section helpful?

Allows you to generate standard URLs for the storefront.

Using the routes object instead of hardcoding URLs helps ensure that your theme supports multiple languages, as well as any possible changes in URL format.

{
"account_addresses_url": "/account/addresses",
"account_login_url": "/account/login",
"account_logout_url": "/account/logout",
"account_recover_url": "/account/recover",
"account_register_url": "/account/register",
"account_url": "/account",
"all_products_collection_url": "/collections/all",
"cart_add_url": "/cart/add",
"cart_change_url": "/cart/change",
"cart_clear_url": "/cart/clear",
"cart_update_url": "/cart/update",
"cart_url": "/cart",
"collections_url": "/collections",
"predictive_search_url": "/search/suggest",
"product_recommendations_url": "/recommendations/products",
"root_url": "/",
"search_url": "/search",
"storefront_login_url": null
}
Was this section helpful?

A rule for the robots.txt file, which tells crawlers which pages can, or can't, be accessed.

A rule consists of a directive, which can be either Allow or Disallow, and a value of the associated URL path.

For example:

Disallow: /policies/

You can output a rule directly, instead of referencing each of its properties.



Properties

{
"directive": "Disallow",
"value": "/*preview_script_id*"
}
Was this section helpful?

Information about a Shopify Script.


Caution

Shopify Scripts will be sunset on August 28, 2025. Migrate your existing scripts to Shopify Functions before this date.



Tip

To learn more about Shopify Scripts and the Script Editor, visit the Shopify Help Center.


{
"id": 209584193,
"name": "10% off Whole bloodroot"
}
Was this section helpful?

The active scripts, of each script type, on the store.


Caution

Shopify Scripts will be sunset on August 28, 2025. Migrate your existing scripts to Shopify Functions before this date.


There can be only one active script of each type. Currently, the only type accessible in Liquid is cart_calculate_line_items.


Tip

To learn more about Shopify Scripts and the Script Editor, visit the Shopify Help Center.


Properties

{
"cart_calculate_line_items": {}
}
Was this section helpful?

Information about a storefront search query.

To learn about storefront search and how to include it in your theme, refer to Storefront search.

{
"default_sort_by": "relevance",
"filters": {},
"performed": true,
"results": [],
"results_count": 15,
"sort_by": "relevance",
"sort_options": [],
"terms": "potion",
"types": [
"article",
"page",
"product"
]
}

Templates using search
object

Was this section helpful?

The properties and settings of a section.


Tip

To learn about sections and using them in a theme, refer to Sections.


{
"blocks": [],
"id": "template--14453298921537__cart-items",
"settings": {}
}
Was this section helpful?

Information about the intent of how a specific selling plan affects a line item.

To learn about how to support selling plans in your theme, refer to Purchase options.

{
"checkout_charge": {},
"description": null,
"group_id": "f6f782040b07aa2353008932051a8d9bef0536d0",
"id": 610435137,
"name": "Delivery every 1 Week",
"options": [],
"price_adjustments": [],
"recurring_deliveries": true,
"selected": true
}
Was this section helpful?
{
"checkout_charge_amount": "13.50",
"compare_at_price": "15.00",
"per_delivery_price": "13.50",
"price": "13.50",
"price_adjustments": [],
"remaining_balance_charge_amount": "0.00",
"selling_plan": {},
"selling_plan_group_id": "f6f782040b07aa2353008932051a8d9bef0536d0",
"unit_price": null
}
Was this section helpful?
Anchor to section titled '[object Object]'

selling_plan_allocation_price_adjustment
object

The resulting price from the intent of the associated selling_plan_price_adjustment.

To learn about how to support selling plans in your theme, refer to Purchase options.

{
"position": 1,
"price": "13.50"
}
Was this section helpful?
Anchor to section titled '[object Object]'

selling_plan_checkout_charge
object

Information about how a specific selling plan affects the amount that a customer needs to pay for a line item at checkout.

To learn about how to support selling plans in your theme, refer to Purchase options.

{
"value": 100,
"value_type": "percentage"
}
Was this section helpful?

Information about a specific group of selling plans that include any of a product's variants.

Selling plans are grouped based on shared selling plan option names.

To learn about how to support selling plans in your theme, refer to Purchase options.

{
"app_id": "294517",
"id": "f6f782040b07aa2353008932051a8d9bef0536d0",
"name": "Health potion",
"options": [],
"selling_plan_selected": false,
"selling_plans": []
}
Was this section helpful?
{
"name": "1 Week(s), 4 Week(s)",
"position": 1,
"selected_value": null,
"values": [
"1 Week(s)",
"4 Week(s)"
]
}
Was this section helpful?

Information about a selling plan's value for a specific selling_plan_group_option.

To learn about how to support selling plans in your theme, refer to Purchase options.

{
"name": "1 Week(s), 4 Week(s)",
"position": 1,
"value": "1 Week(s)"
}
Was this section helpful?
Anchor to section titled '[object Object]'

selling_plan_price_adjustment
object

Information about how a selling plan changes the price of a variant for a given period of time.

To learn about how to support selling plans in your theme, refer to Purchase options.

{
"order_count": null,
"position": 1,
"value": 10,
"value_type": "percentage"
}
Was this section helpful?

Allows you to access all of the theme's settings from the settings_schema.json file.


Tip

To learn about the available setting types, refer to Input settings.


Directly accessible in

  • Global
settings
Was this section helpful?

Information about the shipping method for an order.

{
"handle": "shopify-Standard-0.00",
"id": "shopify-Standard-0.00",
"original_price": "0.00",
"price": "0.00",
"price_with_discounts": "0.00",
"tax_lines": [],
"title": "Standard"
}
Was this section helpful?

Information about the store, such as the store address, the total number of products, and various settings.

{
"accepts_gift_cards": true,
"address": {},
"brand": {},
"collections_count": 7,
"currency": "CAD",
"customer_accounts_enabled": true,
"customer_accounts_optional": true,
"description": "Canada's foremost retailer for potions and potion accessories. Try one of our award-winning artisanal potions, or find the supplies to make your own!",
"domain": "polinas-potent-potions.myshopify.com",
"email": "polinas.potent.potions@gmail.com",
"enabled_currencies": [],
"enabled_locales": [],
"enabled_payment_types": [
"american_express",
"apple_pay",
"diners_club",
"discover",
"google_pay",
"master",
"paypal",
"shopify_pay",
"visa"
],
Was this section helpful?

A language in a store.

To learn how to offer localization options in your theme, refer to Support multiple currencies and languages.

{
"endonym_name": "English",
"iso_code": "en",
"name": "English",
"primary": true,
"root_url": "/"
}
Was this section helpful?

The sitemap for a specific group in the robots.txt file.

The sitemap provides information about the pages and content on a site, and the relationships between them, which helps crawlers crawl a site more efficiently.


Tip

To learn more about sitemaps, refer to Google's documentation.


The sitemap object consists of a Sitemap directive, and a value of the URL that the sitemap is hosted at. For example:

Sitemap: https://your-store.myshopify.com/sitemap.xml


{
"directive": "Sitemap",
"value": "https://polinas-potent-potions.myshopify.com/sitemap.xml"
}
Was this section helpful?

A sort option for a collection or search results page.

{
"name": "Alphabetically, A-Z",
"value": "title-ascending"
}
Was this section helpful?

A variant's inventory information for a physical store location.

If a location doesn't stock a variant, then there won't be a store_availability for that variant and location.


Note

The store_availability object is defined only if one or more locations has local pickup enabled.


{
"available": true,
"location": {},
"pick_up_enabled": true,
"pick_up_time": "Usually ready in 24 hours"
}
Was this section helpful?

Color and image for visual representation. Available for product option values and filter values.

{
"color": {},
"image": {}
}
Was this section helpful?
{
"col": 1,
"col0": 0,
"col_first": true,
"col_last": false,
"first": true,
"index": 1,
"index0": 0,
"last": false,
"length": 5,
"rindex": 5,
"rindex0": 4,
"row": 1
}
Was this section helpful?

Information about a tax line of a checkout or order.

{
"price": 1901,
"rate": 0.05,
"rate_percentage": 5,
"title": "GST"
}
Was this section helpful?
{
"ancestors": [],
"gid": "gid://shopify/TaxonomyCategory/hb-1-9-6",
"id": "hb-1-9-6",
"name": "Vitamins & Supplements"
}
Was this section helpful?

Information about the current template.

Properties

{
"directory": null,
"name": "product",
"suffix": null
}
Was this section helpful?

Information about the current theme.


Deprecated

Deprecated because the values of this object's properties are subject to change, so can't be relied on within the theme.

If you want to link to the theme editor for the published theme, then you can use the URL path /admin/themes/current/editor.

While this object is deprecated in Liquid and shouldn't be used, you can still access it through the REST Admin API.


Properties

{
"id": 124051750977,
"name": "Dawn",
"role": "main"
}
Was this section helpful?
{
"amount": "380.25",
"created_at": "2022-06-15 19:13:14 -0400",
"gateway": "shopify_payments",
"gateway_display_name": "Shopify payments",
"id": 5432242176065,
"kind": "sale",
"name": "c29944051400769.",
"payment_details": {
"credit_card_number": "•••• •••• •••• 4242",
"credit_card_company": "Visa",
"credit_card_last_four_digits": "4242",
"receiver_info": null
},
"receipt": "#☠1☢\n---\nid: pi_3LB5Oh2m9fH5ulsO18aKrXyL\nobject: payment_intent\namount: 38025\namount_capturable: 0\namount_received: 38025\ncanceled_at: \ncancellation_reason: \ncapture_method: automatic\ncharges:\n object: list\n data:\n - id: ch_3LB5Oh2m9fH5ulsO1KncBePo\n object: charge\n amount: 38025\n application_fee: fee_1LB5Oi2m9fH5ulsOrVcBjr4k\n balance_transaction:\n id: txn_3LB5Oh2m9fH5ulsO1JtjGSxy\n object: balance_transaction\n exchange_rate: \n captured: true\n created: 1655334796\n currency: cad\n failure_code: \n failure_message: \n fraud_details: {}\n livemode: false\n metadata:\n shop_id: '56174706753'\n shop_name: Polina's Potent Potions\n transaction_fee_total_amount: '791'\n transaction_fee_tax_amount: '0'\n payments_charge_id: '2076986474561'\n order_transaction_id: '5432242176065'\n manual_entry: 'false'\n order_id: c29944051400769.1\n email: cornelius.potionmaker@gmail.com\n outcome:\n network_status: approved_by_network\n reason: \n risk_level: normal\n risk_score: 15\n seller_message: Payment complete.\n type: authorized\n paid: true\n payment_intent: pi_3LB5Oh2m9fH5ulsO18aKrXyL\n payment_method: pm_1LB5Oh2m9fH5ulsOk67EqrsK\n payment_method_details:\n card:\n brand: visa\n checks:\n address_line1_check: pass\n address_postal_code_check: pass\n cvc_check: pass\n country: US\n description: Visa Classic\n ds_transaction_id: \n exp_month: 1\n exp_year: 2029\n fingerprint: KE6OIQsc8EspGDeW\n funding: credit\n iin: '424242'\n installments: \n issuer: Stripe Payments UK Limited\n last4: '4242'\n mandate: \n moto: \n network: visa\n network_token: \n network_transaction_id: '541168454791087'\n three_d_secure: \n wallet: \n type: card\n refunded: false\n source: \n status: succeeded\n mit_params:\n network_transaction_id: '541168454791087'\n has_more: false\n total_count: 1\n url: \"/v1/charges?payment_intent=pi_3LB5Oh2m9fH5ulsO18aKrXyL\"\nconfirmation_method: manual\ncreated: 1655334795\ncurrency: cad\nlast_payment_error: \nlivemode: false\nmetadata:\n shop_id: '56174706753'\n shop_name: Polina's Potent Potions\n transaction_fee_total_amount: '791'\n transaction_fee_tax_amount: '0'\n payments_charge_id: '2076986474561'\n order_transaction_id: '5432242176065'\n manual_entry: 'false'\n order_id: c29944051400769.1\n email: cornelius.potionmaker@gmail.com\nnext_action: \npayment_method: pm_1LB5Oh2m9fH5ulsOk67EqrsK\npayment_method_types:\n- card\nsource: \nstatus: succeeded\n",
Was this section helpful?
Anchor to section titled '[object Object]'

transaction_payment_details
object

Information about the payment methods used for a transaction.

{
"credit_card_number": "•••• •••• •••• 4242",
"credit_card_company": "Visa",
"credit_card_last_four_digits": "4242"
}
Was this section helpful?
Anchor to section titled '[object Object]'

unit_price_measurement
object

Information about how units of a product variant are measured. It's used to calculate unit prices.


Note

Unit prices are available only to stores located in Germany and France.


{
"measured_type": "weight",
"quantity_value": "500.0",
"quantity_unit": "g",
"reference_value": 1,
"reference_unit": "kg"
}
Was this section helpful?

The author of a blog article.


Tip

The information returned by the user object can be edited on the Account page of the Shopify admin.


{
"account_owner": false,
"bio": "Polina got her first cauldron at the tender age of six, and she has been passionate about potions ever since!!",
"email": "polinas.potent.potions@gmail.com",
"first_name": "Polina",
"homepage": null,
"image": {},
"last_name": "Waters",
"name": "Polina Waters"
}
Was this section helpful?

The user-agent, which is the name of the crawler, for a specific group in the robots.txt file.

The user_agent object consists of a User-agent directive, and a value of the name of the user-agent. For example:

User-agent: *


{
"directive": "User-agent",
"value": "*"
}
Was this section helpful?

Properties

Deprecated Properties

{
"available": true,
"barcode": "",
"compare_at_price": null,
"featured_image": null,
"featured_media": null,
"id": 39897499729985,
"image": null,
"incoming": false,
"inventory_management": "shopify",
"inventory_policy": "deny",
"inventory_quantity": 5,
"matched": true,
"metafields": {},
"next_incoming_date": null,
"option1": "S",
"option2": "Low",
"option3": null,
"options": [],
"price": "10.00",
"product": {},
"quantity_price_breaks": [],
"quantity_rule": {},
"requires_selling_plan": false,
"requires_shipping": true,
"selected": false,
"selected_selling_plan_allocation": null,
Was this section helpful?

Information about a video uploaded as product media or a file_reference metafield.


Tip

Use the video_tag filter to output the video in an HTML <video> tag.


{
"alt": "Potion beats",
"aspect_ratio": 1.779,
"duration": 34801,
"id": 22070396551233,
"media_type": "video",
"position": 2,
"preview_image": {},
"sources": []
}
Was this section helpful?

Information about the source files for a video.

{
"format": "mp4",
"height": 1080,
"mime_type": "video/mp4",
"url": "//polinas-potent-potions.myshopify.com/cdn/shop/videos/c/vp/4edc28a708b7405093a927cebe794f1a/4edc28a708b7405093a927cebe794f1a.HD-1080p-7.2Mbps.mp4?v=0",
"width": 1920
}
Was this section helpful?