Project portfolio Browse selected work

Shopify Plus Upgrade Monthly Fee Reduction + Up to $4800 Development Fee Credit - Exclusive WesWoo Offer

Developer modules / Collection selection and comparison

Collection selection and comparison

Define real distinctions before implementing filters, results and model comparison.

Real attribute filters and empty results

Generate controls from actual collection filter values, parameter names and counts. Preserve selections and validate apply/reset behavior before adding a mobile drawer.

Data and dependencies

  • Configured list/boolean filters.
  • Price ranges require their own min/max controls.

Interaction logic

  • Disable unselected values with no results.
  • Keep selected zero-result values removable and retain sorting.
Example code · snippets/ww-filters.liquid
Liquid · WESWOO
<form action="{{ collection.url }}" method="get">
  {% for filter in collection.filters %}
    {% if filter.type == 'list' or filter.type == 'boolean' %}
      <fieldset>
        <legend>{{ filter.label | escape }}</legend>
        {% for value in filter.values %}
          <label>
            <input type="checkbox" name="{{ value.param_name }}" value="{{ value.value | escape }}"
              {% if value.active %}checked{% endif %}
              {% if value.count == 0 and value.active == false %}disabled{% endif %}>
            {{ value.label | escape }} ({{ value.count }})
          </label>
        {% endfor %}
      </fieldset>
    {% endif %}
  {% endfor %}
  <input type="hidden" name="sort_by" value="{{ collection.sort_by | default: collection.default_sort_by }}">
  <button type="submit">Apply filters</button>
  <a href="{{ collection.url | escape }}">Clear all filters</a>
</form>
<p>{{ collection.products_count }} products</p>

Acceptance checks

  • Test positive, empty, combined and reset cases.
  • After reload, compare parameters, selections and results.

The fragment excludes price-range controls. Determine faceted-URL crawling separately; hiding parameters in the interface is insufficient.

Read it, integrate it, verify it

  1. Choose a module and confirm the data contract.
  2. Connect the fragment to the current theme or framework.
  3. Check real variants, markets and recovery states.

Examples target Shopify Online Store 2.0 themes. Headless has separate data and version boundaries. Integrate fragments with actual fields, theme components and locale files.

Architecture references

Original educational examples with Shopify documentation and pinned upstream references. Follow the applicable license when adopting repository code.

Shopify/dawn · Licensecommit 3e9ee2281dc4 · Shopify-integration theme license; architecture reference without copying the implementation.
Shopify/hydrogen · Licensecommit 9e358a2462ba · MIT; retain copyright and license when using substantial code.

References checked 2026-11-12