> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.app-hive.dev/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How can I track Globo Product options in my quote requests?

This script automatically captures custom line item properties (from apps like Globo Product Options, Infinite Options, or any app that uses Shopify's `properties[...]` field naming convention) and passes them into Quotify when a quote is requested.

**Step 1 — Open the theme code editor**
In your Shopify admin, go to **Online Store → Themes**, click the three-dot menu on your active theme, and select **Edit code**.

**Step 2 — Create a new snippet**
In the left sidebar under **Snippets**, click **Add a new snippet**. Name it `quotify-properties` and click Create. Shopify will create a file called `quotify-properties.liquid`.

**Step 3 — Paste the code**
Replace the empty file contents with:
```
{% comment %}
  Syncs custom line item properties (from product option apps)
  into Quotify so they appear on quote requests.
{% endcomment %}

<script>
(function () {
  'use strict';

  function humanizeName(name) {
    return String(name || '').trim()
      .replace(/^_+/, '')
      .replace(/[-_\s]+/g, ' ')
      .replace(/\b\w/g, c => c.toUpperCase());
  }

  function getProperties() {
    var properties = {};

    document.querySelectorAll('[name^="properties["]').forEach(function (field) {
      var match = field.name.match(/^properties\[([^_][^\]]*)\]$/);
      if (!match) return;

      var name = humanizeName(match[1]);
      var type = (field.type || '').toLowerCase();
      var value;

      if ((type === 'checkbox' || type === 'radio') && !field.checked) return;

      if (type === 'file') {
        value = field.files.length
          ? Array.from(field.files, f => f.name)
          : null;
      } else if (field.tagName === 'SELECT' && field.multiple) {
        value = Array.from(field.selectedOptions, o => o.value);
      } else {
        value = field.value;
      }

      if (value == null || value === '' || (Array.isArray(value) && !value.length)) return;

      if (name in properties) {
        properties[name] = [].concat(properties[name], value);
      } else {
        properties[name] = value;
      }
    });

    return properties;
  }

  function syncToQuotify() {
    window.Quotify = window.Quotify || {};
    window.Quotify.properties = getProperties();
  }

  document.addEventListener('gpoValidated', syncToQuotify);
  syncToQuotify();
})();
</script>
```

Click **Save**.

**Step 4 — Include the snippet in your product template**
Still in the code editor, open your product template. This is typically one of these files (depending on your theme): `sections/main-product.liquid`, `sections/product-template.liquid`, or `templates/product.liquid`.

Add this line at the very bottom of the file:

```
{% render 'quotify-properties' %}
```

**Notes:**
Properties prefixed with an underscore (like `_hidden_field`) are intentionally excluded — these are typically internal tracking fields that shouldn't appear on a quote. Empty values and unchecked checkboxes/radios are also filtered out automatically. The script runs once on page load and again each time the `gpoValidated` event fires, so it stays in sync with apps like Globo Product Options that validate fields dynamically.