Schema Liquid Variables

Reference for all Liquid objects and properties available inside Adsgun discount schema templates. These variables are resolved at render time and give you access to product, variant, promotion, cart, and line item data.

product

The product object represents a Shopify product. Use it in schema templates to access product-level data such as pricing, images, and metadata.

product.id · number

The unique numeric ID of the product.

product.title · string

The product title (e.g. "Blush Whisper Dress").

product.handle · string

The URL-friendly slug used in product URLs.

product.vendor · string

The brand or vendor name.

product.description · string

Product description as raw HTML.

product.type · string

The product type label.

product.price · number

Lowest variant price in the currency's subunit (cents).

This value is the same as price_min. All prices are in subunits — for example, 14900 represents $149.00 USD.
💡 Use the money filter to output a formatted price: {{ product.price | money }}
product.price_min · number

The lowest price of any variant in subunits.

product.price_max · number

The highest price of any variant in subunits.

product.compare_at_price · number

The original compare-at price in subunits.

product.compare_at_price_min · number

Lowest compare-at price across variants.

product.compare_at_price_max · number

Highest compare-at price across variants.

product.available · boolean

Returns true if any variant is available for purchase.

product.featured_image · string

URL of the product's featured image.

product.images · array of string

All product image URLs.

product.options · array of string

The option names, e.g. ["Color", "Size"].

product.variants · array of variant

All variants of the product.

product.tags · array of string

Tags assigned to the product.

variant

The variant object represents a single product variant. Each product has one or more variants defined by option combinations.

variant.id · number

The unique numeric ID of the variant.

variant.title · string

Full variant title, e.g. "Blush Pink / 4-5 Years (110cm)".

variant.option1 · string

Value of the first option.

variant.option2 · string

Value of the second option.

variant.option3 · string

Value of the third option, or null.

variant.sku · string

The variant SKU.

variant.price · number

Variant price in subunits.

💡 Use the money filter: {{ variant.price | money }}
variant.compare_at_price · number

Compare-at price in subunits, or null.

variant.available · boolean

Whether this variant is available for purchase.

variant.inventory_quantity · number

Current inventory count.

variant.requires_shipping · boolean

Whether this variant requires shipping.

promotion

The promotion object contains data about the currently active Adsgun promotion, including discount codes and status.

promotion.title.value · string

The promotion title and code label, e.g. "ADSGUNTESTINGSDISC".

promotion.status · string

Either "active" or "inactive".

promotion.offer.codes · array of string

List of discount codes attached to this promotion.

promotion.offer.codesData · object

Full discount node data keyed by code string.

Each key is a discount code string. The value contains the full Shopify DiscountCodeNode data including status, usage count, customer selection, and discount value.

cart

The cart object represents the current Shopify cart state, including totals, discounts, and Adsgun-specific attributes.

cart.total_price · number

Final cart total after discounts, in subunits.

💡 Use the money filter: {{ cart.total_price | money }}
cart.original_total_price · number

Cart total before any discounts, in subunits.

cart.total_discount · number

Total discount amount applied, in subunits.

cart.item_count · number

Total number of items in the cart.

cart.currency · string

ISO currency code, e.g. "USD".

cart.items · array of line_item

All line items in the cart.

cart.attributes._adsguncode · string

The Adsgun discount code applied to this cart.

line_item

A line_item represents a single item in the cart, including its product info, pricing breakdown, and discount details.

line_item.id · number

Unique line item ID.

line_item.title · string

Full item title including variant name.

line_item.product_title · string

Product name only.

line_item.variant_title · string

Variant name only.

line_item.price · number

Unit price in subunits.

line_item.original_price · number

Original unit price before discount.

line_item.discounted_price · number

Price per unit after discount.

line_item.line_price · number

Total line price (price × quantity).

line_item.total_discount · number

Total discount applied to this line.

line_item.quantity · number

Quantity of this item in the cart.

line_item.sku · string

Variant SKU.

line_item.vendor · string

Product vendor name.

line_item.handle · string

Product URL handle.

line_item.url · string

Full product URL with variant query param.

line_item.image · string

Featured image URL for this line item.

line_item.requires_shipping · boolean

Whether this item requires shipping.