Skip to content

Commit

Permalink
added json to barcode to pass gtin as a json string (Shopify#2804)
Browse files Browse the repository at this point in the history
  • Loading branch information
lougoncharenko authored Aug 9, 2023
1 parent 7e64168 commit addc635
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sections/featured-product.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -654,13 +654,13 @@
"sku": {{ variant.sku | json }},
{%- endif -%}
{%- if variant.barcode.size == 12 -%}
"gtin12": {{ variant.barcode }},
"gtin12": {{ variant.barcode | json }},
{%- endif -%}
{%- if variant.barcode.size == 13 -%}
"gtin13": {{ variant.barcode }},
"gtin13": {{ variant.barcode | json }},
{%- endif -%}
{%- if variant.barcode.size == 14 -%}
"gtin14": {{ variant.barcode }},
"gtin14": {{ variant.barcode | json }},
{%- endif -%}
"availability" : "http://schema.org/{% if variant.available %}InStock{% else %}OutOfStock{% endif %}",
"price" : {{ variant.price | divided_by: 100.00 | json }},
Expand Down

0 comments on commit addc635

Please sign in to comment.