News
The Ultimate Shopify Liquid Coding Cheat Sheet, Guide & Reference Library
Handles
The handle is used to access the attributes of a Liquid object. By default, it is the object’s title in lowercase with any spaces and special characters replaced by hyphens (-). Every object in Liquid (product, collection, blog, menu) has a handle.
The handle is used to access the attributes of a Liquid object. By default, it is the object's title in lowercase with any spaces and special characters replaced by hyphens (-). Every object in Liquid (product, collection, blog, menu) has a handle.
A product with the title ‘shirt’ will automatically be given the handle shirt. If there is already a product with the handle ‘shirt’, the handle will auto-increment. In other words, all ‘shirt’ products created after the first one will receive the handle shirt-1, shirt-2, and so on.
Operators
Liquid has access to all of the logical and comparison operators. These can be used in tags such as if and unless.
equals
Learn more
These shoes are awesome!
does not equal
Learn more
greater than
Learn more
less than
Learn more
greater than or equal to
Learn more
less than or equal to
Learn more
condition A or condition B
Learn more
condition A and condition B
Learn more
checks for the presence of a substring inside a string or array
Learn more
This product's title contains the word Pack.
Types
Liquid objects can return one of six types: String, Number, Boolean, Nil, Array, or EmptyDrop. Liquid variables can be initialized by using the assign or capture tags.
Strings are declared by wrapping the variable's value in single or double quotes.
Learn more
Numbers include floats and integers.
Learn more
Booleans are either true or false. No quotations are necessary when declaring a boolean.
Learn more
Nil is an empty value that is returned when Liquid code has no results. It is not a string with the characters 'nil'. Nil is treated as false in the conditions of blocks and other Liquid tags that check for the truthfulness of a statement.
Arrays hold a list of variables of all types. To access items in an array, you can loop through each item in the array using a for tag or a tablerow tag.
An EmptyDrop object is returned whenever you try to access a non-existent object (for example, a collection, page or blog that was deleted or hidden) by a handle.
Truthy and Falsy
In programming, we describe “truthy” and “falsy” as anything that returns true or false, respectively, when used inside an if statement.
All values in Liquid are truthy, with the exception of nil and false. In this example, the variable is a string type but it evaluates as true.
This will always be true.
The only values that are falsy in Liquid are nil and false. nil is returned when a Liquid object doesn't have anything to return. For example, if a collection doesn't have a collection image, collection.image will be set to nil.
Whitespace Control
In Liquid, you can include a hyphen in your tag syntax , to strip whitespace from the left or right side of a rendered tag.
Normally, even if it doesn't output text, any line of Liquid in your template will still output an empty line in your rendered HTML.
Conditional Tags
Conditional tags define conditions that determine whether blocks of Liquid code get executed.
Learn more
Executes a block of code only if a certain condition is met.
Learn more
These shoes are awesome!
These shoes are awesome!
Adds more conditions within an if or unless block.
Hey Kevin!
Hey Anonymous!
Hi Stranger!
Hey Anonymous!
Creates a switch statement to compare a variable with different values. case initializes the switch statement and when compares its values.
This is a cake
This is a cookie
This is not a cake nor a cookie
This is a cake
Similar to if, but executes a block of code only if a certain condition is not met.
These shoes are not awesome.
These shoes are not awesome.
HTML Tags
HTML tags render HTML elements using Shopify-specific attributes.
Learn more
Generates an HTML form tag, including any required input tags to submit the form to a specific endpoint.
Learn more
content
Iteration Tags
Iteration Tags are used to run a block of code repeatedly.
Learn more
Specifies a fallback case for a for loop which will run if the loop has zero length (for example, you loop over a collection that has no products).
This collection is empty.
This collection is empty.
Causes the loop to skip the current iteration when it encounters the continue tag.
1 2 3 5
Loops through a group of strings and outputs them in the order that they were passed as parameters. Each time cycle is called, the next string that was passed as a parameter is output.
one
two
three
one
Splits an array's items across multiple pages.
Learn more
forloop_content
Generates an HTML
. Must be wrapped in an opening and closing
HTML tags.
| Cool Shirt | Alien Poster | Batman Poster | Bullseye Shirt | Another Classic Vinyl | Awesome Jeans |
Syntax Tags
Syntax tags control how Liquid code is processed and rendered.
Learn more
Prevents an expression from being rendered or output. Any text inside comment tags won't be output, and any Liquid code will be parsed, but not executed.
Learn more
content
Allows you to have a block of Liquid without delimeters on each tag.
Learn more
This is a health potion!
Theme Tags
Theme Tags have various functions including: outputting template-specific HTML markup, telling the theme which layout and snippets to use, and splitting a returned array into multiple pages.
Inserts a snippet from the snippets folder of a theme.
Learn more
JavaScript code included in a section file.
Learn more
javascript_code
Loads an alternate template file from the layout folder of a theme. If no alternate layout is defined, the theme.liquid template is loaded by default.
Renders a snippet from the snippets folder of a theme.
When a snippet is rendered, the code inside it does not have access to the variables assigned within its parent template. Similarly, variables assigned within the snippet can’t be accessed by the code outside of the snippet. This encapsulation increases performance and helps make theme code easier to understand and maintain.
Renders a section group. Use this tag to render section groups as part of the theme's layout content. Place the sections tag where you want to render it in the layout.
Learn more
CSS styles included in a section file.
Learn more
css_styles
Variable Tags
Variable Tags are used to create new Liquid variables.
Learn more
Captures the string inside of the opening and closing tags and assigns it to a variable. Variables created through are strings.
I am being captured.
I am being captured.
Creates a new number variable, and increases its value by one every time it is called. The initial value is 0.
0
1
2
Creates a new number variable and decreases its value by one every time it is called. The initial value is -1.
-1
-2
-3
Array Filters
Array filters are used to modify the output of arrays.
Learn more
Concatenates (combines) an array with another array. The resulting array contains all the elements of the original arrays.
apples, oranges, brocolli, carrots
Joins the elements of an array with the character passed as the parameter. The result is a single string.
tag1, tag2, tag3
Returns the item at the specified index in an array. Note that array numbering starts from zero, so the first item in an array is referenced with [0].
womens
Accepts an array element's attribute as a parameter and creates a string out of each array element's value.
SpringSummer
Creates an array including only the objects with a given property value, or any truthy value by default.
All products:
-
Kitchen products:
-
All products:
- Vacuum
- Spatula
- Television
- Garlic press
Kitchen products:
- Spatula
- Garlic press
Cart Filters
Cart filters output or modify content specific to the cart object and its properties.
Learn more
Collection Filters
Collection filters output or modify content specific to the collection object and its properties.
Learn more
Wraps a given tag in an HTML span tag, with a class attribute of active, if the tag is currently active. Only applies to collection tags.
extra-potent
fresh
healing
Generates an HTML a tag with an href attribute linking to a collection page that lists all products of the given product type.
Health
Generates an HTML a tag with an href attribute linking to a collection page that lists all products of the given product vendor.
Polina's Potent Potions
Generates a collection URL with the provided sort_by parameter appended. This filter must be applied to a collection URL.
/collections/sale-potions?sort_by=best-selling
Generates a URL for a collection page that lists all products of the given product type.
/collections/types?q=health
Generates a URL for a collection page that lists all products from the given product vendor.
/collections/vendors?q=Polina%27s%20Potent%20Potions
Generates a product URL within the context of the provided collection.
/collections/sale-potions/products/draught-of-immortality
Color Filters
Color filters change or extract properties from CSS color strings. These filters are commonly used with color theme settings.
Learn more
Calculates the perceived brightness difference between two colors. With regards to accessibility, the W3C suggests that the brightness difference should be greater than 125.
129
Calculates the contrast ratio between two colors. Returns the numerator part of the ratio, which has a denominator of 1. For example, for a contrast ratio of 3.5:1, the filter returns 3.5.
7.4
Calculates the color difference or distance between two colors. With regards to accessibility, the W3C suggests that the color difference should be greater than 500.
528
Extracts a component from the color. Valid components are alpha, red, green, blue, hue, saturation and lightness.
122
Blends together two colors. Blend factor should be a value between 0 and 100 percent.
Learn more
#bdbb94
Modifies the given component of a color (rgb, alpha, hue and saturation). The filter will return a color type that includes the modified format — for example, if you modify the alpha channel, the filter will return the color in rgba() format, even if your input color was in hex format.
#ffb55c
rgba(122, 181, 92, 0.85)
Converts a CSS color string to CSS rgb() format. If the input color has an alpha component, then the output will be in CSS rgba() format.
rgb(122, 181, 92)
rgba(122, 181, 92, 0.5)
Converts a CSS color string to CSS hsl() format. If the input color has an alpha component, then the output will be in CSS hsla() format.
hsl(100, 38%, 54%)
hsla(100, 38%, 54%, 0.5)
Converts a CSS color string to hex6 format. Hex output is always in hex6 format. If there is an alpha channel in the input color, it will not appear in the output.
#7ab55c
#7ab55c
Customer Filters
Customer filters output URLs that enable customers to interact with their account in the store.
Learn more
Generates an HTML link to log the customer out of their account and redirect to the homepage.
Log out
Default Filters
Default filters enable you to use or set default values for certain contexts.
Learn more
Sets a default value for any variable whose value is either empty, false or nil.
/products/health-potion
Generates default error messages for each possible value of form.errors.
Font Filters
Font filters are called on font objects. You can use font filters to load fonts or to obtain font variants.
Learn more
font_modify takes two arguments. The first indicates which property should be modified and the second is the modification to be made.
While you can access every variant of the chosen font's family by using font.variants, you can more easily access specific styles and weights by using the font_modify filter.
h2
h2
Returns a CDN URL for the chosen font. By default, font_url returns the woff2 version, but it can also be called with an additional parameter to specify the format. Both woff and woff2 are supported.
https://fonts.shopifycdn.com/neue_haas_unica/neuehaasunica_n4.8a2375506d3dfc7b1867f78ca489e62638136be6.woff2?...9waWZ5Lmlv
https://fonts.shopifycdn.com/work_sans/worksans_n6.399ae4c4dd52d38e3f3214ec0cc9c61a0a67ea08.woff?...b63d5ca77de58c7a23ece904
Format Filters
Format filters apply formats to specific data types.
Learn more
Generates a formatted weight for a variant object. The weight unit is set in the general settings in the Shopify admin.
0.2 kg
HTML Filters
HTML filters wrap assets in HTML tags.
Learn more
Wraps all instances of a specific string, within a given string, with an HTML strong tag with a class attribute of highlight.
This is a love potion.
Generates an HTML tag for a given placeholder name. Learn more
Generates an HTML link tag with a rel attribute of preload to prioritize loading a given Shopify-hosted asset.
Learn more
The time_tag filter converts a timestamp into an HTML tag. The output format can be customized by passing date parameters to the time_tag filter.
Hosted file Filters
Hosted file filters return URLs for assets hosted on the Shopify CDN, including files uploaded in the Shopify admin.
Learn more
Returns the CDN URL for an image in the assets directory of a theme.
//polinas-potent-potions.myshopify.com/cdn/shop/t/4/assets/red-and-black-bramble-berries_small.jpg?315
Returns the CDN URL for a file in the assets directory of a theme.
//polinas-potent-potions.myshopify.com/cdn/shop/t/4/assets/cart.js?v=83971781268232213281663872410
Returns the CDN URL for an image in the Files page of the Shopify admin.
//polinas-potent-potions.myshopify.com/cdn/shop/files/potions-header_small.png?v=4246568442683817558
Returns the CDN URL for a file from the Files page of the Shopify admin.
//polinas-potent-potions.myshopify.com/cdn/shop/files/disclaimer.pdf?v=9043651738044769859
Returns the CDN URL for a globally accessible Shopify asset.
//polinas-potent-potions.myshopify.com/cdn/shopifycloud/shopify/assets/themes_support/option_selection-9f517843f664ad329c689020fb1e45d03cac979f64b9eb1651ea32858b0ff452.js
Localization Filters
Localization filters enable you to customize the language and format of elements according to the customer’s locale.
Learn more
Generates an HTML select element with an option for each currency available on the store.
Generates an HTML address display, with each address component ordered according to the address's locale.
Polina's Potions, LLC
150 Elgin Street
8th floor
Ottawa ON K2P 1L4
Canada
Returns a string of translated text for a given translation key from a locale file. The translate filter has an alias of t, which is more commonly used.
Math Filters
Math filters can be linked and are applied in order from left to right, as with all other filters
When used with a model or a video object, the img_tag filter generates an image tag for the media's preview image.
Learn more
When used with a media object, the img_url filter generates an image URL for the media's preview image.
Learn more
//cdn.shopify.com/s/files/1/1425/8696/products/b15ddb43cbac45b1ae2685223fa3536d_500x500.jpg?v=1560284062
//cdn.shopify.com/s/files/1/1425/8696/products/b15ddb43cbac45b1ae2685223fa3536d_small.jpg?v=1560284062
Metafield Filters
Metafield filters can output metafield data from a metafield object within a relevant HTML element, or as a plain string.
Generates a text version of the metafield data.
Learn more
Money Filters
Money filters format prices based on the Currency Formatting found in General Settings.
Formats the price based on the shop's 'HTML with currency' setting and excludes the decimal point and trailing zeros.
$20
Generates the HTML for the Shop Pay Installments banner.
Learn more
Generates an HTML SVG tag for a given payment type.
Learn more
String Filters
String filters are used to manipulate outputs and variables of the string type.
Escapes a string.
Learn more
test
Converts a string into a SHA-1 hash using a hash message authentication code (HMAC). Pass the secret key for the message as a parameter to the filter.
My encoded string is:
My encoded string is: 30ab3459e46e7b209b45dba8378fcbba67297304
Converts a string into a SHA-256 hash using a hash message authentication code (HMAC). Pass the secret key for the message as a parameter to the filter.
My encoded string is:
My encoded string is: 30ab3459e46e7b209b45dba8378fcbba67297304
Inserts a linebreak HTML tag in front of each line break in a string.
One
Two
Three
One
Two
Three
Outputs the singular or plural version of a string based on the value of a number. The first parameter is the singular string and the second parameter is the plural string.
3 items
The slice filter returns a substring, starting at the specified index. An optional second parameter can be passed to specify the length of the substring. If no second parameter is given, a substring of one character will be returned.
h
e
ell
The split filter takes on a substring as a parameter. The substring is used as a delimiter to divide a string into an array. You can output different parts of an array using array filters.
Hi,
how
are
you
today?
Strips tabs, spaces, and newlines (all whitespace) from the left and right side of a string.
too many spaces
Strips tabs, spaces, and newlines (all whitespace) from the left side of a string.
""
"too many spaces "
reverse cannot be used directly on a string, but you can split a string into an array, reverse the array, and rejoin it by chaining together other filters.
.moT rojaM ot lortnoc dnuorG
Strips tabs, spaces, and newlines (all whitespace) from the right side of a string.
" too many spaces"
Converts a string into a SHA-1 hash.
Learn more
My encoded string is:
My encoded string is: c7322e3812d3da7bc621300ca1797517c34f63b6
Converts a string into a SHA-256 hash.
Learn more
My encoded string is:
My encoded string is: c29cce758876791f34b8a1543f0ec3f8e886b5271004d473cfe75ac3148463cb
Strips all HTML tags from a string.
Learn more
Hello World
form
The form object is used within the form tag. It contains attributes of its parent form.
Returns the first address line associated with the address. Exclusive to form tags with the “address” parameter.
Learn more
Returns the second address line associated with the address, if it exists. Exclusive to form tags with the “address” parameter.
Learn more
Returns the name of the author of the blog article comment. Exclusive to form tags with the “article” parameter.
Returns the content of the blog article comment. Exclusive to form tags with the “article” parameter.
Returns the city associated with the address. Exclusive to form tags with the “address” parameter.
Learn more
Returns the company name associated with the address, if it exists. Exclusive to form tags with the “address” parameter.
Learn more
Returns the country associated with the address. Exclusive to form tags with the “address” parameter.
Learn more
Returns the email address of the blog article comment’s author. Exclusive to form tags with the “article” parameter.
Returns the country associated with the address. Exclusive to form tags with the “address” parameter.
Learn more
Returns an array of strings if the form was not submitted successfully. The strings returned depend on which fields of the form were left empty or contained errors.
author
Returns the first name associated with the address. Exclusive to form tags with the “address” parameter.
Learn more
Returns the id (unique identifier) of the form.
Learn more
Returns the last name associated with the address. Exclusive to form tags with the “address” parameter.
Learn more
Used only for form tags with the “customer_login” parameter. The form.password_needed attribute always returns true.
Learn more
Returns the telephone number associated with the address, if it exists. Exclusive to form tags with the “address” parameter.
Learn more
Returns true if the form was submitted successfully, or false if the form contained errors. All forms but the address form set this property. The address form is always submitted successfully.
Comment posted successfully!
Returns the province or state associated with the address. Exclusive to form tags with the "address" parameter.
Learn more
,
San Francisco, California
Renders an HTML checkbox that can submit the current form as the customer's default address. Exclusive to form tags with the "address" parameter.
Learn more
Returns the zip code or postal code associated with the address. Exclusive to form tags with the “address” parameter.
Learn more
form_errors
The error category strings for errors from a form created by a form tag.
Learn more
The translated error messages for each value in the form_errors array.
Learn more
The translated names for each value in the form_errors array.
Learn more
fulfillment
The fulfillment object.
Learn more
Returns the name of the fulfillment service.
Learn more
Returns a fulfillment's tracking number, if it exists.
Learn more
Tracking Number:
Tracking Number: 1Z5F44813600X02768
Returns the URL for a tracking number.
Learn more
http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=1Z5F44813600X02768&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track
Returns an array of all line items and their quantity included in the fulfillment. Any line items that have already been fulfilled, or are yet to be fulfilled, will not be included in the array.
We have fulfilled the following items:
-
- ×
We have fulfilled the following items:
* T-shirt - White / Medium × 8
* Adorable boots × 1
Returns the total number of items included in the fulfillment.
Learn more
We have fulfilled items of your recent order.
We have fulfilled 3 items of your recent order.
generic_file
A file from a file_reference type metafield that is neither an image or video.
Learn more
The alt text of the media.
Learn more
The position of the media in the product.media array. If the source is a file_reference metafield, then nil is returned.
Learn more
null
The preview image of the file.
Learn more
The CDN URL text of the file.
Learn more
"//polinas-potent-potions.myshopify.com/cdn/shop/files/disclaimer.pdf?v=9043651738044769859"
gift_card
The gift_card object can be accessed in the following templates:
The Gift card created email notification template ‘Email Notifications > Gift card created’
. The gift_card.liquid template.
Returns the amount of money remaining on the gift card.
Learn more
Returns the code that was used to redeem the gift card.
Learn more
Returns the currency that the card was issued in.
Learn more
Returns the customer variable of the customer that the gift card is assigned to.
Hey, !
Hey, Brian!
Returns true if the card is enabled, or false if the card is disabled.
Returns true if the card is expired, or false if the card is not.
Returns the expiration date of the gift card.
Learn more
Returns the initial amount of money on the gift card.
Learn more
Returns the product associated with the purchased gift card, or returns nothing if there is no associated product.
Learn more
Returns the line item properties assigned to the gift card when it was added to the cart.
Returns the unique URL that links to the gift card’s page on the shop (rendered through gift_card.liquid).
group
The group object contains information about each default rule set in the robots object for the robots.txt file.
Learn more
Returns of a list of rule objects for each rule in the group.
Learn more
Returns the group’s sitemap object. If the group doesn’t require a sitemap, then this returns blank.
The sitemap can be accessed at /sitemap.xml.
Returns the group’s user_agent object.
Learn more
handle
The handle of the resource associated with the current template.
Learn more
The handle object will return a value only when an article, blog, collection, page, or product template is being viewed.
Learn more
Returns the alt tag of the image, set in the Products page of the Admin.
Learn more
Returns the aspect ratio (width / height) of the image.
Learn more
Returns true if the image has been associated with a variant. Returns false otherwise. This can be used in cases where you want to create a gallery of images that are not associated with variants.
Returns the height of the image in pixels.
Learn more
Returns the id of the image.
Learn more
Returns the type of the object (image).
Learn more
Returns the position of the image, starting at 1. This is the same as outputting forloop.index.
Returns a preview image for the image, when accessed through a media object. For example, product.featured_media.preview_image.
Learn more
Returns the id of the image’s product.
Learn more
Returns the relative path of the product image. This is the same as outputting .
products/my_image.jpg
products/my_image.jpg
Returns an array of attributes for the variant that the image is associated with.
Learn more
- used for the variant:
products/red-shirt.jpeg - used for the variant: Red
products/green-shirt.jpg - used for the variant: Green
products/yellow-shirt.jpg - used for the variant: Yellow
Returns the width of the image in pixels.
Learn more
image_presentation
The presentation settings for an image.
Learn more
The focal point for the image.
Learn more
images
Allows you to access all of the images that have been uploaded to a store.
Learn more
All of the images that have been uploaded to a store. You can access images from the images array by their filename.
Learn more
line_item
A line item represents a single line in the shopping cart. There is one line item for each distinct product variant in the cart.
Returns a list of all discount allocations containing the discounted amount and the reference to the parent discount application. line_item.discount_allocations is available on line items in carts, checkouts, orders, and draft orders.
Returns the combined price of all the items in the line item. This is equal to line_item.final_price times line_item.quantity.
Returns the price of the line item including all line level discount amounts.
Learn more
Returns the fulfillment of the line item.
Learn more
Returns the fulfillment service associated with the line item’s variant. Line items that have no fulfillment service will return manual.
Returns true if the line item’s product is a gift card, or false if it is not.
Returns the weight of the line item. Use the weight_with_unit filter to format the weight.
Returns the line item’s ID.
The line item ID differs depending on the context:
– cart.items returns the ID of the line item’s variant. This ID is not unique, and can be shared by multiple items of the same variant.
– checkout.line_items returns a temporary unique hash generated for the checkout.
– order.line_items returns a unique integer ID.
Returns a unique identifier for each item in the cart.
Returns a list of line-specific discount_allocation objects containing the discounted amount and a reference to the parent discount application.
Learn more
Returns the total amount of all discounts applied to the line item specifically. This doesn’t include discounts that are added to the cart.
Learn more
Returns the discount message if a script has applied a discount to the line item. This attribute only has a value if you are using the Script Editor app.
Returns an array of selected values from the item's product options.
Learn more
-
- :
-
- Size: 42mm
-
- Color: Silver
-
- Strap: Stainless Steel
Returns the original price of the line item before discounts were applied.
Returns the original price of the line item before discounts were applied.
Returns the product of the line item.
Learn more
Returns the id of the line item’s product.
Learn more
Returns an array of custom information for an item that has been added to the cart.
-
- :
Monogram: My dog is the cutest
Gift wrap: Yes
Returns the quantity of the line item.
Learn more
Returns true if the line item requires shipping, or false if it does not. This is set in the variant options in the Products page of the Admin.
Returns a selling_plan_allocation object when the line item contains a selling plan.
Learn more
Returns the SKU of the line item’s variant.
Learn more
Returns the successfully fulfilled quantity of the line item.
Returns true if the line item is taxable, or false if it isn’t. This is set in the variant options in the Products page of the Admin.
Returns the title of this line item. line_item.title combines both the line item's product.title and the line item's variant.title, separated by a hyphen.
Balloon Shirt - Medium
Returns the unit price of the line item. The price reflects any discounts that are applied to the line item.
Learn more
Returns a unit_price_measurement object for the line item.
Learn more
Returns a URL that can be used to remove the line item from the cart. This is only valid within the context of cart line items.
Learn more
Returns the variant of the line item.
Learn more
Returns the id of the line item’s variant.
Learn more
Returns the vendor name of the line item’s product.
Learn more
Returns true if the link is active, or false if the link is inactive.
Similar to link.active, but returns true if a child link of the parent link is active, or false if no child links of the parent link are active.
: child_active:
: child_active:
: active:
Main Menu
Home: child_active: false
About Us: child_active: true
In the news: child_active: false
Locations: child_active: true
Montreal: active: true
Ottawa: active: false
Returns true if a child link has a link object with link.current equal to true. Returns false if no child links have a link object with link.current equal to true.
: child_current:
: child_current:
: current:
Main Menu
Home: child_current: false
About Us: child_current: true
In the news: child_current: false
Locations: child_current: true
Montreal: current: true
Ottawa: current: false
Returns true if the page content associated with the link is considered a match to the current page. Returns false if the content isn't considered a match.
Summer collection
Winter collection
All products
Returns the number of nested levels that a link contains.
Learn more
:
:
:
:
Main Menu: 3
Home: 0
About Us: 2
Locations: 1
Montreal: 0
Ottawa: 0
Returns an array of the child links associated with the parent link.
Learn more
Returns the variable associated to the link. The possible types are: product, collection, page, blog.
$10
Returns the title of the link.
Learn more
Returns the type of the link. The possible values are:
collection_link: if the link points to a collection
product_link: if the link points to a product page
page_link: if the link points to a page
blog_link: if the link points to a blog
relative_link: if the link points to the search page, the home page or /collections/all
http_link: if the link points to an external web page, or a type or vendor collection (e.g. /collections/types?q=Pants)
Returns the URL of the link.
Learn more
Returns the handle of the linklist.
Learn more
Returns the number of nested levels that a linklist contains.
Given the following menu structure:
Main menu
└ Home
└ About Us
└ Locations
└ Montreal
└ Ottawa
:
Main Menu: 3
Returns the title of the linklist.
Learn more
linklists
Allows you to access all of the menus in a store.
Learn more
Allows you to access all of the menus in a store. You can access a specific menu through the linklists object using the menu's handle.
Learn more
Home
Catalog
Contact
localization
The localization object contains information about the currencies and languages that a store supports.
Learn more
Returns a list of country objects for each country that the store supports.
Learn more
Returns a list of shop_locale objects for each language that the currently selected country supports.
Learn more
Returns the country object for the currently selected country.
Learn more
Returns the shop_locale object for the currently selected language.
Learn more
location
The location object contains location information for individual store locations.
Learn more
Returns the address object corresponding to the location.
Learn more
Returns the ID of the location.
Learn more
Returns the latitude associated with the location. Returns nil if the address is not verified.
Learn more
Returns the longitude associated to the location. Returns nil if the address is not verified.
Learn more
Returns the name of location.
Learn more
measurement
The measurement object contains measurement information for weight, volume, and dimension type metafields.
Returns the measurement type. Can be dimension, volume, or weight.
Learn more
Returns the name of associated unit for the measurement type. For example, if the type is weight, then the unit might be grams.
Learn more
Returns the measurement value.
Learn more
media
The media object represents an object returned in a product.media array. The media object is an abstract object that can represent images, models, and videos associated with a product.
You can use media filters to generate URLs and model-viewer tags so that media is rendered on the product page.
Returns the alt tag of the media, set in the Products page of the Admin.
Learn more
Returns the ID of the media.
Learn more
Returns the media type of the object. The media_type property can be used to filter the product.media array for all media of a desired type.
Learn more
Image of the black stroller
Image of the grey stroller
Returns the position of the specific media object in the product object’s media array.
Learn more
Returns a preview image for the media.
Learn more
metafield
Metafields make it possible to store additional information for articles, blogs, collections, customers, orders, pages, products, the shop, and variants. You can access the metafield object through the metafields attribute of these resources.
Returns true if the metafield is a list type. Returns false if not.
Learn more
Returns the metafield type.
Learn more
Returns the metafield value.
Learn more
metaobject
A metaobject entry, which includes the values for a set of fields. The set is defined by the parent metaobject_definition.
Basic information about the metaobject. These properties are grouped under the system object to avoid collisions between system property names and user-defined metaobject fields.
Learn more
metaobject_definition
A metaobject definition defines the structure of a metaobject type for the store, which consists of a merchant-defined set of field definitions.
The metaobjects that follow the definition.
Learn more
The total number of entries for the metaobject definition.
Learn more
metaobject_system
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.
The unique handle of the metaobject.
Learn more
The ID of the metaobject.
Learn more
The type of the metaobject definition. This is a free-form string that’s defined when the metaobject definition is created.
Learn more
model
The model object can be accessed from the product object’s media attribute. The model object contains information about a 3D model uploaded from the product details page in the Shopify admin.
Returns the alt tag of the model set on the product details page of the Shopify admin.
Learn more
Returns the media.id of the model.
Learn more
Returns the type of the object (model). This can be used to filter the product object's media array.
Learn more
Model of the black stroller
Model of the grey stroller
Returns the position of the model in the product object’s media array.
Learn more
Returns preview image of the model.
Learn more
Returns an array of model source objects.
Learn more
model_source
The model_source object can be accessed from the model object’s sources array. The model_source object contains information about the source files for a model associated with a product.
Returns the MIME type of the model source file.
Learn more
Returns the format of the model source file.
Learn more
Returns the URL of the model source file.
Learn more
money
A money value, in the the customer’s local (presentment) currency.
Learn more
The customer’s local (presentment) currency.
Learn more
order
The order object can be accessed in Liquid templates with customer.orders, in order email templates, and in apps such as Order Printer.
Returns the custom cart attributes for the order, if there are any. You can add as many custom attributes to your cart as you like.
When you're looping through attributes, use to get the name of the attribute, and to get its value.
Order notes:
-
- :
Order notes:
-
- Message to merchant: I love your products! Thanks!
Returns the billing address of the order.
Learn more
Returns true if an order is canceled, returns false if it is not.
Returns the timestamp of when an order was canceled. Use the date filter to format the timestamp.
Returns one of the following cancellation reasons, if an order was canceled:
items unavailable
fraudulent order
customer changed/cancelled order
other
Returns the translated output of an order's order.cancel_reason
Learn more
English:
French:
English: Items unavailable
French: Produits indisponibles
Returns the timestamp of when an order was created. Use the date filter to format the timestamp.
Returns the customer associated with the order.
Learn more
Returns an array of discount applications for an order.
Learn more
Discount name:
Savings: -
Discount name: SUMMER19
Savings: -$20.00
Returns the email address associated with an order.
Learn more
Returns the financial status of an order. The possible values are:
pending
authorized
paid
partially_paid
refunded
partially_refunded
voided
Returns the translated output of an order's financial_status.
English:
French:
English: Paid
French: Payée
Returns the fulfillment status of an order.
Learn more
Returns the translated output of an order's fulfillment_status.
English:
French:
English: Unfulfilled
French: Non confirmée
Returns an array of line items from the order.
Learn more
Returns the sum of the order's line-item prices after any line item discounts have been applied. The subtotal amount doesn't include cart discounts, taxes (unless taxes are included in the prices), or shipping costs.
Learn more
Subtotal:
Subtotal: $450.00
POS Only. Returns the physical location of the order. You can configure locations in the Locations settings of the admin.
Returns the link to the order status page for this order.
Learn more
Returns the name of the order in the format set in the Standards & formats section of the General Settings of your Shopify admin.
\#1025
Returns the note associated with a customer order.
Learn more
Special instructions:
Special instructions: Please deliver after 5 PM
Returns the phone number associated with an order, if it exists.
Learn more
Returns the shipping address of the order.
Learn more
Returns an array of shipping_method variables from the order.
Returns the shipping price of an order. Use a money filter to return the value in a monetary format.
Returns an array of line items that are used to calculate the subtotal_price of an order. Excludes tip line items.
Learn more
Returns the subtotal price of an order. Use a money filter to return the value in a monetary format.
Returns an array of all of the order's tags. The tags are returned in alphabetical order.
Learn more
new
leather
sale
special
Returns the order’s tax price. Use a money filter to return the value in a monetary format.
Returns the total value of all discounts applied to the order.
Learn more
Returns the net amount of the order.
The order.total_net_amount is calculated after refunds are applied. The value is equivalent to order.total_price minus order.total_refunded_amount.
Returns the total price of an order. Use a money filter to return the value in a monetary format.
Returns the total refunded amount of an order.
Learn more
Returns an array of transactions from the order.
Learn more
page
The page object.
Learn more
Returns the author of a page.
Learn more
Returns the content of a page.
Learn more
Returns the handle of a page.
Learn more
Returns the id of a page.
Learn more
Returns the timestamp of when the page was created. Use the date filter to format the timestamp.
Returns the name of the custom page template assigned to the page, without the page prefix or the .liquid suffix. Returns nil if a custom template is not assigned to the page.
contact
Returns the title of a page.
Learn more
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.
Learn more
page_image
Returns an image drop for the relevant image to be displayed in social media feeds or search engine listings.
Returns an image drop for the relevant image to be displayed in social media feeds or search engine listings.
For product pages, collection pages, and blog posts, the page_image is the resource's featured image if it exists. For example, a product page's page_image is the same as its product.featured_image. If a featured image does not exist, then the page_image is based on the store's social sharing image set in the admin.
//cdn.shopify.com/s/files/1/0987/1148/files/nice-candle-and-rocks_300x300.jpg?v=1590502771
page_title
Returns 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.
Learn more
Returns the page title of the current page.
Learn more
pages
Allows you to access all of the pages on a store.
Learn more
Allows you to access all of the pages on a store. You can access a specific page through the pages object using the page's handle.
Learn more
Contact
About us
paginate
The paginate tag’s navigation is built using the attributes of the paginate object. You can also use the default_pagination filter for a quicker alternative.
Returns the number of the current page.
Learn more
Returns the total number of items that are on the pages previous to the current one. For example, if you are paginating by 5 items per page and are on the third page, paginate.current_offset would return 10 (5 items × 2 pages).
Returns the total number of items to be paginated. For example, if you are paginating a collection of 120 products, paginate.items would return 120.
Returns an array of all parts of the pagination. A part is a component used to build the navigation for the pagination.
Returns the number of items displayed per page.
Learn more
Returns the number of pages created by the pagination tag.
Learn more
part
Each part returned by the paginate.parts array represents a link in the pagination’s navigation.
Learn more
Returns true if the part is a link, returns false if it is not.
Learn more
Returns the title of the part.
Learn more
Returns the URL of the part.
Learn more
pending_payment_instruction_input
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.
The header of the payment instruction. These are payment method-specific.
Learn more
Contains the corresponding values to the headers of the payment instruction.
Learn more
policy
An individual policy of the shop.policies object. An individual policy can also be referenced directly on the shop object. For example shop.privacy_policy.
Returns the content of the policy.
Learn more
PRIVACY STATEMENT
SECTION 1 – WHAT DO WE DO WITH YOUR INFORMATION?
When you purchase something from our store…
Returns the title of the policy.
Learn more
Privacy policy
Refund policy
Shipping policy
Terms of service
Returns the URL of the policy.
Learn more
/policies/privacy-policy /policies/refund-policy /policies/shipping-policy /policies/terms-of-service
powered_by_link
Creates an HTML link element that links to a localied version of shopify.com, based on the locale of the store.
Learn more
Creates an HTML link element that links to a localied version of shopify.com, based on the locale of the store.
Learn more
Powered by Shopify
predictive_search
Information about the results from a predictive search query through the Predictive Search API.
Learn more
Returns true when being referenced inside a section that’s been rendered using the Predictive Search API and the Section Rendering API. Returns false if not.
Learn more
The resources associated with the search query.
Learn more
The entered search terms.
Learn more
The object types that the search was performed on.
Learn more
predictive_search_resources
Contains arrays of objects for each resource type that can be returned by a predictive search query.
Learn more
The articles associated with the query.
Learn more
The collections associated with the search query.
Learn more
The pages associated with the query.
Learn more
The products associated with the query.
Learn more
product
The product object.
Learn more
Returns true if a product is available for purchase. Returns false if all of the products’ variants inventory_quantity values are zero or less, and their inventory_policy is not set to ‘Allow users to purchase this item, even if it is no longer in stock.’
Returns the lowest compare at price of all the product’s variants entered in the Shopify admin. This attribute is similar to product.compare_at_price_min.
If none of the product variants have a value for compare at price, then product.compare_at_price returns nil.
Returns the highest compare at price. Use one of the money filters to return the value in a monetary format.
Returns the lowest compare at price. Use one of the money filters to return the value in a monetary format.
Returns true if the compare_at_price_min is different from the compare_at_price_max. Returns false if they are the same.
Returns the description of the product. Alias for product.description.
Returns a timestamp for when a product was created in the admin.
Learn more
2019-11-01 05:56:37 -0400
Returns the description of the product.
Learn more
Returns the relative URL of the product’s featured image.
Learn more
Can be used to render the first piece of media attached to the product.
Learn more
Returns the variant object of the first product variant that is available for purchase. In order for a variant to be available, its variant.inventory_quantity must be greater than zero or variant.inventory_policy must be set to continue. A variant with no inventory_policy is considered available.
Returns the handle of a product.
Learn more
Returns true if the product is a gift card.
Learn more
Returns true if the product only has the default variant. This lets you determine whether to show a variant picker in your product forms.
Products that don't have customized variants have a single default variant with its "Title" option set to "Default Title".
Returns the id of the product.
Learn more
Returns an array of the product's images. Use the product_img_url filter to link to the product image on Shopify's Content Delivery Network.
Returns an array of a product's associated media objects, sorted by date added.
Learn more
Returns an array of the product’s options.
Learn more
Allows direct access to a product's options by their name. The object keys of options_by_name are case-insensitive.
Learn more
Returns the price of the product. Use one of the money filters to return the value in a monetary format.
Returns the highest price of the product. Use one of the money filters to return the value in a monetary format.
Returns the lowest price of the product. Use one of the money filters to return the value in a monetary format.
Returns true if the product’s variants have varying prices. Returns false if all of the product’s variants have the same price.
Returns a timestamp for when a product was published on a store.
Learn more
2019-11-01 05:56:37 -0400
Returns true when all variants of the product have variant.requires_selling_plan set to true.
Learn more
Returns the variant object of the currently-selected variant if there is a valid ?variant= parameter in the URL. Returns nil if there is not.
124746062
Returns the variant object of the currently-selected variant if there is a valid ?variant= query parameter in the URL. If there is no selected variant, the first available variant is returned. In order for a variant to be available, its variant.inventory_quantity must be greater than zero or variant.inventory_policy must be set to continue. A variant with no inventory_management is considered available.
Returns a selling_plan_allocation object based on the following sequential logic:
1. If a valid allocation is selected in the URL parameters, then that allocation is returned.
2. If no allocation is specified in the URL, then the first allocation on an in stock variant is returned.
3.If no variants are in stock, then the first allocation on the first variant is returned.
If the product doesn’t have selling plans, then this property returns nil.
Returns the selling_plan object based on the value of the selling_plan URL parameter, if the parameter value is a valid selling plan ID.
For example, when given the URL parameter ?selling_plan=789, the property returns the selling_plan object with ID 789.
Returns the selling_plan_allocation object based on URL parameters identifying a selling plan and variant.
For example, when given URL parameters ?variant=12345&selling_plan=8765, the property returns the allocation for the variant object with ID 12345 and the selling plan with ID 8765.
An array of selling_plan_group objects that include the product’s variants.
Learn more
Returns an array of all of the product's tags. The tags are returned in alphabetical order.
new
leather
sale
special
Returns the name of the custom product template assigned to the product, without the product prefix nor the .liquid suffix. Returns nil if a custom template is not assigned to the product.
wholesale
Returns the title of the product.
Learn more
Returns the type of the product.
Learn more
Returns an array the product’s variants.
Learn more
Returns the vendor of the product.
Learn more
product_option
The product_option object is available for each option in a product options array. The product options array is accessible via product.options_with_values.
quantity_rule
A variant order quantity rule (minimum, maximum, and increment). The default order variant quantity rule is min=1,max=null,increment=1.
recommendations
The recommendations object provides product recommendations that are related to a given product, based on data from sales, product descriptions, and relations between products and collections. Product recommendations become more accurate over time as new orders and product data become available. The recommendations object can be used and accessed from any file in your theme.
Returns true if the recommendations object is referenced inside a theme section that is rendered via /recommendations/products?section_id=&product_id= with valid parameters:
product_id: id of the section where the recommendations object is being used (required)
section_id: id of the product you want to show recommended products for yes (required)
limit: Limits number of results, up to a maximum of ten no
Returns the number of product recommendations, or returns 0 if recommendations.performed is false.
Learn more
Returns product recommendations. These objects are products. Doesn't return any product if recommendations.performed is false.
When the enclosing section is rendered synchronously:
Placeholder animation
---------------------
When the enclosing section is rendered from the endpoint /recommendations/products?section_id=&product_id=:
Product title
Another product title
request
The request object returns information about the domain used to access your store and the page being accessed.
Learn more
Returns true if the request is being made from the theme editor in the Shopify admin.
Learn more
You can use request.host to check which domain a customer is visiting from.
Learn more
your-store.myshopify.com
Returns the protocol and host of the request.
Learn more
https://polinas-potent-potions.myshopify.com/products/health-potion
Returns the type of the current page. These are the different page types:
404
article
blog
cart
collection
list-collections
customers/account
customers/activate_account
customers/addresses
customers/login
customers/order
customers/register
customers/reset_password
gift_card
index
page
password
product
collection
Returns true if the request is being made from within the online store editor’s visual section preview. Returns false if not.
Learn more
robots
The robots object contains the default rule groups for the robots.txt file.
Learn more
Returns a list of group objects for each group of rules.
Learn more
routes
You can use the routes object to generate dynamic URLs to your storefront. By using them instead of hardcoded links, you can make sure your theme supports any changes to the URL format.
Returns the account addresses URL.
Learn more
Returns the account URL.
Learn more
Returns the account login URL.
Learn more
Returns the account logout URL.
Learn more
Returns the account recover URL.
Learn more
Returns the account register URL.
Learn more
Returns the URL that points to the collection for all products.
Learn more
Returns the cart URL.
Learn more
Returns the URL that accepts items to be added to a cart.
Learn more
Returns the URL that allows a cart to be changed.
Learn more
Returns the URL that will clear the cart.
Learn more
Returns the collections URL.
Learn more
Returns the product recommendations URL.
Learn more
Returns the root URL.
Learn more
Returns the search URL.
Learn more
rule
The rule object returns an individual rule for the robots.txt file, which tells crawlers which pages can, or can’t, be accessed. It consists of a directive, which can be either Allow or Disallow, and a value of the associated URL path.
Returns the rule directive, which can be either Allow to allow crawlers to access the specified URL, or Disallow to block them.
Learn more
Returns the associated URL path for the rule.
Learn more
script
script objects contain information about the Shopify Scripts published in your store.
Learn more
Returns the script’s ID.
Learn more
Returns the script's name.
Learn more
Check out our sale:
Check out our sale: Buy one chambray shirt and get a second for half price
scripts
The active scripts, of each script type, on the store. There can be only one active script of each type. Currently, the only type accessible in Liquid is cart_calculate_line_items.
Learn more
The active line item script. If no line item script is currently active, then nil is returned.
Learn more
search
The search object.
Learn more
Returns true if an HTML form with the attribute action="/search" was submitted successfully. This allows you to show content based on whether a search was performed or not.
Returns an array of matching search result items. The items in the array can be a(n):
product
article
page
You can access the attributes of the above three objects through search.results.
Returns the number of results found.
Learn more
Returns the string that was entered in the search input box. Use the highlight filter to apply a different style to any instances in the search results that match up with search.terms.
Yellow shirts are the best!
Returns an array of strings representing the types the search was performed on. The items in the array can be any combination of article, page, product.
The search types can be seen in the URL parameters of a search page. For example, storefront.com/search?type=article,product&q=* will have a search.types array containing article and product.
Learn more
section
The section object lets you access a section’s properties and setting values.
Learn more
Returns an array of the section’s blocks.
Learn more
For static sections, returns the section’s file name without .liquid. For dynamic sections, returns a dynamically generated ID.
Learn more
The 1-based index of the current section within its location. The index starts at 1 within each location.
Learn more
The 0-based index of the current section within its location. This is the same as the index property except that the index starts at 0 instead of 1.
Learn more
The scope or context of the section, such as a template, section group, or global.
Learn more
Returns an object of the section settings set in the theme editor. Retrieve setting values by referencing the setting's unique id.
Learn more
This week's best selling items
Weekly promotion
This week's best selling items
selling_plan
The selling_plan object captures the intent of a selling plan applied on a line item.
Learn more
Returns the selling plan’s description.
Learn more
The unique ID of the selling_plan_group that the selling plan belongs to.
Learn more
The unique ID of the selling plan.
This value is used when submitting a selling plan to the cart.
The selling plan’s name.
Learn more
An array of selling_plan_option objects that contain information about the selling plan's value for a particular selling_plan_group_option.
Learn more
:
Delivery frequency : Every month
Payment frequency : Pay per delivery
An array of selling_plan_price_adjustment objects. A selling_plan_price_adjustment describes how a selling plan changes the price of variants for a given period.
The maximum length of the array is 2. The array is empty when the selling plan doesn't create any price adjustments.
Pay on the first orders.
Pay $100.00 on the first 3 orders.
Returns true when the selling plan includes multiple recurring deliveries.
Learn more
Returns true if the selling plan’s ID is identified by the selling_plan URL parameter.
Learn more
selling_plan_option
A selling_plan_option object contains the name and values of an individual item in the selling_plan.options array.
Learn more
Returns the selling plan option’s name.
Learn more
Returns the index of the the option amongst all the selling_plan.options.
Learn more
Returns the selling plan option’s value.
Learn more
selling_plan_price_adjustment
Each selling_plan_price_adjustment of the selling plan maps to a selling_plan_allocation_price_adjustment in the selling_plan_allocation array. The selling_plan.price_adjustments describe the intent of the selling plan, while selling_plan_allocation.price_adjustments contains the resulting money amounts.
The number of orders that this price adjustment applies to.
The value is nil when the price adjustment is applied either on an ongoing basis or for the rest of selling plan’s duration.
The 1-based index of the selling_plan_price_adjustment in the selling_plan.price_adjustments array.
Learn more
A float representing the value of price adjustment. The value_type determines what this value actually represents.
Learn more
The type of the price adjustment, which can be fixed_amount, percentage, or price.
Learn more
selling_plan_allocation
A selling plan allocation represents how a particular selling plan affects a line item. A selling plan allocation associates a variant with a selling plan.
The selling plan allocation’s compare at price.
This value is set to the variant’s price without the selling plan applied. If the variant’s price with the selling plan applied is the same, then this value is nil.
The price charged for each delivery included in a selling plan.
When a selling plan includes multiple deliveries, the per_delivery_price value will be the selling_plan_allocation.price divided by the number of deliveries.
( each)
$1,200.00 ($100.00 each)
The price of the line item with the selling plan applied.
Learn more
An array of selling_plan_allocation_price_adjustment objects.
The maximum length of the array is 2. The array is empty when the selling plan doesn't create any price adjustments.
Pay on the first orders.
Pay $100.00 on the first 3 orders.
The selling_plan that created the allocation.
Learn more
The ID of the selling_plan_group to which the allocation’s selling plan belongs.
Learn more
The unit price of the variant associated with the selling plan.
If the variant has no unit price, then this property returns nil.
selling_plan_allocation_price_adjustment
Each selling_plan_allocation_price_adjustment of the selling plan allocation maps to a selling_plan_price_adjustment in the selling_plan.price_adjustments array. The selling_plan.price_adjustments describes the intent of the selling plan, while selling_plan_allocation.price_adjustments contains the resulting money amounts.
Learn more
The 1-based index of the selling_plan_allocation_price_adjustment in the selling_plan_allocation.price_adjustments array.
Learn more
The price that will be charged for the selling_plan_allocation_price_adjustment period.
Learn more
selling_plan_checkout_charge
Information about how a specific selling plan affects the amount that a customer needs to pay for a line item at checkout.
Learn more
The value of the checkout charge. How this value is interpreted depends on the value type of the checkout charge.
Learn more
100
selling_plan_group
A group of selling plans available for some or all of a product’s variants. Selling plans in a group all share the same selling_plan_option.name values.
Learn more
A unique ID for the selling plan group.
Learn more
The name of the selling plan group.
Learn more
Returns true if the selected selling plan is part of the selling plan group. The selected selling plan is based on the URL parameter selling_plan.
Learn more
An array of selling_plan objects that belong to the selling_plan_group.
Learn more
An optional string provided by an app to identify selling plan groups created by that app.
If no string is provided by the app, then this property returns nil.
selling_plan_group_option
A selling_plan_group_option object contains the name and values of an individual item in the selling_plan_group.options array.
Learn more
Returns the selling plan option’s name.
Learn more
Returns the index of the the option amongst all the selling_plan_group.options.
Learn more
Returns the value for the selling plan group option when a selling_plan_allocation is selected. The selected selling plan allocation is based on both the URL parameters selling_plan and id.
Learn more
An array of values for the selling plan group option.
Learn more
settings
Allows you to access all of the theme’s settings from the settings_schema.json file.
Learn more
Allows you to access all of the theme's settings from the settings_schema.json file.
Learn more
shipping_method
The shipping_method object.
Learn more
Returns the handle of the shipping method. The price of the shipping rate is appended to the end of the handle.
shopify-international-shipping-25.00
Returns the original price of the shipping method before discounts were applied.
Use a money filter to return the value in a monetary format.
$20.00
Returns the price of the shipping method. Use a money filter to return the value in a monetary format.
$15
shop
The shop object can be used and accessed from any file in your theme.
Learn more
You can add the attributes below to shop.address to return information about a shop’s address.
Learn more
Returns a summary of the shop's address in the form of street, city, state/province, country.
Learn more
150 Elgin Street, Ottawa, Ontario, Canada
Returns true if customer accounts are optional for completing a checkout and there is a ?checkout_url parameter in the URL. Otherwise, returns false.
A checkout_url parameter is created when a visitor comes to the account login page from a link at checkout.
Returns the number of collections in a shop.
Learn more
Returns the shop’s currency in three-letter format (e.g. USD).
Returns true when a customer account is required to complete a checkout. Otherwise, returns false.
Learn more
Returns true when a customer account is option to complete a checkout. Otherwise, returns false.
Learn more
Returns the description of the shop.
Learn more
Returns the primary domain of the shop.
Learn more
Returns the shop’s email address.
Learn more
Returns the list of currency objects that the store accepts.
To return the currency of the cart, see the cart.currency object.
To return the store currency, see the shop.currency object.
Returns an array of accepted credit cards for the shop. Use the payment_type_img_url filter to link to the SVG image file of the credit card.
Returns the shop’s ID.
Learn more
Returns the shop’s metafields. Metafields can only be set using the Shopify API.
Returns a string that is used by Shopify to format money without showing the currency.
Returns a string that is used by Shopify to format money while also displaying the currency.
Returns the shop’s name.
Learn more
Returns the shop’s password page message.
Learn more
Returns the .myshopify.com URL of a shop.
Learn more
Returns the shop’s phone number.
Learn more
Returns an array of your shop’s policy objects. You can set these policies in your store’s Legal settings in your Shopify admin.
Returns a policy object for your store’s privacy policy.
Learn more
Returns the number of products in a shop.
Learn more
Returns an array of shop_localeobjects. Each object represents a shop locale that’s published on the shop.
Learn more
Returns a policy object for your store’s refund policy.
Learn more
Returns the full URL of a shop prepended by the https protocol.
Learn more
https://johns-apparel.com
Returns a policy object for your store’s shipping policy.
Learn more
Returns a policy object for your store’s subscription policy.
Learn more
Returns a policy object for your store’s terms of service.
Learn more
Returns an array of all unique product types in a shop.
Learn more
Returns an array of all unique vendors in a shop.
Learn more
shop_locale
Returns information about the shop’s locale.
Learn more
Returns whether or not this is the shop’s primary locale.
Learn more
Returns the root relative URL of the locale.
Learn more
sitemap
The sitemap object returns 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.
Returns Sitemap.
Learn more
Returns the URL that the sitemap is hosted at.
Learn more
sort_option
A sort option for a collection or search results page.
Learn more
The customer-facing name of the sort option. The name can be edited by merchants in the language editor.
Learn more
"Alphabetically, A-Z"
The value of the sort option. This value is used when assigning the collection.sort_by and search.sort_by parameters.
Learn more
store_availability
The store_availability object is used to show what variants are stocked at physical store locations, regardless of the current stock level. If a location does not stock a variant, then that location will not be returned.
Learn more
Returns true if the variant has stock.
Learn more
Returns the location object that the variant is stocked at.
Learn more
Returns true if the variant is stocked at a location that has pickup enabled.
Learn more
Returns the amount of time it takes for pickup to be ready, For example, Usually ready in 24 hours. This value is set in the admin while setting up the local pickup option.
Learn more
tablerow
The tablerow object is used within the tablerow tag. It contains attributes of its parent for loop.
Returns the number of iterations of the tablerow loop.
Returns the current index of the tablerow loop, starting at 1.
Returns the current index of the tablerow loop, starting at 0.
Returns tablerow.index in reverse order.
Returns tablerow.index0 in reverse order.
Returns true if it’s the first iteration of the tablerow loop. Returns false if it is not the first iteration.
Learn more
Returns true if it’s the last iteration of the tablerow loop. Returns false if it is not the last iteration.
Returns the index of the current row, starting at 1.
Learn more
Returns the index of the current row, starting at 0.
Learn more
Returns true if the current column is the first column in a row. Returns false if it is not.
Returns true if the current column is the last column in a row. Returns false if it is not.
tax_line
The tax_line object.
Learn more
Returns the amount of the tax. Use one of the money filters to return the value in a monetary format.
€25
template
The template object has a handful of attributes. Referencing just template returns the name of the template used to render the current page, with the .liquid extension omitted. The template object can be used and accessed from any file in your theme.
As a best practice, it’s recommended that you apply the template name as a CSS class on your HTML body tag.
Returns the name of the template's parent directory. Returns nil for templates whose parent directory is the templates/ folder.
Learn more
customers
Returns the template's name without the template's custom suffix, if it exists, or the .liquid extension.
Learn more
product
Returns the name of the custom template without the template.name prefix or the .liquid extension. Returns nil if a custom template is not being used.
Learn more
alternate
theme
The theme object contains information about published themes in a shop. You can also use themes to iterate through both themes.
Returns the theme’s id. This is useful for when you want to link a user directly to the theme’s Customize theme page.
Returns one of the two possible roles of a theme: main or mobile.
Returns the name of the theme.
Learn more
transaction
The transaction object.
Learn more
Returns a unique numeric identifier for the transaction.
Learn more
Returns the amount of the transaction. Use one of the money filters to return the value in a monetary format.
Returns the status of the transaction.
Learn more
Returns the translated output of a transaction’s status.
Learn more
Returns the timestamp of when the transaction was created. Use the date filter to format the timestamp.
Returns text with information from the payment gateway about the payment receipt. This includes whether the payment was a test case and an authorization code if one was included in the transaction.
Returns the type of transaction. There are five transaction types:
authorizationis the reserving of money that the customer has agreed to pay.captureis the transfer of the money that was reserved during the authorization stage.saleis a combination of authorization and capture, performed in one step.voidis the cancellation of a pending authorization or capture.refundis the partial or full refund of the captured money to the customer.
The payment_details object contains additional properties related to the payment method used in the transaction.
credit_card_company returns the name of the company who issued the customer's credit card.
credit_card_number returns the customer's credit card number. All but the last four digits are redacted.
:
Visa: •••• •••• •••• 1234
transaction_payment_details
Information about the payment methods used for a transaction.
Learn more
The last four digits of the credit card number of the credit card used for the transaction.
Learn more
"4242"
The credit card number of the credit card used for the transaction. All but the last four digits are redacted.
Learn more
""•••• •••• •••• 4242""
The gift card used for the transaction. If no gift card was used, then nil is returned.
Learn more
"nil"
unit_price_measurement
The unit_price_measurement object contains information about how units of a product variant are measured. It’s used by the unit_price attribute to calculate unit prices.
Returns the type of measurement as a string. For example, volume.
Learn more
Returns the unit of measurement that’s used to measure the quantity_value. For example, l.
Learn more
Returns the quantity of the unit that’s included. For example, 2.5.
Learn more
Returns the unit of measurement that’s used to measure the reference_value. For example, ml.
Learn more
Returns the reference value that’s used to illustrate the base unit price. For example, 100.
Learn more
user
The author of a blog article.
Learn more
Returns true if the author is the account owner of the store. Returns false if not.
Learn more
false
The bio associated with the author's account. If no bio is specified, then nil is returned.
Learn more
"Polina got her first cauldron at the tender age of six, and she has been passionate about potions ever since!!"
The URL for the personal website associated with the author's account. If no personal website is specified, then nil is returned.
Learn more
null
The URL for the personal website associated with the author's account. If no personal website is specified, then nil is returned.
Learn more
false
user_agent
The user_agent object returns the user-agent, which is the name of the crawler, for a specific group in the robots.txt file. It consists of a User-agent directive, and a value of the user-agent name.
Returns User-agent.
Learn more
Returns the user-agent name.
Learn more
variant
The variant object.
Learn more
Returns true if the variant is available to be purchased, or false if it is not. In order for a variant to be available, its variant.inventory_quantity must be greater than zero or variant.inventory_policy must be set to continue. A variant with no variant.inventory_management is also considered available.
Returns the variant’s barcode.
Learn more
Returns the variant’s compare at price. Use one of the money filters to return the value in a monetary format.
Returns the first media item attached to the variant.
Learn more
Returns whether the variant has been matched by a storefront filter. Returns true if it’s been matched, and false if not.
Learn more
Returns the variant’s unique id.
Learn more
Returns true if the variant has incoming inventory.
Learn more
Returns the variant’s inventory tracking service.
Learn more
Returns the string continue if the ‘Allow users to purchase this item, even if it is no longer in stock.’ checkbox is checked in the variant options in the Admin. Returns deny if it is unchecked.
Returns the date when the next incoming inventory will arrive.
Learn more
Returns the variant’s inventory quantity.
Learn more
Returns the value of the variant’s first option.
Learn more
Returns the value of the variant’s second option.
Learn more
Returns the value of the variant’s third option.
Learn more
Returns the variant’s price.
Use one of the money filters to return the value in a monetary format.
Returns the parent product object.
Returns a boolean result as to whether the variant is set to require shipping.
Returns true if the variant is currently selected by the ?variant= URL parameter.
Returns false if the variant is not selected by a URL parameter.
Returns a selling_plan_allocation object based on the URL parameter selling_plan.
For example, given the URL parameters ?variant=12345&selling_plan=8765, the selling plan allocation for the variant 12345 with a selling plan id of 8765 is returned.
If there is no selected selling plan allocation, then this property returns nil.
An array of selling_plan_allocation objects available for the variant.
Learn more
Returns the variant’s SKU.
Learn more
Returns an array of store_availability objects if variant.selected is true, or the variant is the product’s first available variant.
Returns a boolean result as to whether taxes will be charged for this variant.
Returns the concatenation of all the variant's option values, joined by a /.
Learn more
Red / Small / Wool
Returns the unit price of the product variant. The price reflects any discounts that are applied to the line item.
Unit prices are available only to stores located in Germany or France.
Returns a unit_price_measurement object for the product variant.
Unit prices are available only to stores located in Germany or France.
Returns the variant's absolute URL.
Learn more
http://my-store.myshopify.com/products/t-shirt?variant=12345678
Returns the variant’s weight in grams. Use the weight_with_unit filter to convert it to the shop’s weight format or the weight unit configured on the variant.
Returns the unit for the weight configured on the variant. Works well paired with the weight_in_unit attribute and the weight_with_unit filter.
Returns the weight of the product converted to the unit configured on the variant. Works well paired with the weight_unit attribute and the weight_with_unit filter.
video
The video object can be accessed from the product object’s media attribute. It contains information about a video uploaded from the product details page in the Shopify admin.
Learn more
Returns the alt tag of the video set on the product details page of the Shopify admin.
Returns the aspect ratio of the video source file.
Returns the duration of the video source file.
Returns the media_id of the video.
Returns the type of the object (video). This can be used to filter the product object's media array.
Promotional video for stroller
Features video for stroller
Returns the position of the video in the product object’s media array.
Returns a preview image for the video.
Returns an array of video_source objects.
video_source
The video_source object can be accessed from the video object’s sources array. The video_source object contains information about the source files for a video associated with a product.
Learn more
Returns the format of the video source file (mp4/m3u8).
Returns the height of the video source file.
Returns the MIME type of the video source file.
Returns the URL of the video source file.
Returns the width of the video source file.
















The Ultimate Social Media Guide
With the ever-growing power of social media, we use the latest techniques, video, and animation software to craft eye-catching social media assets that make your brand pop. Our designers, wielding Adobe Creative tools, create distinctive animations and graphics to illuminate your brand story and highlight your products or services. Want a unique design? No problem – we also offer bespoke designs to match your brand aesthetic.