Schema in PrestaShop: what your product page lacks to show shipping and returns on Google

Schema in PrestaShop

The PrestaShop product page already comes with structured data by default: name, price, availability, reference and, if you fill it in, the EAN. With that Google can show the price. What it does not include is what Google now asks for in merchant listings: shipping costs and times, the returns policy and variants. That is why Search Console warns that shippingDetails and hasMerchantReturnPolicy are missing on almost all your product pages, and why every size or colour is read as if it were the same product.

Below you will find how to check it in your shop, the missing markup ready to adapt and what happened in a real shop when we completed it.

How to tell whether this is happening to you

1. In Search Console. Go to Shopping > Merchant listings and scroll down to Improve item appearance. If these two issues show up and affect almost all your product pages, the problem is not your products: it is the theme.

  • Missing field “hasMerchantReturnPolicy” (in “offers”)
  • Missing field “shippingDetails” (in “offers”)
Search Console issues in PrestaShop merchant listings: missing hasMerchantReturnPolicy and missing shippingDetails
If these two issues affect almost all your product pages, the problem is in the theme, not in your products.

If no report appears under Shopping, Google is not reading your pages as products. That is a different problem, which comes before this one: start with the test in point 2.

2. On a specific product page. Open a product page with combinations (sizes, colours) and paste this into the browser console (right click, Inspect, Console tab):

const products = [...document.querySelectorAll('script[type="application/ld+json"]')]
  .flatMap(s => { try { const j = JSON.parse(s.textContent); return [].concat(j['@graph'] || j); } catch (e) { return []; } })
  .filter(x => /Product/.test([].concat(x['@type']).join()));
console.log('Product blocks on the page:', products.length);
products.forEach(p => {
  const o = [].concat(p.offers || [])[0] || {};
  console.table({
    type: [].concat(p['@type']).join(),
    variants: (p.hasVariant || []).length,
    gtin: !!(p.gtin13 || p.gtin || o.gtin13),
    shipping: !!o.shippingDetails,
    returns: !!(o.hasMerchantReturnPolicy || p.hasMerchantReturnPolicy),
    priceValidUntil: o.priceValidUntil || '(none)'
  });
});

What tells you that you have the problem:

  • shipping and returns are false;
  • type is Product and variants is 0, even though the page has sizes or colours;
  • more than one product block on the page. That happens when a module adds its markup without removing the theme’s, and Google receives two different products with different data.

3. In Google’s Rich Results Test. Paste the URL of the same product page into the Rich Results Test. It shows you the same as the console, with the warnings as Search Console gives them. If what you want to know is what a rich result is and what it is for, we explain it in what rich snippets are (in Spanish).

Why it happens: what the default product page outputs

Structured data PrestaShop's product page outputs by default and what it lacks: shipping, returns and variants
The theme marks up the price and availability, but not shipping, returns or variants.

In PrestaShop 8 and 9 the product page markup is added by the theme, not the core. It is in the file templates/_partials/microdata/product-jsonld.tpl, both in Classic and in Hummingbird. If your theme is a paid one, it is almost always based on one of the two.

Data Default theme What Google asks for in merchant listings
Name, image, price, availability Yes Required
Reference (sku) and brand Yes Recommended
gtin13 Only if you fill in the EAN13 Recommended, and it is what helps most to identify the product
Condition (itemCondition) Yes Recommended
Shipping costs and times (shippingDetails) No Recommended
Returns policy (hasMerchantReturnPolicy) No Recommended, preferably at shop level
Variants (ProductGroup) No Recommended if you sell sizes, colours or materials
Ratings (aggregateRating) Only with the comments module Recommended, if they are real reviews

There is also a detail almost nobody notices: the default theme fills priceValidUntil with today’s date plus 15 days, recalculated every time the page loads. It is not false, but it does not say anything either: it is an invented date that moves on its own.

The properties and whether they are required or recommended are in Google’s documentation for merchant listings and product variants.

How to fix it

There are two routes: replace the product-jsonld.tpl file in a child theme, or use a module that generates the full markup and removes the theme’s. Both have to read PrestaShop’s data, not have it written by hand on each product page.

Where in the PrestaShop back office the shipping, returns, GTIN and variant data for product markup comes from
Everything that goes into the markup is already in the back office. Writing it by hand is the quickest way for it to stop matching.

1. The returns policy, once for the whole shop

If you have the same returns policy for all or almost all of the catalogue, Google recommends declaring it once in the organisation markup. The per-product policy is for exceptions: a product that cannot be returned or has a different return window.

The days come from Orders > Merchandise returns, where PrestaShop stores the maximum return period. They have to match your terms of sale:

{
  "@context": "https://schema.org",
  "@type": "Organization",
  "@id": "https://www.yourshop.com/#organization",
  "name": "Your shop",
  "url": "https://www.yourshop.com/",
  "hasMerchantReturnPolicy": {
    "@type": "MerchantReturnPolicy",
    "applicableCountry": "ES",
    "returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
    "merchantReturnDays": 14,
    "returnMethod": "https://schema.org/ReturnByMail",
    "returnFees": "https://schema.org/FreeReturn"
  }
}

Example with fictitious data: change the days, the method and who pays for the return to your own.

2. Shipping, inside each product page’s offer

The cost and the area come from the carrier (Shipping > Carriers > Locations and costs) and the time from its transit time. It goes inside offers:

"shippingDetails": {
  "@type": "OfferShippingDetails",
  "shippingRate": { "@type": "MonetaryAmount", "value": 4.95, "currency": "EUR" },
  "shippingDestination": { "@type": "DefinedRegion", "addressCountry": "ES" },
  "deliveryTime": {
    "@type": "ShippingDeliveryTime",
    "handlingTime": { "@type": "QuantitativeValue", "minValue": 0, "maxValue": 1, "unitCode": "DAY" },
    "transitTime": { "@type": "QuantitativeValue", "minValue": 1, "maxValue": 3, "unitCode": "DAY" }
  }
}

3. Variants, with ProductGroup

If a product page has combinations, Google asks for a ProductGroup with a complete Product per variant. What the documentation says:

  • each variant carries its own identifier, sku or gtin;
  • each variant must be openable already selected from its own URL, so Google can crawl its price, image and availability;
  • variesBy only accepts six values: color, size, suggestedAge, suggestedGender, material and pattern.

Here PrestaShop works in your favour. The default product route is {category:/}{id}{-:id_product_attribute}-{rewrite}{-:ean13}.html (Dispatcher.php in PrestaShop 8.2), so each combination already has its own URL that opens it preselected: /clothing/45-101-basic-t-shirt.html. And the canonical tag of those URLs points to the product page without a combination, which is exactly what Google asks for when all variants are chosen on the same page: a single canonical URL for the group, usually the page with no variant selected. Why that canonical is correct and should not be touched is explained in duplicate URLs in PrestaShop.

What is missing is the markup. Example built with fictitious data:

{
  "@context": "https://schema.org",
  "@type": "ProductGroup",
  "name": "Basic T-shirt",
  "productGroupID": "CB-01",
  "url": "https://www.yourshop.com/clothing/45-basic-t-shirt.html",
  "brand": {
    "@type": "Brand",
    "name": "Your brand"
  },
  "variesBy": [
    "https://schema.org/size"
  ],
  "hasVariant": [
    {
      "@type": "Product",
      "sku": "CB-01-S",
      "name": "Basic T-shirt, size S",
      "size": "S",
      "image": "https://www.yourshop.com/img/cb-01-s.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://www.yourshop.com/clothing/45-101-basic-t-shirt.html",
        "price": "19.90",
        "priceCurrency": "EUR",
        "availability": "https://schema.org/InStock"
      }
    },
    {
      "@type": "Product",
      "sku": "CB-01-M",
      "name": "Basic T-shirt, size M",
      "size": "M",
      "image": "https://www.yourshop.com/img/cb-01-m.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://www.yourshop.com/clothing/45-102-basic-t-shirt.html",
        "price": "19.90",
        "priceCurrency": "EUR",
        "availability": "https://schema.org/OutOfStock"
      }
    }
  ]
}

Each variant’s offers also carries the shippingDetails from point 2. The size goes in size, which is a property of Product itself, and not inside additionalProperty: Google does not use it there for variants.

4. No two products on the same page

If a module adds the markup, the theme’s {include} of product-jsonld.tpl has to be removed from catalog/product.tpl in the child theme. Otherwise the console from point 2 will tell you there are two product blocks, and Google will have to choose one without you knowing which.

At Mikksa we use our own product structured data module that takes shipping, returns and features from the back office and replaces the theme’s markup. It is already running in client shops; variants with ProductGroup are in development.

What happens when it is done right

Chart of PrestaShop product pages without a returns policy in Search Console, from 100% to under 5% in four weeks after installing the module
Four weeks from installation until Google had reread almost the whole catalogue.

In a shop with over a thousand product pages we installed the module in early October, as part of its monthly SEO plan. Pages without a returns policy were practically the whole catalogue from when records began, in August. After one week they had dropped by half; after four weeks, below 5%; today they are around 2%. No product page became invalid during the change.

The timeline is not set by the shop: it is set by Google, which rereads each product page at its own pace. In a shop that size it took four weeks.

What breaks if you get it wrong

  • Data that does not match the page. If the markup says 14 days for returns and your terms say 30, or the price in the markup is not the one the customer sees, the problem stops being a warning: it goes against Google’s structured data guidelines and can end in a manual action. That is why the markup has to read PrestaShop’s data and not copy it by hand.
  • Two products on the same page, the theme’s and the module’s, with different prices or availability.
  • Ratings that are not on the page. aggregateRating only if the reviews come from customers and can be seen on the product page.
  • Badly entered GTINs. An EAN13 missing a digit or copied from another product gives “Invalid GTIN”. In the case shop it happened on a handful of pages, and it is fixed in each one’s EAN-13 field.
  • Features that do not fit the field. If you turn a PrestaShop feature into a schema.org property, the value has to be in the format and range that property accepts. Free text where Google expects a number generates warnings on hundreds of pages at once.
  • Pages left out. A carrier or area that is not configured leaves pages without shipping in the markup. In the case, less than 2% of the catalogue ended up without shipping or returns: those are the pages to review one by one.
  • Updating PrestaShop or the theme. If you replaced product-jsonld.tpl in the parent theme and not in a child theme, the next update wipes it without warning.

If you also sell on Google Shopping, the product page’s structured data has to match the feed: we cover it in disapproved products in Merchant Center.

When you cannot do this yourself

If your theme is a paid one with no child theme, if your product pages have combinations and you need the ProductGroup with one URL per variant, or if after touching it the console still shows two product blocks, the fix involves code in the theme or in a module. In that case we can do it ourselves as part of SEO for PrestaShop, with the markup validated page by page in Search Console.

Want to know whether this affects your shop?

Leave us your URL. We review it and tell you what we find and what it is costing you, with no commitment.

We reply within 24 working hours.