Got it 👍 This is a very common (and important) requirement for PrestaShop—especially for Google Merchant / SEO / structured data.
I’ll break it down cleanly 👇
1️⃣ What are SKU, MPN, GTIN in PrestaShop?
| Field | Meaning | Used for |
|---|---|---|
| SKU | Stock Keeping Unit | Internal product tracking |
| MPN | Manufacturer Part Number | Google Shopping, Schema |
| GTIN | Global Trade Item Number (EAN / UPC / ISBN) | Google, Rich snippets |
👉 In PrestaShop:
- SKU = Reference
- GTIN = EAN-13 / UPC / ISBN
- MPN = NOT available by default (needs customization)
2️⃣ How to Add SKU (Reference)
Admin path:
Back Office → Catalog → Products → Edit product
➡️ Go to Options / Stock / Details tab (varies by version)
- Reference → This is your SKU
- Can be set per combination also
✅ Already built-in – no extra module needed.
3️⃣ How to Add GTIN (EAN / UPC / ISBN)
PrestaShop already supports GTIN fields 👇
Admin path:
Catalog → Products → Edit → Options
Available fields:
- EAN-13 → GTIN-13
- UPC → GTIN-12
- ISBN → Books only
💡 Google accepts any ONE GTIN.
4️⃣ How to Add MPN (Manufacturer Part Number)
❌ PrestaShop does NOT have MPN by default
✅ You must add it manually (3 ways)
🔹 Option A: Use a Module (Easiest)
Search in Addons marketplace:
- “MPN Product Field”
- “Extra Product Fields”
- “Google Merchant Center modules”
These modules:
- Add MPN field in product page
- Support combinations
- Automatically inject into schema
✔ Best if you don’t want coding
🔹 Option B: Add MPN as a Product Feature (No Code)
Back Office → Catalog → Attributes & Features → Features
- Add new feature:
- Name: MPN
- Assign value per product
❗ Downside:
- Not ideal for Google schema unless you customize theme
- Treated as descriptive data, not technical
🔹 Option C: Add Custom Database Field (Best / Advanced)
Add MPN as a real product field.
1️⃣ Database
ALTER TABLE ps_product ADD mpn VARCHAR(64);
2️⃣ Override Product class
/override/classes/Product.php
public $mpn;
public static $definition = array(
'table' => 'product',
'primary' => 'id_product',
'fields' => array(
'mpn' => array('type' => self::TYPE_STRING, 'size' => 64),
),
);
3️⃣ Add input field in admin product form
(override AdminProductsController)
⚠️ Needs override index rebuild:
Advanced Parameters → Performance → Clear cache
✔ Best for:
- Google Merchant
- JSON-LD schema
- Multi-language not required
5️⃣ Showing SKU / MPN / GTIN on Product Page
Edit your theme file:
📄 themes/your-theme/templates/catalog/product.tpl
Example:
{if $product.reference}
<p><strong>SKU:</strong> {$product.reference}</p>
{/if}
{if $product.ean13}
<p><strong>GTIN:</strong> {$product.ean13}</p>
{/if}
{if $product.mpn}
<p><strong>MPN:</strong> {$product.mpn}</p>
{/if}
6️⃣ Adding SKU, MPN, GTIN in JSON-LD (Very Important)
Since you care about schemas (I remember 😉), this is crucial.
Example Product Schema:
"sku": "SKU123",
"mpn": "MPN-456",
"gtin13": "8901234567890"
In PrestaShop theme:
📄 templates/_partials/microdata-jsonld.tpl
Make sure:
sku→ referencempn→ custom fieldgtin13/gtin12→ ean13 / upc
7️⃣ Google Merchant Rules (Important)
| Condition | What to send |
|---|---|
| GTIN exists | Send gtin only |
| No GTIN | Send mpn + brand |
| Custom product | Use identifier_exists = no |
8️⃣ Best Practice (Recommended Setup)
✔ SKU → Reference
✔ GTIN → EAN-13 / UPC
✔ MPN → Custom field (Option C)
✔ Brand → Manufacturer
✔ Schema JSON-LD → Enabled
