Skip to main content
This page is aimed at a merchant’s theme developer: the person editing the collection section and product card snippet of the Shopify theme.
Depict’s script needs to know three things about your collection page: where the product grid starts, where it ends, and which product each card belongs to. It reads all of this from the DOM, so the integration is a few small additions to your theme’s collection section and product card snippet.

1. Mark the start of the grid

As the first child of the product grid element (the element whose direct children are the product cards), add a <depict-grid-start-beacon> element. It carries the pagination state of the current page so Depict can place content cards and duplicates at the right positions.
Example rendered output:

2. Mark the end of the grid

As the last child of the product grid element (more precisely, as any element sibling that comes after the last product card), add:

3. Tag each product card

On an element inside the product card (the top element or any child), add the following data attributes.
Example rendered output:
The image attributes hold the media path exactly as Shopify returns it (for example files/Main_….jpg), not a full CDN URL. Use the variable name your card snippet already has for the product (product, card_product, and so on).