Shopify Liquid objects: the ones you actually use
The dozen objects that cover almost all theme work, and the properties on each that you reach for daily.
8 min read · APIs & data ·
Shopify's full Liquid object reference is long. In practice, theme work uses about a dozen objects and a subset of their properties. This is that subset.
Assumes you know the Liquid basics.
product
``liquid {{ product.title }} {{ product.description }} {{ product.handle }} {{ product.url }} {{ product.featured_image }} {{ product.images }} {{ product.price }} {% comment %} in cents {% endcomment %} {{ product.price_min }} {{ product.price_max }} {{ product.compare_at_price }} {{ product.available }} {{ product.variants }} {{ product.selected_or_first_available_variant }} {{ product.options_with_values }} {{ product.type }} {{ product.vendor }} {{ product.tags }} {{ product.metafields.namespace.key }} ``
selected_or_first_available_variant is the one you build the buy form around — it respects the variant in the URL and falls back sensibly.
Prices are in the currency's smallest unit. Always render them through the money filter rather than dividing by 100 yourself.
variant
``liquid {{ variant.id }} {{ variant.title }} {{ variant.sku }} {{ variant.price }} {{ variant.compare_at_price }} {{ variant.available }} {{ variant.inventory_quantity }} {{ variant.featured_image }} {{ variant.options }} {{ variant.metafields.namespace.key }} ``
inventory_quantity is only meaningful when inventory is tracked, and exposing exact stock numbers is a merchandising decision, not a default.
collection
``liquid {{ collection.title }} {{ collection.description }} {{ collection.handle }} {{ collection.url }} {{ collection.products }} {{ collection.all_products_count }} {{ collection.image }} {{ collection.filters }} {{ collection.sort_by }} ``
collection.products is paginated — wrap it in {% paginate collection.products by 24 %}. Iterating it unbounded on a large collection is the classic way to make a slow page, covered in the performance checklist.
collection.filters is what you build the filter UI from — see collection pages and filtering.
cart
``liquid {{ cart.item_count }} {{ cart.total_price }} {{ cart.items }} {{ cart.note }} {{ cart.attributes }} {{ cart.cart_level_discount_applications }} ``
Each item gives you item.product, item.variant, item.quantity, item.line_price, item.final_line_price and item.discount_allocations. Use the final_ variants when discounts are involved, or your displayed totals disagree with checkout.
customer
``liquid {% if customer %} {{ customer.first_name }} {{ customer.orders }} {{ customer.default_address }} {{ customer.tags }} {% endif %} ``
customer.tags is how a lot of stores implement entitlements — trade pricing, gated content, digital product access. Simple, native, and enough for many cases.
section and block
```liquid {{ section.id }} {{ section.settings.heading }} {% for block in section.blocks %}
block.shopify_attributes is what makes a block selectable in the theme editor. Omitting it is the most commonly forgotten line in section development — sections and blocks.
settings
Global theme settings from `settings_schema.json`:
``liquid {{ settings.heading_font }} {{ settings.show_vendor }} ``
routes — never hard-code URLs
``liquid {{ routes.root_url }} {{ routes.cart_url }} {{ routes.cart_add_url }} {{ routes.search_url }} {{ routes.account_url }} {{ routes.predictive_search_url }} ``
Hard-coding /cart breaks the theme in other locales and markets. This is a real bug that ships regularly — see localisation.
request
``liquid {{ request.page_type }} {{ request.path }} {{ request.locale.iso_code }} {{ request.host }} ``
request.page_type is how you branch behaviour by template without a separate file — useful for headers and footers.
shop
``liquid {{ shop.name }} {{ shop.email }} {{ shop.url }} {{ shop.currency }} {{ shop.metafields.namespace.key }} ``
Shop metafields are an underused place for store-wide configuration a theme reads — often tidier than another theme setting.
Twelve objects cover almost all theme work. The properties worth memorising areselected_or_first_available_variant,block.shopify_attributesand everything underroutes— those three prevent the most common bugs.
Is this the problem you’re looking at?
Send me the link to your store and a line about what is going wrong. You get a straight answer within one business day — no pitch, no obligation.
mario@clicksandcarts.coOr see what I do around Shopify: services, work beyond the theme, selected work.