Friday , February 21 2025

Opencart

Opencart – articles, how-to-fix notes, fast solutions

How to change 302 to 301 redirect in Opencart

By default, OpenCart automatically enables 302 redirects. However, using 302 redirects is not ideal for SEO purposes because they indicate a temporary redirect. For better search engine optimization, it’s important to use 301 redirects, which signify a permanent move. This article provides a step-by-step guide on how to change 302 …

Read More »

Canonical for pagination in Opencart below version 3

Pagination pages may not have canonicals at all by default. To add their automatic generation, open the file /catalog/controller/product/category.php and in it after the line $this->load->model(‘tool/image’); add the following code: if (isset($this->request->get['page'])) { $page = $this->request->get['page']; $pathx = explode('_', $this->request->get['path']); $pathx = end($pathx); $this->document->addLink($this->url->link('product/category', 'path=' . $pathx ), 'canonical'); } …

Read More »

Remove page=2 from canonical links for Opencart 3

The developers decided that in Opencart 3+ for SEO it would be very useful to add a link to the current page as canonical, even if it is a pagination page. This is an awful SEO solution, so you need to make some changes. So, you need: from <link href=”https://domain/path?page=2 …

Read More »