Rich snippets in PrestaShop: show price and stock in Google
With structured data Google understands your product pages better and can show price, stock and reviews right in the search results. Here is how it works and how to set it up in PrestaShop.
You have probably seen search results with a price, "In stock" or yellow stars underneath. Those are rich snippets, also called rich results. They stand out between the plain blue links and often attract more clicks.
Google only shows this extra information when it is sure about it. For that it needs structured data: a piece of code on your page that describes in fixed terms what is for sale.
What is structured data?
Structured data is information in a fixed format, following the schema.org vocabulary. Google recommends the JSON-LD format: a block of code in the page that visitors do not see, but search engines do read. For a product it contains, for example:
- the product name, description and image;
- the brand and the product code;
- the price and the currency;
- whether the product is in stock;
- ratings, if you have them.
What does it bring you?
Structured data is not a button that suddenly puts you at the top. It does help Google understand your pages properly, and it makes rich results possible. A search result with price and stock answers the searcher right away and stands out more. If you use Google Merchant Center, correct structured data also helps keep your product data in line with what is on your site.
To be fair: stars only appear when there are genuine reviews on the page. No reviews, no stars, and made-up reviews can even get you a manual action from Google.
Doesn't PrestaShop do this out of the box?
Partly. Many themes include some basic data, but it is often incomplete, outdated or in an older format. Sometimes the same information appears twice, with different values. Then Google does not know which one is right.
How to check your own shop
1. Test a product page
Open Google's Rich Results Test (search.google.com/test/rich-results) and paste the URL of a product page. You immediately see which data Google finds and whether there are errors or warnings.
2. Look in Google Search Console
Under Enhancements or Shopping you see, per type of structured data, how many pages are fine and where something is missing.
3. Fix the errors
Is the price missing, the currency wrong or the stock incorrect? Then adjust the structured data and ask Google in Search Console to validate the fix.
Automatically with a module
You can build JSON-LD into your theme yourself, but it has to stay correct with every price change and every update. With Structured Data JSON-LD this happens automatically. The module adds the right JSON-LD to every product page, with product details, price, availability and breadcrumbs, and includes reviews when you have them. You activate the module once and never have to think about it again.
In short
- Structured data tells Google exactly what you sell.
- It makes rich results with price and stock possible, and stars if you have genuine reviews.
- Test your pages with the Rich Results Test and keep an eye on Search Console.