Etch and custom themes
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
[ivasure results_target=".my-own-grid" results_fetch_mode="document"]| Setting | Does |
|---|---|
results_target | Names 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
- Build your grid with an Etch Loop element on the SureCart Products preset.
- Give the loop wrapper a class of your own.
- Place the filter with that class as
results_targetand 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
| Symptom | Cause |
|---|---|
| URL changes, products do not | The target matches nothing. Check the class on the element, not the one you meant to add. |
| Your card design is replaced by generic markup | Document mode is off, so IvaSure rendered its own results. |
| Pagination stops working | The 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.
Was this page helpful?
Thanks for your feedback.
There was a problem submitting your feedback. Please try again later.