← back to Dw Validator Debug TK11314
TK-10661: use unless idiom (not ==blank) for offer_variant fallback — fixes empty-price on all-Sample/out-of-stock edge cases (liquidjs-render caught)
7d4c620600de408cdb84a01bfc4fe57cfe281294 · 2026-08-18 09:26:43 -0700 · Steve Abrams
Files touched
M shopify/theme-LIVE-591/snippets/structured-data.liquid
Diff
commit 7d4c620600de408cdb84a01bfc4fe57cfe281294
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue Aug 18 09:26:43 2026 -0700
TK-10661: use unless idiom (not ==blank) for offer_variant fallback — fixes empty-price on all-Sample/out-of-stock edge cases (liquidjs-render caught)
---
shopify/theme-LIVE-591/snippets/structured-data.liquid | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/shopify/theme-LIVE-591/snippets/structured-data.liquid b/shopify/theme-LIVE-591/snippets/structured-data.liquid
index df7ca2b2..c8e9faeb 100644
--- a/shopify/theme-LIVE-591/snippets/structured-data.liquid
+++ b/shopify/theme-LIVE-591/snippets/structured-data.liquid
@@ -307,16 +307,16 @@
Pick the first AVAILABLE non-Sample variant; fall back to the first non-Sample variant;
finally fall back to selected_variant (guards a product that somehow has only a Sample).
{%- endcomment -%}
- {%- assign offer_variant = blank -%}
+ {%- comment -%} nil-falsiness + unless (NOT `== blank`, which does not compare reliably in Liquid) {%- endcomment -%}
{%- for v in product.variants -%}
{%- if v.title != 'Sample' and v.available -%}{%- assign offer_variant = v -%}{%- break -%}{%- endif -%}
{%- endfor -%}
- {%- if offer_variant == blank -%}
+ {%- unless offer_variant -%}
{%- for v in product.variants -%}
{%- if v.title != 'Sample' -%}{%- assign offer_variant = v -%}{%- break -%}{%- endif -%}
{%- endfor -%}
- {%- endif -%}
- {%- if offer_variant == blank -%}{%- assign offer_variant = selected_variant -%}{%- endif -%}
+ {%- endunless -%}
+ {%- unless offer_variant -%}{%- assign offer_variant = selected_variant -%}{%- endunless -%}
{% assign product_image = selected_variant.featured_image | default: product.featured_image %}
{%- capture product_name -%}
{{ product.title }}
← 21878515 TK-10661: JSON-LD Offer uses first sellable non-Sample varia
·
back to Dw Validator Debug TK11314
·
TK-10649: targeted 3-row Shopify->PG reconcile for cross-ven 48cbba4b →