Skip to content

Commit

Permalink
fix: Add non EAN barcode in product page (#10223)
Browse files Browse the repository at this point in the history
hidden, for folksonomy engine to work.

fixes: #7267
  • Loading branch information
alexgarel committed May 6, 2024
1 parent 34dc35f commit ece6f77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/web/pages/product/product_page.tt.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ <h2 class="title-1" property="food:name" itemprop="name">[% title %]</h1>
[% lang("barcode") %]: <span id="barcode" property="food:code" itemprop="gtin13" style="speak-as:digits;">[% code %]</span> [% upc %]
</p>
<div property="gr:hasEAN_UCC-13" content="[% code %]" datatype="xsd:string"></div>
[% ELSE %]
[%# put in DOM for folksonomy %]
<span id="barcode" style="display: none;">[% code %]</span>
[% END %]

[% product_fields %]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,9 @@ <h2 class="title-1" property="food:name" itemprop="name">Some product - 100聽g</

<!-- Display UPC code if the EAN starts with 0 -->


<span id="barcode" style="display: none;">200000000034</span>


<!-- start templates/web/common/includes/display_field.tt.html -->

Expand Down

0 comments on commit ece6f77

Please sign in to comment.