G
G
Greg Plitt2020-08-19 21:02:26
opencart
Greg Plitt, 2020-08-19 21:02:26

How to display canonical on all pages in oc store?

In the product.php file (in the controllers) there is the code:

$this->document->addLink($this->url->link('product/product', 'product_id=' . $this->request->get['product_id']), 'canonical');


But it doesn't show up in products. Like the categories, there is no canonical.

It's worth SeoPRO and I know that it sort of solves the problem, but how can I still display canonical in the code on each page?

Preferably without modules. Is SEO | Full Index⁵, but nothing reacts through it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Greg Plitt, 2020-08-20
@bit24yes

It looks like crazy, but if someone needs to do this, then just paste the following into the head

<link href="<?php echo $_SERVER['REQUEST_URI']; ?> " rel="canonical" />

:))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question