> ## 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

> objects available in all templates

# 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.

```aqua theme={null}
{{ shop.name }}
{{ shop.email }}
{{ shop.currency.iso_code }}
```

| Property                          | Type    | Description                                     |
| --------------------------------- | ------- | ----------------------------------------------- |
| `shop.name`                       | string  | Store name                                      |
| `shop.email`                      | string  | Store contact email                             |
| `shop.phone`                      | string  | Store phone number                              |
| `shop.description`                | string  | Store description                               |
| `shop.domain`                     | string  | Primary domain                                  |
| `shop.permanent_domain`           | string  | `.launchmystore.io` subdomain                   |
| `shop.url`                        | string  | Full store URL                                  |
| `shop.currency`                   | object  | Default currency (`iso_code`, `symbol`, `name`) |
| `shop.enabled_currencies`         | array   | List of enabled currency codes                  |
| `shop.money_format`               | string  | Price format template                           |
| `shop.money_with_currency_format` | string  | Price format with currency                      |
| `shop.locale`                     | string  | Default locale code                             |
| `shop.published_locales`          | array   | Available locales                               |
| `shop.products_count`             | number  | Total products                                  |
| `shop.collections_count`          | number  | Total collections                               |
| `shop.vendors`                    | array   | List of vendor names                            |
| `shop.types`                      | array   | List of product types                           |
| `shop.customer_accounts_enabled`  | boolean | Customer accounts enabled                       |
| `shop.customer_accounts_optional` | boolean | Accounts optional (not required)                |
| `shop.accepts_gift_cards`         | boolean | Gift cards enabled                              |
| `shop.address`                    | object  | Store address                                   |
| `shop.enabled_payment_types`      | array   | Payment methods (visa, mastercard, etc.)        |
| `shop.brand`                      | object  | Brand settings (colors, logo)                   |
| `shop.policies`                   | array   | Legal policies                                  |
| `shop.metafields`                 | object  | Custom metafields                               |

***

## product

Available on product pages. Contains all product data.

```aqua theme={null}
{{ product.title }}
{{ product.price | money }}
{% for variant in product.variants %}
  {{ variant.title }} - {{ variant.price | money }}
{% endfor %}
```

| Property                                      | Type    | Description                      |
| --------------------------------------------- | ------- | -------------------------------- |
| `product.id`                                  | string  | Product ID                       |
| `product.title`                               | string  | Product name                     |
| `product.handle`                              | string  | URL-safe handle                  |
| `product.description`                         | string  | HTML description                 |
| `product.price`                               | number  | Current price                    |
| `product.compare_at_price`                    | number  | Original price (if on sale)      |
| `product.available`                           | boolean | In stock                         |
| `product.vendor`                              | string  | Vendor/brand name                |
| `product.type`                                | string  | Product type                     |
| `product.tags`                                | array   | Product tags                     |
| `product.images`                              | array   | All product images               |
| `product.featured_image`                      | object  | Main image                       |
| `product.variants`                            | array   | Product variants                 |
| `product.options`                             | array   | Option names (Size, Color, etc.) |
| `product.options_with_values`                 | array   | Options with all values          |
| `product.selected_variant`                    | object  | Currently selected variant       |
| `product.selected_or_first_available_variant` | object  | Selected or first available      |
| `product.price_min`                           | number  | Lowest variant price             |
| `product.price_max`                           | number  | Highest variant price            |
| `product.price_varies`                        | boolean | Has price range                  |
| `product.url`                                 | string  | Product URL                      |
| `product.collections`                         | array   | Associated collections           |
| `product.metafields`                          | object  | Custom metafields                |

### Variant Object

```aqua theme={null}
{% assign variant = product.selected_or_first_available_variant %}
{{ variant.title }}
{{ variant.sku }}
{{ variant.price | money }}
```

| Property                     | Type    | Description                |
| ---------------------------- | ------- | -------------------------- |
| `variant.id`                 | string  | Variant ID                 |
| `variant.title`              | string  | Variant title              |
| `variant.price`              | number  | Variant price              |
| `variant.compare_at_price`   | number  | Compare at price           |
| `variant.available`          | boolean | In stock                   |
| `variant.sku`                | string  | SKU                        |
| `variant.barcode`            | string  | Barcode                    |
| `variant.weight`             | number  | Weight value               |
| `variant.weight_unit`        | string  | Weight unit (kg, lb, etc.) |
| `variant.option1`            | string  | First option value         |
| `variant.option2`            | string  | Second option value        |
| `variant.option3`            | string  | Third option value         |
| `variant.options`            | array   | All option values          |
| `variant.image`              | object  | Variant-specific image     |
| `variant.inventory_quantity` | number  | Stock quantity             |
| `variant.inventory_policy`   | string  | continue or deny           |
| `variant.requires_shipping`  | boolean | Physical product           |
| `variant.metafields`         | object  | Custom metafields          |

### Option & Option-Value Objects

`product.options_with_values` is an array of **option** objects, and each
option's `values` array holds **option-value** objects (the per-choice items a
variant picker renders).

```aqua theme={null}
{% for option in product.options_with_values %}
  <fieldset>
    <legend>{{ option.name }}</legend>   {# e.g. "Pack size" #}
    {% for option_value in option.values %}
      {# Both .name and .value are the human label, e.g. "6-Pack" #}
      <label class="{% if option_value.selected %}is-selected{% endif %}">
        {{ option_value.name }}
      </label>
    {% endfor %}
  </fieldset>
{% endfor %}
```

**Option object** (`product.options_with_values[]`):

| Property                | Type   | Description                           |
| ----------------------- | ------ | ------------------------------------- |
| `option.name`           | string | Option name, e.g. `Size`, `Pack size` |
| `option.position`       | number | 1-based option position               |
| `option.values`         | array  | The option-value objects below        |
| `option.selected_value` | string | The currently selected value's label  |

**Option-value object** (`option.values[]`):

| Property                   | Type    | Description                                                |
| -------------------------- | ------- | ---------------------------------------------------------- |
| `option_value.name`        | string  | Human-readable label, e.g. `6-Pack`. Same as `value`.      |
| `option_value.value`       | string  | Human-readable label, e.g. `6-Pack` (alias of `name`).     |
| `option_value.selected`    | boolean | Whether this value is the selected one                     |
| `option_value.available`   | boolean | Whether a variant with this value is in stock              |
| `option_value.id`          | number  | Internal numeric id (not a label — don't display)          |
| `option_value.product_url` | string  | Product URL for this value                                 |
| `option_value.variant`     | object  | First variant carrying this value (has `.id`, `.title`, …) |

<Note>
  Use `{{ option_value.name }}` (or `{{ option_value.value }}`, or just
  `{{ option_value }}`) for the **label** — all three yield `6-Pack`.
  `option_value.id` is an internal numeric identifier, not a display value.
</Note>

***

## collection

Available on collection pages. Contains collection data and products.

```aqua theme={null}
<h1>{{ collection.title }}</h1>
<p>{{ collection.products_count }} products</p>

{% for product in collection.products %}
  {{ product.title }}
{% endfor %}
```

| Property                        | Type   | Description                 |
| ------------------------------- | ------ | --------------------------- |
| `collection.id`                 | string | Collection ID               |
| `collection.title`              | string | Collection name             |
| `collection.handle`             | string | URL-safe handle             |
| `collection.description`        | string | HTML description            |
| `collection.image`              | object | Collection image            |
| `collection.products`           | array  | Products in collection      |
| `collection.products_count`     | number | Total products              |
| `collection.all_products_count` | number | Products (ignoring filters) |
| `collection.url`                | string | Collection URL              |
| `collection.filters`            | array  | Available filters           |
| `collection.sort_options`       | array  | Sort options                |
| `collection.sort_by`            | string | Current sort                |
| `collection.default_sort_by`    | string | Default sort                |
| `collection.metafields`         | object | Custom metafields           |

### Filters

```aqua theme={null}
{% 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 %}
```

| Property               | Type   | Description                 |
| ---------------------- | ------ | --------------------------- |
| `filter.id`            | string | Filter ID                   |
| `filter.label`         | string | Display label               |
| `filter.type`          | string | boolean, list, price\_range |
| `filter.param_name`    | string | URL parameter name          |
| `filter.values`        | array  | Filter values               |
| `filter.active_values` | array  | Currently selected values   |

***

## cart

The customer's shopping cart.

```aqua theme={null}
{% 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 %}
```

| Property                 | Type    | Description        |
| ------------------------ | ------- | ------------------ |
| `cart.token`             | string  | Cart ID/token      |
| `cart.item_count`        | number  | Total items        |
| `cart.items`             | array   | Line items         |
| `cart.total_price`       | number  | Cart total         |
| `cart.total_weight`      | number  | Total weight       |
| `cart.currency`          | object  | Cart currency      |
| `cart.note`              | string  | Order notes        |
| `cart.attributes`        | object  | Cart attributes    |
| `cart.empty?`            | boolean | Is cart empty      |
| `cart.requires_shipping` | boolean | Has physical items |

### Line Item Object

| Property                   | Type   | Description                    |
| -------------------------- | ------ | ------------------------------ |
| `item.id`                  | string | Line item ID                   |
| `item.product_id`          | string | Product ID                     |
| `item.variant_id`          | string | Variant ID                     |
| `item.product`             | object | Full product object            |
| `item.title`               | string | Full title (product + variant) |
| `item.product_title`       | string | Product title only             |
| `item.variant_title`       | string | Variant title only             |
| `item.quantity`            | number | Quantity                       |
| `item.price`               | number | Unit price                     |
| `item.line_price`          | number | Total (price x quantity)       |
| `item.original_price`      | number | Price before discounts         |
| `item.original_line_price` | number | Line total before discounts    |
| `item.sku`                 | string | SKU                            |
| `item.image`               | object | Line item image                |
| `item.url`                 | string | Product URL with variant       |
| `item.properties`          | object | Custom properties              |
| `item.options_with_values` | array  | Selected options               |

***

## customer

Available when a customer is logged in.

```aqua theme={null}
{% if customer %}
  Welcome back, {{ customer.first_name }}!
  You've placed {{ customer.orders_count }} orders.
{% else %}
  <a href="/account/login">Log in</a>
{% endif %}
```

| Property                     | Type      | Description                                         |
| ---------------------------- | --------- | --------------------------------------------------- |
| `customer.id`                | string    | Customer ID                                         |
| `customer.email`             | string    | Email address                                       |
| `customer.first_name`        | string    | First name                                          |
| `customer.last_name`         | string    | Last name                                           |
| `customer.name`              | string    | Full name                                           |
| `customer.phone`             | string    | Phone number                                        |
| `customer.accepts_marketing` | boolean   | Marketing opt-in                                    |
| `customer.orders_count`      | number    | Total orders                                        |
| `customer.total_spent`       | number    | Lifetime value (minor units — pipe through `money`) |
| `customer.orders`            | array     | Order history                                       |
| `customer.default_address`   | object    | Default address                                     |
| `customer.addresses`         | array     | All addresses                                       |
| `customer.addresses_count`   | number    | Number of saved addresses                           |
| `customer.new_address`       | object    | Empty address stub for the address create form      |
| `customer.has_account`       | boolean   | Always `true` for logged-in customers               |
| `customer.tags`              | array     | Customer tags                                       |
| `customer.created_at`        | timestamp | Account created                                     |
| `customer.metafields`        | object    | Custom metafields                                   |

<Note>
  On theme-rendered account pages (`templates/customers/*`), `customer` is
  joined by the `order` and `address` objects. See
  [Theme Customer Accounts](/aqua/customer-accounts) for the full account
  object reference, routes, and forms.
</Note>

***

## article

Available on blog article pages.

```aqua theme={null}
<article>
  <h1>{{ article.title }}</h1>
  <p>By {{ article.author }} on {{ article.published_at | date: '%B %d, %Y' }}</p>
  {{ article.content }}
</article>
```

| Property                     | Type      | Description                  |
| ---------------------------- | --------- | ---------------------------- |
| `article.id`                 | string    | Article ID                   |
| `article.title`              | string    | Article title                |
| `article.handle`             | string    | URL handle                   |
| `article.author`             | string    | Author name                  |
| `article.content`            | string    | HTML content                 |
| `article.excerpt`            | string    | Article excerpt              |
| `article.excerpt_or_content` | string    | Excerpt or truncated content |
| `article.image`              | object    | Featured image               |
| `article.published_at`       | timestamp | Publish date                 |
| `article.updated_at`         | timestamp | Last updated                 |
| `article.tags`               | array     | Article tags                 |
| `article.url`                | string    | Article URL                  |
| `article.blog`               | object    | Parent blog                  |
| `article.comments_count`     | number    | Comment count                |
| `article.comments`           | array     | Comments                     |
| `article.comments_enabled?`  | boolean   | Comments enabled             |
| `article.metafields`         | object    | Custom metafields            |

***

## blog

Available on blog listing pages.

| Property                 | Type    | Description          |
| ------------------------ | ------- | -------------------- |
| `blog.id`                | string  | Blog ID              |
| `blog.title`             | string  | Blog title           |
| `blog.handle`            | string  | URL handle           |
| `blog.url`               | string  | Blog URL             |
| `blog.articles`          | array   | Blog articles        |
| `blog.articles_count`    | number  | Total articles       |
| `blog.all_tags`          | array   | All article tags     |
| `blog.tags`              | array   | Tags in current view |
| `blog.comments_enabled?` | boolean | Comments enabled     |
| `blog.metafields`        | object  | Custom metafields    |

***

## page

Available on custom pages.

| Property               | Type   | Description       |
| ---------------------- | ------ | ----------------- |
| `page.id`              | string | Page ID           |
| `page.title`           | string | Page title        |
| `page.handle`          | string | URL handle        |
| `page.content`         | string | HTML content      |
| `page.url`             | string | Page URL          |
| `page.author`          | string | Author            |
| `page.template_suffix` | string | Template variant  |
| `page.metafields`      | object | Custom metafields |

***

## search

Available on search results pages.

```aqua theme={null}
{% 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 %}
```

| Property               | Type    | Description             |
| ---------------------- | ------- | ----------------------- |
| `search.performed`     | boolean | Search was executed     |
| `search.terms`         | string  | Search query            |
| `search.results`       | array   | Search results          |
| `search.results_count` | number  | Total results           |
| `search.types`         | array   | Result types to include |

***

## linklists

Navigation menus defined in the theme.

```aqua theme={null}
{% 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 %}
```

| Property          | Type   | Description     |
| ----------------- | ------ | --------------- |
| `linklist.handle` | string | Menu handle     |
| `linklist.title`  | string | Menu title      |
| `linklist.links`  | array  | Top-level links |
| `linklist.levels` | number | Nesting depth   |

### Link Object

| Property            | Type    | Description                               |
| ------------------- | ------- | ----------------------------------------- |
| `link.title`        | string  | Link text                                 |
| `link.url`          | string  | Link URL                                  |
| `link.active`       | boolean | Current page                              |
| `link.child_active` | boolean | Child is current page                     |
| `link.current`      | boolean | Exact match                               |
| `link.links`        | array   | Child links                               |
| `link.levels`       | number  | Child depth                               |
| `link.type`         | string  | Link type                                 |
| `link.object`       | object  | Linked object (product, collection, etc.) |

***

## settings

Theme settings from `config/settings_data.json`.

```aqua theme={null}
<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.

| Property              | Type    | Description     |
| --------------------- | ------- | --------------- |
| `request.host`        | string  | Current domain  |
| `request.origin`      | string  | Full origin URL |
| `request.path`        | string  | URL path        |
| `request.page_type`   | string  | Template type   |
| `request.design_mode` | boolean | In theme editor |
| `request.locale`      | object  | Current locale  |

***

## localization

Country, currency, and language settings.

```aqua theme={null}
<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>
```

| Property                           | Type   | Description       |
| ---------------------------------- | ------ | ----------------- |
| `localization.available_countries` | array  | Enabled countries |
| `localization.available_languages` | array  | Enabled languages |
| `localization.country`             | object | Current country   |
| `localization.language`            | object | Current language  |
| `localization.market`              | object | Current market    |

***

## recommendations

Product recommendations (on product pages).

```aqua theme={null}
{% if recommendations.products.size > 0 %}
  <h2>You may also like</h2>
  {% for product in recommendations.products %}
    {% render 'product-card', product: product %}
  {% endfor %}
{% endif %}
```

| Property                         | Type    | Description               |
| -------------------------------- | ------- | ------------------------- |
| `recommendations.products`       | array   | Recommended products      |
| `recommendations.products_count` | number  | Number of recommendations |
| `recommendations.performed?`     | boolean | Recommendations loaded    |
| `recommendations.intent`         | string  | related, complementary    |

***

## Other Objects

### template

```aqua theme={null}
{% if template == 'product' %}
  Product page specific content
{% endif %}

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

### section

Access current section data within a section file.

```aqua theme={null}
<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.

```aqua theme={null}
{% for block in section.blocks %}
  <div {{ block.lms_attributes }}>
    {{ block.settings.heading }}
  </div>
{% endfor %}
```

### form

Available inside `{% form %}` tags.

```aqua theme={null}
{% form 'contact' %}
  {{ form.errors | default_errors }}
  {{ form.posted_successfully? }}
{% endform %}
```

### paginate

Available inside `{% paginate %}` blocks.

```aqua theme={null}
{% paginate collection.products by 12 %}
  {{ paginate.pages }}
  {{ paginate.current_page }}
  {{ paginate.previous.url }}
  {{ paginate.next.url }}
{% endpaginate %}
```
