Blog navigation keyboard_arrow_down

Blog Rss rss_feed

JSON-LD Microdata for PrestaShop Templates: What It Is and How to Use It

JSON-LD Microdata for PrestaShop Templates: What It Is and How to Use It

What is JSON-LD and Microdata?

JSON-LD (JavaScript Object Notation for Linked Data) is a markup format that enables structuring data on a page and sharing it with search engines. Microdata is additional information conveyed in a specific format to help search engines better understand website content, thereby improving the display of your store's pages in search results. By using JSON-LD in PrestaShop templates, we create “hints” for search engines, helping them better interpret the store’s content and display it to users more informatively.

When you add JSON-LD markup to PrestaShop, Google and other search engines can display additional elements, such as ratings, prices, and availability, directly in search results. This improves the chances of attracting customers by allowing them to immediately see product details and ensuring that they click on the most relevant link.

Why is JSON-LD Microdata Needed in PrestaShop?

The main goal of JSON-LD microdata in PrestaShop is to improve product and store visibility in search engines. The benefits include:

  1. Increasing Click-Through Rates: Displaying ratings, prices, availability, and other details makes your store more visible in search results.
  2. Building Trust: Useful information, such as customer reviews and ratings, increases trust among potential buyers.
  3. Enhancing SEO: Microdata helps search engines interpret page content more accurately, positively impacting its ranking.

Where Are PrestaShop Microdata Files Located?

In PrestaShop, microdata files are found in the folder themes/your_theme/templates/_partials/microdata/. This folder contains several files responsible for different types of markup:

  • head-jsonld.tpl — for general markup added to the <head> section.
  • product-jsonld.tpl — for markup on specific product pages.
  • product-list-jsonld.tpl — for markup on product lists.

Let’s examine the contents of one of these files and how the markup functions using product-jsonld.tpl as an example.

Example of JSON-LD Markup for a Product in PrestaShop

Here’s a sample JSON-LD microdata markup for a product page:

<script type="application/ld+json"> { "@context": "https://schema.org/", "@type": "Product", "name": "{$product.name}", "description": "{$page.meta.description|regex_replace:\"/[\r\n]/\" : \" \"}", "category": "{$product.category_name}", "image": "{$product.cover.bySize.home_default.url}", "sku": "{$product.reference}", "mpn": "{$product.mpn}", "brand": { "@type": "Brand", "name": "{$product_manufacturer->name|escape:'html':'UTF-8'}" }, "offers": { "@type": "Offer", "priceCurrency": "{$currency.iso_code}", "price": "{$product.price_amount}", "availability": "{$product.seo_availability}", "seller": { "@type": "Organization", "name": "{$shop.name}" } } } </script>

Why Add JSON-LD Microdata to Product Pages?

Adding JSON-LD microdata to product pages allows users to see detailed product information even before they visit your site. Microdata makes the page more attractive and improves its ranking, helping boost your online store's visibility.

How to Configure JSON-LD Markup for PrestaShop?

To configure JSON-LD microdata in PrestaShop, you can use the standard files or add custom information.

  1. Open the markup file, such as product-jsonld.tpl.
  2. Add or edit properties corresponding to your product. For example, you can add customer ratings or product specifications.
  3. Save the changes and check if the data is displayed correctly.

JSON-LD microdata in PrestaShop helps improve your store’s visibility and makes product pages more attractive to both users and search engines. By implementing microdata, you not only improve SEO but also make your online store more competitive in search results.

Let us know if you’ve encountered any difficulties with microdata setup or if you noticed positive results in search performance. We’re here to share experiences and answer any questions you may have!

Was this blog post helpful to you?

    
No comments at this moment
close

Checkout

close

Favourites