← back to Dw Theme Boost Fix
pagination user toggle: infinite default, switchable to pages of 100 (Steve verdict 2026-07-13)
965130f93848f1c079fd44a64765c4ffb74daebe · 2026-07-13 09:23:12 -0700 · Steve Abrams
Files touched
M snippets/boost-infinite-override.liquid
Diff
commit 965130f93848f1c079fd44a64765c4ffb74daebe
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon Jul 13 09:23:12 2026 -0700
pagination user toggle: infinite default, switchable to pages of 100 (Steve verdict 2026-07-13)
---
snippets/boost-infinite-override.liquid | 51 ++++++++++++++++++++++++++++++++-
1 file changed, 50 insertions(+), 1 deletion(-)
diff --git a/snippets/boost-infinite-override.liquid b/snippets/boost-infinite-override.liquid
index 3383e5c..0a81c2b 100644
--- a/snippets/boost-infinite-override.liquid
+++ b/snippets/boost-infinite-override.liquid
@@ -51,7 +51,15 @@
if (window.__dwBoostInfinite) return;
window.__dwBoostInfinite = true;
- var TARGET = 'infinite_scroll';
+ // USER PAGINATION CHOICE (DW, 2026-07-13 — Steve's verdict on customer
+ // pushback): infinite scroll stays the DEFAULT, but the shopper can switch
+ // to classic numbered pages of 100 via the floating toggle rendered below.
+ // Choice persists in localStorage and survives reloads/navigation.
+ var PAGED_LIMIT = 100;
+ var mode = 'infinite';
+ try { if (localStorage.getItem('dwPaginationMode') === 'paged') mode = 'paged'; } catch (e) {}
+
+ var TARGET = mode === 'paged' ? 'default' : 'infinite_scroll';
// Verified production Boost SD endpoints for this shop (2026-07-13).
var PROD_API = {
@@ -100,6 +108,16 @@
typeof o.pagination.paginationType === 'string') {
o.pagination.paginationType = TARGET;
}
+ // Paged mode: bump the grid's per-page product count to 100. Only keys
+ // that sit next to a pagination knob are touched — searchPanelBlocks'
+ // pageSize (the instant-search dropdown, 25 items) must stay untouched.
+ if (mode === 'paged' &&
+ (Object.prototype.hasOwnProperty.call(o, 'paginationType') ||
+ (o.pagination && typeof o.pagination === 'object'))) {
+ ['limit', 'productPerPage', 'productsPerPage'].forEach(function (k) {
+ if (typeof o[k] === 'number' && o[k] > 0 && o[k] < PAGED_LIMIT) o[k] = PAGED_LIMIT;
+ });
+ }
} catch (e) {}
for (var k in o) {
if (!Object.prototype.hasOwnProperty.call(o, k)) continue;
@@ -147,5 +165,36 @@
try { if (window.boostSDAppConfig) patchConfig(window.boostSDAppConfig); } catch (e) {}
if (ticks > 80) clearInterval(iv); // ~8s @ 100ms, well past Boost init
}, 100);
+
+ {% if request.page_type == 'collection' or request.page_type == 'search' %}
+ // Floating browse-mode toggle (collection + search grids only).
+ document.addEventListener('DOMContentLoaded', function () {
+ if (document.getElementById('dw-page-mode')) return;
+ var wrap = document.createElement('div');
+ wrap.id = 'dw-page-mode';
+ wrap.setAttribute('role', 'group');
+ wrap.setAttribute('aria-label', 'Browsing mode');
+ wrap.style.cssText = 'position:fixed;bottom:18px;left:18px;z-index:9990;display:flex;' +
+ 'background:#fff;border:1px solid #d8d4cc;border-radius:999px;box-shadow:0 2px 10px rgba(0,0,0,.12);' +
+ 'font:12px/1 -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;overflow:hidden';
+ function btn(label, m, active) {
+ var b = document.createElement('button');
+ b.type = 'button';
+ b.textContent = label;
+ b.setAttribute('aria-pressed', active ? 'true' : 'false');
+ b.style.cssText = 'border:0;cursor:pointer;padding:9px 14px;letter-spacing:.04em;' +
+ (active ? 'background:#1a1a1a;color:#fff;' : 'background:transparent;color:#444;');
+ b.addEventListener('click', function () {
+ if (mode === m) return;
+ try { localStorage.setItem('dwPaginationMode', m); } catch (e) {}
+ location.reload();
+ });
+ return b;
+ }
+ wrap.appendChild(btn('Endless scroll', 'infinite', mode === 'infinite'));
+ wrap.appendChild(btn('Pages of 100', 'paged', mode === 'paged'));
+ document.body.appendChild(wrap);
+ });
+ {% endif %}
})();
</script>
← 29a6258 add Playwright interceptor race test (PASS against live) + e
·
back to Dw Theme Boost Fix
·
preview gate PASS on theme 143947038771 (0 staging, facets, 26f1d45 →