Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions templates/_partials/microdata/product-jsonld.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"sku": "{if $product.reference}{$product.reference}{else}{$product.id}{/if}",
"mpn": "{if $product.mpn}{$product.mpn}{elseif $product.reference}{$product.reference}{else}{$product.id}{/if}"
{if $product.ean13},"gtin13": "{$product.ean13}"
{elseif $product.upc},"gtin13": "{$product.upc}"
{elseif $product.upc},"gtin12": "{$product.upc}"
{/if}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgielecinski Thanks for the changes, but you forgot to remove a {/if}.

Suggested change
{/if}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohhh.. 2 Fast 2 Furious 😆

{if isset($product_manufacturer) && $product_manufacturer->name},
"brand": {
Expand Down Expand Up @@ -80,7 +80,7 @@
{/if}
"sku": "{if $product.reference}{$product.reference}{else}{$product.id}{/if}",
"mpn": "{if $product.mpn}{$product.mpn}{elseif $product.reference}{$product.reference}{else}{$product.id}{/if}",
{if $product.ean13}"gtin13": "{$product.ean13}",{elseif $product.upc}"gtin13": "0{$product.upc}",{/if}
{if $product.ean13}"gtin13": "{$product.ean13}",{elseif $product.upc}"gtin12": "{$product.upc}",{/if}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I hadn’t noticed that the code was in two different places. I believe sku, mpn, ean13, and upc inside the Offers type can be removed, as they are duplicates.

{if !empty($product.show_condition) && !empty($product.condition)}"itemCondition": "{$product.condition.schema_url}",{/if}
"availability": "{$product.seo_availability}",
"seller": {
Expand Down