PrestaShop rich snippets: stars and prices in Google results

Star ratings, a price and "In stock" under a Google result are called rich results, or rich snippets. PrestaShop rich snippets come from structured data: a JSON-LD description of the product (schema.org Product, Offer, AggregateRating, BreadcrumbList) that Google reads from your product pages. In short: test a product page in Google's Rich Results Test, fill in the missing fields (price, currency, availability), collect genuine reviews and make sure each page has only one product description. Below we explain what PrestaShop gives you out of the box, what usually needs fixing and which rules Google applies to reviews.

What are PrestaShop rich snippets and why do they matter?

A standard Google result shows a title, a URL and a description. A rich result adds what helps a shopper choose: a star rating with the number of reviews, the price, availability, and a category path instead of the raw URL. It takes up more space and answers "how much?" and "is it available?" before the click.

Google does not guess this information from your page text. It needs it in a structured form, using the schema.org vocabulary. The recommended format is JSON-LD: a <script type="application/ld+json"> block in the page code that customers never see.

Two things to know from the start:

  • Valid markup does not guarantee stars. Google decides whether and when to show a rich result, depending on the query and the quality of the page.
  • Structured data is not a direct ranking factor. It will not lift your position on its own, but a richer result usually attracts more clicks.

Which structured data does a store need?

schema.org type Where What it shows in Google Key fields
Product product page the base of a product result name, image, description, sku, gtin13, brand
Offer inside Product price and availability price, priceCurrency, availability, url
AggregateRating inside Product stars and review count ratingValue, reviewCount
Review inside Product individual reviews author, reviewRating
BreadcrumbList products and categories a path instead of the URL itemListElement with name and URL
Organization home page store name and logo name, url, logo

According to Google's documentation, a Product needs a name and at least one of offers, review or aggregateRating. Google also distinguishes two kinds of results: product snippets (for pages that describe a product) and merchant listings (for pages where the product can be bought). Merchant listings require a price with a currency, and shipping costs (shippingDetails) and a return policy (hasMerchantReturnPolicy) are recommended. You can also set shipping and returns in Google Merchant Center.

What does PrestaShop output by default?

It depends on the version and the theme:

  • PrestaShop 1.7 with the Classic theme marked up products mainly with microdata, itemprop attributes woven into the HTML.
  • PrestaShop 8 and 9, current Classic and Hummingbird themes output JSON-LD from the templates/_partials/microdata/ folder (product-jsonld.tpl, head-jsonld.tpl). Product pages get a Product with an Offer (price, currency, availability, condition and a priceValidUntil date set 15 days ahead), pages with a breadcrumb get a BreadcrumbList, and every page gets an Organization.
  • Marketplace themes vary: some still use old microdata, some have none, and some add their own JSON-LD on top of the parent theme's.

Things to watch for in the default code:

  • AggregateRating only appears when the free Product Comments module (productcomments) has reviews for that product. Another review module has to pass its ratings to the theme or output its own markup.
  • When the price is hidden (catalog mode, or the product's price display turned off), the theme drops the Offer entirely. Without reviews, the product then has none of the required fields.
  • If a product has no MPN, the theme fills that field with its reference or ID. Check whether that is correct for you.
  • A product with combinations gets one offer with the price of the selected combination. Google supports a separate variant markup (ProductGroup), but the default themes do not output it.

How do you test structured data in Google?

The Rich Results Test (search.google.com/test/rich-results) is your first tool. Paste a product page URL and you will see which items Google detected (for example product snippets, merchant listings, breadcrumbs) along with errors and warnings.

  • An error means the item is not eligible for a rich result. Fix it.
  • A warning means a recommended field is missing. The item works, but may be shown in a plainer form.

Test several kinds of product: in stock, out of stock, with combinations, on sale, with and without reviews. Errors often affect only one of these cases. For full schema.org validation (including types Google does not use), try the Schema Markup Validator.

Google Search Console shows the same for the whole store. Look for the Product snippets, Merchant listings and Breadcrumbs reports. After fixing an error, click Validate fix in the report. The reports only cover pages Google has already crawled, so an up-to-date XML sitemap helps you see the effect of your changes sooner.

Common product structured data errors

Problem Typical cause in PrestaShop What to do
"Either "offers", "review", or "aggregateRating" should be specified" hidden price, theme without Offer show the price or add Offer in the template or a module
Missing price or priceCurrency marketplace theme template, price as text such as "£1,299.00" price as a number with a dot (1299.00), currency as an ISO code (GBP)
Invalid availability text such as "In stock" instead of a schema.org URL https://schema.org/InStock, OutOfStock, PreOrder and so on
Price in markup differs from the page tax-excluded instead of tax-included, another combination, sale price ignored one price everywhere: the one the customer sees
Two Product blocks with different data the theme and one or two modules output them side by side keep a single source
AggregateRating without visible reviews ratings in the markup, reviews hidden or from another site mark up only reviews shown on that page
Invalid GTIN typo in the EAN, UPC code in the EAN field correct the codes on the product page

Price consistency matters beyond organic results too. Google Merchant Center compares the price in your feed with the price on the page and can disapprove products when they differ. More on that in our guide to Google Merchant Center for PrestaShop.

Tip: test a product page again after every theme change and after installing any SEO, review or feed module. That is when duplicate markup most often appears.

Stars in Google: what are the rules for reviews?

Stars are the most wanted element and the most closely policed. The key rules from Google's review snippet guidelines:

  • Reviews must be visible on the page where they are marked up. You cannot add a rating only in the code.
  • Reviews must be about that specific product, not about the store or a category.
  • Do not copy ratings from other sites (price comparison sites, marketplaces) into your own structured data.
  • Reviews of the store itself do not qualify. Since 2019 Google has not shown stars for ratings of a business (Organization, LocalBusiness) that the business publishes on its own website, so-called self-serving reviews. A "4.9 for our store" badge on the home page will not produce stars; product reviews on product pages can.

Also keep the EU Omnibus Directive in mind: a store that publishes reviews must say whether and how it checks that they come from people who actually bought the product.

The free Product Comments module is enough to start collecting reviews. To get more of them, ask customers for a review a few days after delivery, when they have had time to use the product.

Module or manual theme fix?

You have two options:

  • Edit the product-jsonld.tpl template in a child theme. You get full control, but it takes Smarty and schema.org knowledge, and every change in the store (a new review module, variants, several currencies) has to be handled by hand. If you edit the parent theme, a theme update can wipe your fixes.
  • A module that outputs the markup independently of the theme. This helps most with marketplace themes and stores that change their design often.

If you choose the template fix but would rather not touch Smarty yourself, a developer can do it in a child theme as development work. Whichever route you take, leave only one Product block in the page code and test several product pages after the change.

Frequently asked questions

Why does Google not show stars when the test passes?

Valid markup is necessary, but not sufficient. Google decides whether to show a rich result based on the query, the quality of the page and its trust in the site. Also make sure the reviews are visible on the page and are about the product, not the store.

How long does it take for stars to appear after a fix?

There is no fixed time. Google has to recrawl the product page, which usually takes from a few days to a few weeks. An up-to-date sitemap and validating the fix in Search Console can speed it up.

Can I show ratings from an external review site in Google?

Not through your own page's structured data. Google requires marked-up reviews to come from users and to be visible on that page.

JSON-LD or microdata?

Google supports both, but recommends JSON-LD. It is easier to maintain because it is not mixed into the theme's HTML. Do not combine both for the same product if the data differs.

Want us to check your store's structured data? Contact us and we will tell you what to fix.

Products in this article

Back to Blog

Loading...
Back to top