diff --git a/viz/app/store_page.js b/viz/app/store_page.js index 235999a..6cadaaa 100644 --- a/viz/app/store_page.js +++ b/viz/app/store_page.js @@ -598,19 +598,14 @@ export async function renderStore($app, storeLabelRaw) { return `+$${esc(abs)}`; } - // Any non-sale sort: still show % off on exclusives/last-stock when applicable. - // (% off vs best other store price) - const sp = it && Number.isFinite(it._storePrice) ? it._storePrice : null; - const other = it && Number.isFinite(it._bestOther) ? it._bestOther : null; - if (sp === null || other === null || !(other > 0)) return ""; - if (!(sp < other - EPS)) return ""; - - const pct = Math.round(((other - sp) / other) * 100); - if (!Number.isFinite(pct) || pct <= 0) return ""; - return `${esc(pct)}% off`; + // Any NON-sale sort: still show the % badge (same as Sale %) when there was a change. + const p = Number.isFinite(it._salePct) ? it._salePct : 0; + if (!p) return ""; + const abs = Math.abs(p); + if (p < 0) return `${esc(abs)}% off`; + return `+${esc(abs)}%`; } - function renderCard(it) { const price = listingPriceStr(it);