Are you running a website with opencart? Do know about why canonical tag required for your website? Well then, below you can find easy solutions for your requirement.

OpenCart is an open source e-commerce software used to build online stores.Despite its popularity, some of its missing features are glaring, especially when it comes to SEO.  OpenCart does implement the rel=”canonical” tag on its product pages. However, there’s no canonical tag on any of the category pages or the all-important homepage. If you install OpenCart without fixing this problem, a Google site:yourdomain.com search will show a million variations of each category diluting the results, “link juice”, and earning relegation to the “See this search with duplicate pages”.

What Is rel=”canonical” tag and Why should required for website pages.

Read more from https://support.google.com/webmasters/answer/139066?hl=en&rd=1

Find below relatively easy solution,

1) Edit your catalog/controller/product/category.php file

2) Find this line:

if ($category_info) {

3) Immediately after it, add the following lines:

$can_url=$this->url->link(“product/category”,”path=”.$this->request->get[‘path’]); $this->document->addLink($can_url,”canonical”);

4) Now edit catalog/controllers/common/home.php

5) Find this line:

$this->document->setDescription($this->config->get(‘config_meta_description’));

6) Immediately after it add:

$can_url=$this->url->link(‘common/home’); $can_url=str_replace(‘index.php?route=common/home’, ”, $can_url); $this->document->addLink($can_url,’canonical’);

That’s It!!!You have canonical urls!

Follow us on

Related Posts


Empower the workforce with Augmented Reality enabled Remote Assistance

October 8, 2020

Bring your technicians and specialists together to fix your challenges quicker and more easily. Complex technology, such as fully automated and semi – automated machinery or tele – operated devices, are being deployed in the heavy industrial and mineral extraction fields to increase productivity. As a result, the repair and operation of these sophisticated devices […]

Remote Monitoring

September 8, 2020

Reduce repair journeys, boost customer service and take direct care of the heavy machinery and facilities from anywhere at any moment! The basic problem in manufacturing for machine builders is the pace at which they will react with machine service in the event of failure. Many questions arise: How do you handle automated equipment in […]

The Energy Savings Potential of Smart Manufacturing

March 12, 2020

IOT based Energy monitoring system guarantees payback of 8 months ! “IF YOU CAN’T MEASURE IT, YOU CAN’T MANAGE IT” – It became more relevant in today’s context where data-driven decisions are prevalent. The fundamental goal of energy management is to produce goods and provide services with the least cost and least environmental effect. Our […]