Skip to main content

Liquid Objects Reference

Complete reference of all objects, properties, and data structures available in O2VEND Liquid templates.

Global Objects

These objects are available on all pages.

shop

Store/shop information and settings.

{{ shop.name }}              <!-- Store name -->
{{ shop.domain }} <!-- Store domain -->
{{ shop.currency }} <!-- Currency code (e.g., "USD", "INR") -->
{{ shop.timezone }} <!-- Timezone -->
{{ shop.language }} <!-- Language code -->
{{ shop.logo }} <!-- Logo URL -->
{{ shop.favicon }} <!-- Favicon URL -->
{{ shop.id }} <!-- Store ID -->
{{ shop.identifier }} <!-- Store identifier -->
{{ shop.companyName }} <!-- Company name -->
{{ shop.companyAddress }} <!-- Company address -->
{{ shop.companyPhoneNumber }} <!-- Company phone -->
{{ shop.companyEmail }} <!-- Company email -->
{{ shop.settings }} <!-- Full settings object -->

Full Structure:

{
"name": "string",
"domain": "string",
"currency": "string",
"timezone": "string",
"language": "string",
"logo": "string",
"favicon": "string",
"id": "string|number",
"identifier": "string",
"companyName": "string",
"companyAddress": "string",
"companyPhoneNumber": "string",
"companyEmail": "string",
"settings": {
"currencySymbol": "string",
"currencyFormat": "string",
"currencyDecimalDigits": "number",
"currencyGroupSeparator": "string",
"currencyDecimalSeparator": "string",
"currencyGroupSizes": [3],
"deliveryZoneSupport": "boolean",
"deliveryZoneSelection": "number",
"zipcodeSearchEnabled": "boolean",
"defaultDeliveryZoneZipCode": "string",
"countries": [],
"states": {}
}
}

store

Alias for shop/store information (same as shop).

{{ store.id }}
{{ store.name }}
{{ store.settings }}

tenant

Full tenant configuration object.

{{ tenant.id }}
{{ tenant.name }}
{{ tenant.domain }}
{{ tenant.settings }}

settings

Theme settings from settings_data.json.

{{ settings.color_primary }}
{{ settings.color_background }}
{{ settings.font_size_base }}
{{ settings.spacing_small }}

Note: Available settings depend on your theme's settings_data.json file.

Navigation menus organized by normalized name.

{{ menus.main }}        <!-- Main menu -->
{{ menus.footer }} <!-- Footer menu -->
{{ menus.all }} <!-- Array of all menus -->

Menu Structure:

{
"id": "number",
"name": "string",
"items": [
{
"id": "number",
"title": "string",
"url": "string",
"target": "string",
"displayOrder": "number",
"items": [] // Child items
}
]
}

Main navigation menu (convenience access).

{{ mainMenu.name }}
{{ mainMenu.items }}

request

Request information.

{{ request.path }}      <!-- Current path -->
{{ request.url }} <!-- Full URL -->
{{ request.host }} <!-- Hostname -->

deliveryZone

Delivery zone information.

{{ deliveryZone.enabled }}           <!-- Boolean -->
{{ deliveryZone.mode }} <!-- 0=Zipcode, 1=City, 2=AutoDetect -->
{{ deliveryZone.current }} <!-- Current zone object -->
{{ deliveryZone.zipcodeSearchEnabled }} <!-- Boolean -->
{{ deliveryZone.defaultZipcode }} <!-- Default zipcode -->
{{ deliveryZone.showModal }} <!-- Show zone selection modal -->

Current Zone Structure:

{
"zoneId": "number|string",
"name": "string",
"zipcode": "string",
"city": "string"
}

customer

Current customer information (null if not logged in).

{% if customer %}
{{ customer.id }}
{{ customer.firstName }}
{{ customer.lastName }}
{{ customer.fullName }}
{{ customer.email }}
{{ customer.phone }}
{% endif %}

Customer Structure:

{
"id": "number",
"firstName": "string",
"lastName": "string",
"fullName": "string",
"email": "string",
"phone": "string"
}

page

Current page information.

{{ page.title }}
{{ page.handle }}
{{ page.content }} <!-- For custom pages -->
{{ page.subtitle }} <!-- For custom pages -->

Product Objects

product

Single product object (available on product detail pages).

<!-- Basic Information -->
{{ product.productId }} <!-- Product ID -->
{{ product.id }} <!-- Alias for productId -->
{{ product.name }} <!-- Product name -->
{{ product.title }} <!-- Alias for name -->
{{ product.slug }} <!-- URL slug -->
{{ product.handle }} <!-- URL handle -->
{{ product.sku }} <!-- SKU -->
{{ product.gtin }} <!-- GTIN/Barcode -->

<!-- Descriptions -->
{{ product.shortDescription }} <!-- Short description -->
{{ product.description }} <!-- Full description -->
{{ product.htmlContent }} <!-- HTML content -->

<!-- Images -->
{{ product.thumbnailImage }} <!-- Thumbnail image object -->
{{ product.thumbnailImage1 }} <!-- Primary thumbnail -->
{{ product.thumbnailImage2 }} <!-- Secondary thumbnail -->
{{ product.images }} <!-- Array of image objects -->
{{ product.featured_image }} <!-- Featured image (first image) -->

<!-- Pricing -->
{{ product.prices }} <!-- Pricing object -->
{{ product.prices.price }} <!-- Current price -->
{{ product.prices.mrp }} <!-- MRP/Compare at price -->
{{ product.prices.originalPrice }} <!-- Original price -->

<!-- Stock & Availability -->
{{ product.stockQuantity }} <!-- Stock quantity -->
{{ product.stockTrackingIsEnabled }} <!-- Boolean -->
{{ product.isAllowToOrder }} <!-- Allow order when out of stock -->
{{ product.inStock }} <!-- Computed: true if in stock -->
{{ product.available }} <!-- Computed: true if available -->

<!-- Product Type & Classification -->
{{ product.productType }} <!-- Product type ID -->
{{ product.vendorName }} <!-- Vendor name -->
{{ product.vendorId }} <!-- Vendor ID -->
{{ product.brand }} <!-- Brand object/array -->
{{ product.category }} <!-- Category object -->
{{ product.catagories }} <!-- Categories array (note: typo in API) -->

<!-- Variants & Combinations -->
{{ product.hasVariations }} <!-- Boolean -->
{{ product.variations }} <!-- Array of variant objects -->
{{ product.variants }} <!-- Alias for variations -->
{{ product.combinations }} <!-- Array of combination objects -->

<!-- Attributes -->
{{ product.attributes }} <!-- Array of attribute objects -->

<!-- Metadata -->
{{ product.metaTitle }} <!-- SEO title -->
{{ product.metaDescription }} <!-- SEO description -->
{{ product.metaKeywords }} <!-- SEO keywords -->

<!-- Flags -->
{{ product.isFeatured }} <!-- Boolean -->
{{ product.showCallForPricing }} <!-- Boolean -->
{{ product.allowNegativeStock }} <!-- Boolean -->
{{ product.isLotTrackingEnabled }} <!-- Boolean -->

<!-- Statistics -->
{{ product.viewCount }} <!-- View count -->
{{ product.buyCount }} <!-- Purchase count -->
{{ product.reviewsCount }} <!-- Review count -->
{{ product.ratingAverage }} <!-- Average rating -->

<!-- Additional Data -->
{{ product.additionalData }} <!-- JSON string or object -->
{{ product.subscriptions }} <!-- Subscription options -->
{{ product.shippingMethods }} <!-- Shipping methods -->

<!-- Warehouses -->
{{ product.warehouses }} <!-- Array of warehouse objects -->

Product Pricing Structure:

{
"price": "number",
"mrp": "number",
"originalPrice": "number",
"currency": "string"
}

Product Image Structure:

{
"url": "string",
"alt": "string",
"width": "number",
"height": "number"
}

Product Variant Structure:

{
"id": "number",
"productId": "number",
"name": "string",
"sku": "string",
"price": "number",
"stockQuantity": "number",
"inStock": "boolean",
"available": "boolean",
"attributes": []
}

Product Brand Structure:

{
"id": "number",
"name": "string",
"slug": "string"
}

Product Category Structure:

{
"id": "number",
"categoryId": "number",
"name": "string",
"slug": "string"
}

products

Array of products (available on product listing pages).

{% for product in products %}
{{ product.name }}
{{ product.price }}
{% endfor %}

Pagination:

{{ pagination.currentPage }}
{{ pagination.itemsPerPage }}
{{ pagination.totalItems }}
{{ pagination.totalPages }}
{{ pagination.hasNext }}
{{ pagination.hasPrevious }}

relatedProducts

Related products array (available on product detail pages).

{% for product in relatedProducts %}
{{ product.name }}
{% endfor %}

Collection/Category Objects

collection

Single collection/category object.

<!-- Basic Information -->
{{ collection.id }} <!-- Collection ID -->
{{ collection.categoryId }} <!-- Category ID -->
{{ collection.title }} <!-- Collection title -->
{{ collection.name }} <!-- Collection name -->
{{ collection.slug }} <!-- URL slug -->
{{ collection.handle }} <!-- URL handle -->

<!-- Content -->
{{ collection.description }} <!-- Description -->
{{ collection.htmlContent }} <!-- HTML content -->
{{ collection.topHtmlContent }} <!-- Top HTML content -->

<!-- Images -->
{{ collection.image }} <!-- Main image URL -->
{{ collection.thumbnailImage }} <!-- Thumbnail image object -->
{{ collection.bannerImage }} <!-- Banner image object -->
{{ collection.menuImage }} <!-- Menu image object -->

<!-- Hierarchy -->
{{ collection.parentCategoryId }} <!-- Parent category ID -->
{{ collection.parentName }} <!-- Parent category name -->

<!-- Products -->
{{ collection.products }} <!-- Array of products -->
{{ collection.productsCount }} <!-- Product count -->

<!-- Display -->
{{ collection.displayOrder }} <!-- Display order -->
{{ collection.showBanner }} <!-- Show banner boolean -->

<!-- SEO -->
{{ collection.metaTitle }} <!-- SEO title -->
{{ collection.metaDescription }} <!-- SEO description -->
{{ collection.metaKeywords }} <!-- SEO keywords -->

collections

Array of collections/categories.

{% for collection in collections %}
{{ collection.name }}
{% endfor %}

categories

Array of categories (alias for collections).

{% for category in categories %}
{{ category.name }}
{% endfor %}

Cart Objects

cart

Shopping cart object.

<!-- Items -->
{{ cart.items }} <!-- Array of cart items -->
{{ cart.itemCount }} <!-- Total item count -->
{{ cart.items.size }} <!-- Number of unique items -->

<!-- Totals -->
{{ cart.total }} <!-- Total amount -->
{{ cart.subTotal }} <!-- Subtotal (before tax/shipping) -->
{{ cart.taxAmount }} <!-- Tax amount -->
{{ cart.shippingAmount }} <!-- Shipping amount -->

Cart Item Structure:

{
"itemId": "number|string",
"productId": "number",
"variantId": "number",
"title": "string",
"image": "string",
"price": "number",
"linePrice": "number",
"quantity": "number",
"productSlug": "string",
"variantTitle": "string",
"compareAtPrice": "number",
"sku": "string"
}

Example:

{% for item in cart.items %}
<div class="cart-item">
<img src="{{ item.image }}" alt="{{ item.title }}">
<h3>{{ item.title }}</h3>
<p>{{ item.price | money_with_settings: shop.settings }}</p>
<p>Quantity: {{ item.quantity }}</p>
<p>Total: {{ item.linePrice | money_with_settings: shop.settings }}</p>
</div>
{% endfor %}

Checkout Objects

checkout

Checkout information (available on checkout pages).

<!-- Checkout Identifiers -->
{{ checkout.token }} <!-- Checkout token -->
{{ checkout.checkoutId }} <!-- Checkout ID -->

<!-- Addresses -->
{{ checkout.shippingAddress }} <!-- Shipping address object -->
{{ checkout.billingAddress }} <!-- Billing address object -->

<!-- Shipping -->
{{ checkout.shipping }} <!-- Shipping information -->

<!-- Payment -->
{{ checkout.payment }} <!-- Payment information -->
{{ checkout.paymentMethods }} <!-- Array of payment methods -->
{{ checkout.paymentMethodsGrouped }} <!-- Grouped payment methods -->
{{ checkout.accountData }} <!-- Account data (loyalty points, store credit) -->

<!-- Pricing -->
{{ checkout.pricing }} <!-- Pricing object -->
{{ checkout.pricing.subtotal }} <!-- Subtotal -->
{{ checkout.pricing.total }} <!-- Total -->
{{ checkout.pricing.tax }} <!-- Tax -->
{{ checkout.pricing.shipping }} <!-- Shipping -->
{{ checkout.pricing.discount }} <!-- Discount -->

<!-- Notes -->
{{ checkout.note }} <!-- Order notes -->

<!-- Flags -->
{{ checkout.isHostedCheckout }} <!-- Boolean -->

Address Structure:

{
"firstName": "string",
"lastName": "string",
"address1": "string",
"address2": "string",
"city": "string",
"state": "string",
"zip": "string",
"country": "string",
"phone": "string"
}

Payment Method Structure:

{
"id": "number",
"name": "string",
"type": "string",
"isAvailable": "boolean",
"config": {}
}

Account Data Structure:

{
"loyaltyPoints": "number",
"storeCredit": "number"
}

countries

Array of available countries.

{% for country in countries %}
{{ country.code }}
{{ country.name }}
{% endfor %}

states

Object of states by country code.

{{ states.US }}  <!-- Array of US states -->

Order Objects

order

Single order object (available on order detail pages).

{{ order.id }}                   <!-- Order ID -->
{{ order.orderNumber }} <!-- Order number -->
{{ order.status }} <!-- Order status -->
{{ order.items }} <!-- Order items -->
{{ order.total }} <!-- Order total -->
{{ order.subtotal }} <!-- Order subtotal -->
{{ order.tax }} <!-- Tax amount -->
{{ order.shipping }} <!-- Shipping amount -->
{{ order.createdAt }} <!-- Created date -->
{{ order.shippingAddress }} <!-- Shipping address -->
{{ order.billingAddress }} <!-- Billing address -->

orders

Array of orders (available on orders listing pages).

{% for order in orders %}
{{ order.orderNumber }}
{{ order.total }}
{% endfor %}

Account Objects

addresses

Array of customer addresses.

{% for address in addresses %}
{{ address.firstName }}
{{ address.lastName }}
{{ address.address1 }}
{{ address.city }}
{{ address.state }}
{{ address.zip }}
{{ address.country }}
{% endfor %}

Search Objects

Search results object.

{{ search.query }}               <!-- Search query -->
{{ search.results }} <!-- Search results object -->
{{ search.results.products }} <!-- Products array -->
{{ search.results.total }} <!-- Total results -->
{{ search.results_count }} <!-- Total count -->
{{ search.page }} <!-- Current page -->
{{ search.limit }} <!-- Results per page -->

Widget Objects

widgets

Organized widgets by section.

{{ widgets.hero }}               <!-- Hero section widgets -->
{{ widgets.categories }} <!-- Categories section widgets -->
{{ widgets.products }} <!-- Products section widgets -->
{{ widgets.footer }} <!-- Footer section widgets -->
{{ widgets.content }} <!-- Content section widgets -->
{{ widgets.sidebar }} <!-- Sidebar section widgets -->

Widget Structure:

{
"id": "string",
"type": "string",
"settings": {},
"data": {}
}

Example:

{% for widget in widgets.hero %}
{{ widget | render_widget }}
{% endfor %}

Section Objects

section

Current section information (available in section templates).

{{ section.id }}                 <!-- Section ID -->
{{ section.name }} <!-- Section name -->
{{ section.settings }} <!-- Section settings -->

Form Objects

form

Form state and errors (available on form pages).

{{ form.errors }}                <!-- Array of error messages -->
{{ form.email }} <!-- Email value (for login forms) -->

Pagination Object

pagination

Pagination information.

{{ pagination.currentPage }}     <!-- Current page number -->
{{ pagination.itemsPerPage }} <!-- Items per page -->
{{ pagination.totalItems }} <!-- Total items -->
{{ pagination.totalPages }} <!-- Total pages -->
{{ pagination.hasNext }} <!-- Has next page -->
{{ pagination.hasPrevious }} <!-- Has previous page -->

Current Query Object

currentQuery

Current URL query parameters.

{{ currentQuery.page }}          <!-- Page parameter -->
{{ currentQuery.sort }} <!-- Sort parameter -->
{{ currentQuery.category }} <!-- Category parameter -->

Common Patterns

Checking if Object Exists

{% if product %}
{{ product.name }}
{% endif %}

{% if customer %}
Welcome, {{ customer.firstName }}!
{% else %}
<a href="/customers/login">Login</a>
{% endif %}

Looping Through Arrays

{% for product in products %}
<div class="product">
{{ product.name }}
</div>
{% endfor %}

Accessing Nested Properties

{{ product.prices.price }}
{{ shop.settings.currencySymbol }}
{{ checkout.shippingAddress.city }}

Using Default Values

{{ product.name | default: "Untitled Product" }}
{{ product.description | default: "No description available" }}

Object Availability by Page Type

ObjectHomeProductsProduct DetailCartCheckoutAccountSearch
shop
store
tenant
settings
menus
customer
product
products
collection
collections
cart
checkout
order
orders
search
widgets