Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt

Use this file to discover all available pages before exploring further.

Global Objects

Global objects are available in every template. They provide access to store data, cart contents, customer information, and more.

shop

The store’s settings and information.
{{ shop.name }}
{{ shop.email }}
{{ shop.currency.iso_code }}
PropertyTypeDescription
shop.namestringStore name
shop.emailstringStore contact email
shop.phonestringStore phone number
shop.descriptionstringStore description
shop.domainstringPrimary domain
shop.permanent_domainstring.launchmystore.io subdomain
shop.urlstringFull store URL
shop.currencyobjectDefault currency (iso_code, symbol, name)
shop.enabled_currenciesarrayList of enabled currency codes
shop.money_formatstringPrice format template
shop.money_with_currency_formatstringPrice format with currency
shop.localestringDefault locale code
shop.published_localesarrayAvailable locales
shop.products_countnumberTotal products
shop.collections_countnumberTotal collections
shop.vendorsarrayList of vendor names
shop.typesarrayList of product types
shop.customer_accounts_enabledbooleanCustomer accounts enabled
shop.customer_accounts_optionalbooleanAccounts optional (not required)
shop.accepts_gift_cardsbooleanGift cards enabled
shop.addressobjectStore address
shop.enabled_payment_typesarrayPayment methods (visa, mastercard, etc.)
shop.brandobjectBrand settings (colors, logo)
shop.policiesarrayLegal policies
shop.metafieldsobjectCustom metafields

product

Available on product pages. Contains all product data.
{{ product.title }}
{{ product.price | money }}
{% for variant in product.variants %}
  {{ variant.title }} - {{ variant.price | money }}
{% endfor %}
PropertyTypeDescription
product.idstringProduct ID
product.titlestringProduct name
product.handlestringURL-safe handle
product.descriptionstringHTML description
product.pricenumberCurrent price
product.compare_at_pricenumberOriginal price (if on sale)
product.availablebooleanIn stock
product.vendorstringVendor/brand name
product.typestringProduct type
product.tagsarrayProduct tags
product.imagesarrayAll product images
product.featured_imageobjectMain image
product.variantsarrayProduct variants
product.optionsarrayOption names (Size, Color, etc.)
product.options_with_valuesarrayOptions with all values
product.selected_variantobjectCurrently selected variant
product.selected_or_first_available_variantobjectSelected or first available
product.price_minnumberLowest variant price
product.price_maxnumberHighest variant price
product.price_variesbooleanHas price range
product.urlstringProduct URL
product.collectionsarrayAssociated collections
product.metafieldsobjectCustom metafields

Variant Object

{% assign variant = product.selected_or_first_available_variant %}
{{ variant.title }}
{{ variant.sku }}
{{ variant.price | money }}
PropertyTypeDescription
variant.idstringVariant ID
variant.titlestringVariant title
variant.pricenumberVariant price
variant.compare_at_pricenumberCompare at price
variant.availablebooleanIn stock
variant.skustringSKU
variant.barcodestringBarcode
variant.weightnumberWeight value
variant.weight_unitstringWeight unit (kg, lb, etc.)
variant.option1stringFirst option value
variant.option2stringSecond option value
variant.option3stringThird option value
variant.optionsarrayAll option values
variant.imageobjectVariant-specific image
variant.inventory_quantitynumberStock quantity
variant.inventory_policystringcontinue or deny
variant.requires_shippingbooleanPhysical product
variant.metafieldsobjectCustom metafields

collection

Available on collection pages. Contains collection data and products.
<h1>{{ collection.title }}</h1>
<p>{{ collection.products_count }} products</p>

{% for product in collection.products %}
  {{ product.title }}
{% endfor %}
PropertyTypeDescription
collection.idstringCollection ID
collection.titlestringCollection name
collection.handlestringURL-safe handle
collection.descriptionstringHTML description
collection.imageobjectCollection image
collection.productsarrayProducts in collection
collection.products_countnumberTotal products
collection.all_products_countnumberProducts (ignoring filters)
collection.urlstringCollection URL
collection.filtersarrayAvailable filters
collection.sort_optionsarraySort options
collection.sort_bystringCurrent sort
collection.default_sort_bystringDefault sort
collection.metafieldsobjectCustom metafields

Filters

{% for filter in collection.filters %}
  <div class="filter">
    <h4>{{ filter.label }}</h4>
    {% for value in filter.values %}
      <label>
        <input type="checkbox" 
               name="{{ filter.param_name }}" 
               value="{{ value.value }}"
               {% if value.active %}checked{% endif %}>
        {{ value.label }} ({{ value.count }})
      </label>
    {% endfor %}
  </div>
{% endfor %}
PropertyTypeDescription
filter.idstringFilter ID
filter.labelstringDisplay label
filter.typestringboolean, list, price_range
filter.param_namestringURL parameter name
filter.valuesarrayFilter values
filter.active_valuesarrayCurrently selected values

cart

The customer’s shopping cart.
{% if cart.item_count > 0 %}
  {% for item in cart.items %}
    {{ item.title }} x {{ item.quantity }}
  {% endfor %}
  <strong>Total: {{ cart.total_price | money }}</strong>
{% else %}
  Your cart is empty
{% endif %}
PropertyTypeDescription
cart.tokenstringCart ID/token
cart.item_countnumberTotal items
cart.itemsarrayLine items
cart.total_pricenumberCart total
cart.total_weightnumberTotal weight
cart.currencyobjectCart currency
cart.notestringOrder notes
cart.attributesobjectCart attributes
cart.empty?booleanIs cart empty
cart.requires_shippingbooleanHas physical items

Line Item Object

PropertyTypeDescription
item.idstringLine item ID
item.product_idstringProduct ID
item.variant_idstringVariant ID
item.productobjectFull product object
item.titlestringFull title (product + variant)
item.product_titlestringProduct title only
item.variant_titlestringVariant title only
item.quantitynumberQuantity
item.pricenumberUnit price
item.line_pricenumberTotal (price x quantity)
item.original_pricenumberPrice before discounts
item.original_line_pricenumberLine total before discounts
item.skustringSKU
item.imageobjectLine item image
item.urlstringProduct URL with variant
item.propertiesobjectCustom properties
item.options_with_valuesarraySelected options

customer

Available when a customer is logged in.
{% if customer %}
  Welcome back, {{ customer.first_name }}!
  You've placed {{ customer.orders_count }} orders.
{% else %}
  <a href="/account/login">Log in</a>
{% endif %}
PropertyTypeDescription
customer.idstringCustomer ID
customer.emailstringEmail address
customer.first_namestringFirst name
customer.last_namestringLast name
customer.namestringFull name
customer.phonestringPhone number
customer.accepts_marketingbooleanMarketing opt-in
customer.orders_countnumberTotal orders
customer.total_spentnumberLifetime value
customer.ordersarrayOrder history
customer.default_addressobjectDefault address
customer.addressesarrayAll addresses
customer.tagsarrayCustomer tags
customer.created_attimestampAccount created
customer.metafieldsobjectCustom metafields

article

Available on blog article pages.
<article>
  <h1>{{ article.title }}</h1>
  <p>By {{ article.author }} on {{ article.published_at | date: '%B %d, %Y' }}</p>
  {{ article.content }}
</article>
PropertyTypeDescription
article.idstringArticle ID
article.titlestringArticle title
article.handlestringURL handle
article.authorstringAuthor name
article.contentstringHTML content
article.excerptstringArticle excerpt
article.excerpt_or_contentstringExcerpt or truncated content
article.imageobjectFeatured image
article.published_attimestampPublish date
article.updated_attimestampLast updated
article.tagsarrayArticle tags
article.urlstringArticle URL
article.blogobjectParent blog
article.comments_countnumberComment count
article.commentsarrayComments
article.comments_enabled?booleanComments enabled
article.metafieldsobjectCustom metafields

blog

Available on blog listing pages.
PropertyTypeDescription
blog.idstringBlog ID
blog.titlestringBlog title
blog.handlestringURL handle
blog.urlstringBlog URL
blog.articlesarrayBlog articles
blog.articles_countnumberTotal articles
blog.all_tagsarrayAll article tags
blog.tagsarrayTags in current view
blog.comments_enabled?booleanComments enabled
blog.metafieldsobjectCustom metafields

page

Available on custom pages.
PropertyTypeDescription
page.idstringPage ID
page.titlestringPage title
page.handlestringURL handle
page.contentstringHTML content
page.urlstringPage URL
page.authorstringAuthor
page.template_suffixstringTemplate variant
page.metafieldsobjectCustom metafields

Available on search results pages.
{% if search.performed %}
  <p>{{ search.results_count }} results for "{{ search.terms }}"</p>
  
  {% for result in search.results %}
    {% if result.object_type == 'product' %}
      {{ result.title }} - {{ result.price | money }}
    {% elsif result.object_type == 'article' %}
      {{ result.title }} - {{ result.published_at | date: '%B %d' }}
    {% endif %}
  {% endfor %}
{% endif %}
PropertyTypeDescription
search.performedbooleanSearch was executed
search.termsstringSearch query
search.resultsarraySearch results
search.results_countnumberTotal results
search.typesarrayResult types to include

linklists

Navigation menus defined in the theme.
{% for link in linklists.main-menu.links %}
  <a href="{{ link.url }}">{{ link.title }}</a>
  
  {% if link.links.size > 0 %}
    <ul>
      {% for child in link.links %}
        <li><a href="{{ child.url }}">{{ child.title }}</a></li>
      {% endfor %}
    </ul>
  {% endif %}
{% endfor %}
PropertyTypeDescription
linklist.handlestringMenu handle
linklist.titlestringMenu title
linklist.linksarrayTop-level links
linklist.levelsnumberNesting depth
PropertyTypeDescription
link.titlestringLink text
link.urlstringLink URL
link.activebooleanCurrent page
link.child_activebooleanChild is current page
link.currentbooleanExact match
link.linksarrayChild links
link.levelsnumberChild depth
link.typestringLink type
link.objectobjectLinked object (product, collection, etc.)

settings

Theme settings from config/settings_data.json.
<style>
  :root {
    --color-primary: {{ settings.color_primary }};
    --font-body: {{ settings.type_body_font | font_property: 'family' }};
  }
</style>

{% if settings.show_announcement_bar %}
  <div class="announcement">{{ settings.announcement_text }}</div>
{% endif %}
Settings are defined in config/settings_schema.json and accessed via settings.{setting_id}.

request

Information about the current request.
PropertyTypeDescription
request.hoststringCurrent domain
request.originstringFull origin URL
request.pathstringURL path
request.page_typestringTemplate type
request.design_modebooleanIn theme editor
request.localeobjectCurrent locale

localization

Country, currency, and language settings.
<select name="country">
  {% for country in localization.available_countries %}
    <option value="{{ country.iso_code }}" 
            {% if country == localization.country %}selected{% endif %}>
      {{ country.name }} ({{ country.currency.iso_code }})
    </option>
  {% endfor %}
</select>
PropertyTypeDescription
localization.available_countriesarrayEnabled countries
localization.available_languagesarrayEnabled languages
localization.countryobjectCurrent country
localization.languageobjectCurrent language
localization.marketobjectCurrent market

recommendations

Product recommendations (on product pages).
{% if recommendations.products.size > 0 %}
  <h2>You may also like</h2>
  {% for product in recommendations.products %}
    {% render 'product-card', product: product %}
  {% endfor %}
{% endif %}
PropertyTypeDescription
recommendations.productsarrayRecommended products
recommendations.products_countnumberNumber of recommendations
recommendations.performed?booleanRecommendations loaded
recommendations.intentstringrelated, complementary

Other Objects

template

{% if template == 'product' %}
  Product page specific content
{% endif %}

{{ template.name }}
{{ template.suffix }}

section

Access current section data within a section file.
<section id="{{ section.id }}" class="{{ section.settings.custom_class }}">
  {% for block in section.blocks %}
    {{ block.settings.title }}
  {% endfor %}
</section>

block

Access current block data within a block iteration.
{% for block in section.blocks %}
  <div {{ block.lms_attributes }}>
    {{ block.settings.heading }}
  </div>
{% endfor %}

form

Available inside {% form %} tags.
{% form 'contact' %}
  {{ form.errors | default_errors }}
  {{ form.posted_successfully? }}
{% endform %}

paginate

Available inside {% paginate %} blocks.
{% paginate collection.products by 12 %}
  {{ paginate.pages }}
  {{ paginate.current_page }}
  {{ paginate.previous.url }}
  {{ paginate.next.url }}
{% endpaginate %}