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.

Model differences and an HTML comparison

Choose dimensions from real use and compatibility questions, keep units and test conditions comparable, and link each model to its product page.

Data and dependencies

  • collection.custom.comparison_products: list.product_reference.
  • Keep product custom.key_spec consistent with source specifications.

Interaction logic

  • Show missing data as not supplied rather than zero.
  • Allow focused horizontal reading with table headers.
Example code · snippets/ww-comparison.liquid
Liquid · WESWOO
{% assign models = collection.metafields.custom.comparison_products.value %}
{% if models != blank %}
  <div class="ww-table-scroll" role="region" aria-label="Model comparison" tabindex="0">
    <table>
      <caption>Compare the models in this collection</caption>
      <thead><tr><th scope="col">Model</th><th scope="col">Use and key specification</th></tr></thead>
      <tbody>
        {% for model in models %}
          <tr>
            <th scope="row"><a href="{{ model.url | escape }}">{{ model.title | escape }}</a></th>
            <td>{{ model.metafields.custom.key_spec.value | default: 'Not supplied' | escape }}</td>
          </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>
{% endif %}

Example code · assets/ww-module-layout.css
CSS · WESWOO
.ww-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  list-style: none;
  padding: 0;
}
.ww-product-grid img { width: 100%; height: auto; }
.ww-product-grid h3 { overflow-wrap: anywhere; }
.ww-table-scroll { max-width: 100%; overflow-x: auto; }
.ww-table-scroll table { border-collapse: collapse; min-width: 30rem; }
.ww-table-scroll th, .ww-table-scroll td { padding: .75rem; text-align: start; }
@media (max-width: 749px) {
  .ww-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
}

Acceptance checks

  • Follow a real selection question to a model.
  • Check units, conditions and product links.

The example compares one dimension. Expand columns from the same field dictionary when needed.

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