Skip to content

Commit 190debd

Browse files
authored
Merge pull request #916 from mgielecinski/fix-upc-code-in-gtin13
Converted UPC to gtin13 in product schema
2 parents 1fce4ed + 52e578e commit 190debd

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

templates/_partials/microdata/product-jsonld.tpl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@
3434
{if !empty($product.cover)}"image" :"{$product.cover.bySize.home_default.url}",{/if}
3535
"sku": "{if $product.reference}{$product.reference}{else}{$product.id}{/if}",
3636
"mpn": "{if $product.mpn}{$product.mpn}{elseif $product.reference}{$product.reference}{else}{$product.id}{/if}"
37-
{if $product.ean13},"gtin13": "{$product.ean13}"
38-
{elseif $product.upc},"gtin13": "{$product.upc}"
39-
{/if}
37+
{if $product.ean13},"gtin": "{$product.ean13}"{/if}
38+
{if $product.upc},"gtin12": "{$product.upc}"{/if}
4039
{if isset($product_manufacturer) && $product_manufacturer->name},
4140
"brand": {
4241
"@type": "Brand",
@@ -67,7 +66,6 @@
6766
"offers": {
6867
"@type": "Offer",
6968
"priceCurrency": "{$currency.iso_code}",
70-
"name": "{$product.name|strip_tags:false}",
7169
"price": "{$product.price_amount}",
7270
"url": "{$product.url}",
7371
"priceValidUntil": "{($smarty.now + (int) (60*60*24*15))|date_format:"%Y-%m-%d"}",
@@ -78,9 +76,6 @@
7876
{/foreach}
7977
]{/strip},
8078
{/if}
81-
"sku": "{if $product.reference}{$product.reference}{else}{$product.id}{/if}",
82-
"mpn": "{if $product.mpn}{$product.mpn}{elseif $product.reference}{$product.reference}{else}{$product.id}{/if}",
83-
{if $product.ean13}"gtin13": "{$product.ean13}",{elseif $product.upc}"gtin13": "0{$product.upc}",{/if}
8479
{if !empty($product.show_condition) && !empty($product.condition)}"itemCondition": "{$product.condition.schema_url}",{/if}
8580
"availability": "{$product.seo_availability}",
8681
"seller": {

0 commit comments

Comments
 (0)