Skip to content
IvaSure add-ons and services for SureCart storesJoin the POD waitlist

Etch and custom themes

2 min read
Published

A filter has to put results somewhere. When the grid is SureCart’s own, IvaSure knows how to rebuild it. When the grid is yours - an Etch loop, a custom template, a hand-built layout - it does not, and it should not pretend to.

That is what document fetch mode is for.

The two settings

Filter a grid the filter did not create
[ivasure results_target=".my-own-grid" results_fetch_mode="document"]
SettingDoes
results_targetNames the element to replace. Use the class actually on your grid wrapper.
results_fetch_mode="document"Fetches the filtered page and lifts your grid out of it, instead of rendering markup IvaSure would have to invent.
Document mode is why your card design survives
The server renders the filtered page exactly as it would for a normal visit - your loop, your classes, your card markup - and the client swaps that in. Nothing about your design has to be described to IvaSure in advance.

With Etch specifically

  1. Build your grid with an Etch Loop element on the SureCart Products preset.
  2. Give the loop wrapper a class of your own.
  3. Place the filter with that class as results_target and document fetch mode on.

The free Etch compatibility add-on supplies the loop preset and the product fields, and its Layouts tab can create a Shop with filters page - the same arrangement, already wired - if you would rather start from a working example.

Merchandising pins work here too
Pinned products still rank first inside a filtered view, whoever rendered the grid.

What goes wrong

SymptomCause
URL changes, products do notThe target matches nothing. Check the class on the element, not the one you meant to add.
Your card design is replaced by generic markupDocument mode is off, so IvaSure rendered its own results.
Pagination stops workingThe pager is outside the target, so it never gets replaced. Put it inside the element you are swapping.
A target that matches nothing fails silently
There is no error and no warning - the filter simply has nowhere to put the results. That is why it is the first thing to check and not the last.

Save to list