So, yo need to do few things:
-
To populate the EAN and/or UPC (or ISBN), you need to set those for each product
- One for simple product
- One for every combination if you have a combination product
-
In the TPL, you get the GTIN codes as:
- For UPC $product.upc
- For EAN $product.ean13
-
For structured data, you need to:
- Set EAN as gtin13 property (EAN's required here are 13 digits)
- Sen UPC as gtin12 property (UPC is 12 digits)
You need to define these inside the Product itemscope.
I first fixed this in code amending them as meta tags microdata, but then implemented everything in JSON.
mpm is NOT the same as the gtin, don't use that, although it probably doesn't harm you either.
Here's my current JSON implementation:
{if $product.ean13} "gtin13": "{$product.ean13|escape:'html':'UTF-8'}", {else if $product.upc} "gtin12": "0{$product.upc|escape:'html':'UTF-8'}", {/if}
I banged my head around some time trying to define the property just as gtin