Site icon PrestaShop | Magento | CRM Modules

PrestaShop How to add SKU MPN GTIN Products information

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:


2️⃣ How to Add SKU (Reference)

Admin path:

Back Office → Catalog → Products → Edit product

➡️ Go to Options / Stock / Details tab (varies by version)

✅ 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:

💡 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:

These modules:

✔ Best if you don’t want coding


🔹 Option B: Add MPN as a Product Feature (No Code)

Back Office → Catalog → Attributes & Features → Features

  1. Add new feature:
    • Name: MPN
  2. Assign value per product

❗ Downside:


🔹 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:


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:


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


 

Exit mobile version