Category Archives: Blogs

How to put google rich-snippets in your Opencart template

As you know , Google encourages web shopping cards to embed rich-snippets to their product pages.
I am going to show how we can add markups to our product in Opencart, so that google can provide detail information in search results. This can help to attract more users to your shopping cart and help them to find their desire product easier.

So lets assume you have a Opencart template called mytemplate.

Then you should modify the following file:

Then you put following java script code in your php file:


<script type="application/ld+json">
   "@context": "",
        "@type": "Product",
        "name": "<?php echo $heading_title; ?>",
        "image": "<?php echo $thumb; ?>",
        "description": "<?php echo $heading_title; ?>",
        "brand": {
            "@type": "Product",
            "name": "Your Organisation Name"
        "offers": {
            "@type": "Offer",
            "priceCurrency": "AUD",
            "price": "<?php echo str_replace('$','',str_replace(' AUD','',$price)); ?>",
            "priceValidUntil": "2020-11-05",
            "itemCondition": "",
            "availability": "",
            "seller": {
                "@type": "Organization",
                "name": "Your Organisation Name"