Skip to content

Smart Collections Overview

Rebuy Smart Collections is a personalized collection merchandising solution. This module loads with Rebuy JS and requires a root div to attach to.

Setup

Add the Smart Collections root div to your collection page. You can add this via:

  • A custom block in the Shopify admin
  • The theme editor
  • Manually in your collection template code
<div
  id="rebuy-smart-collections"
  data-rebuy-shopify-collection-id="{{ collection.id }}"
  data-rebuy-app-block="true"
></div>

Attributes

id · string · Required
Must be rebuy-smart-collections for the module to attach.
data-rebuy-shopify-collection-id · string · Required
The Shopify collection ID. Use Liquid syntax {{ collection.id }} to dynamically populate.
data-rebuy-app-block · boolean
Set to true when adding the div via an app block. If adding directly to theme code, you must set this manually.

Features

Smart Collections provides:

  • Personalized sorting - Products ordered based on customer behavior
  • Filtering - Price range, availability, tags, vendors, product types, options, and metafields
  • Pagination - Traditional pagination, load more button, or infinite scroll
  • Custom templates - Full control over layout and styling with Vue.js templates

Custom Templates

Override the default Smart Collections layout with custom Vue.js templates:

Template Description
Dropdown Template Filters in a collapsible dropdown above products
Sidebar Template Filters in a persistent sidebar next to products

See Custom Templates Overview for implementation details.

Event Listeners

Track user interactions with Smart Collections events:

Event Fires When
rebuy:smartcollections.init Module initializes
rebuy:smartcollections.ready Fully initialized and rendered
rebuy:smartcollections.add Product added to cart
rebuy:smartcollections.view Product viewed
rebuy:smartcollections.productsChange Products update (filter/sort/page)

See Event Listeners for full documentation.

See something that needs updating? Suggest an edit