L
L
lexstile2018-04-28 14:19:41
opencart
lexstile, 2018-04-28 14:19:41

How to register canonical on opencart 1.5.*?

Now the product is available by urls:
site.ru/category/sub_catуgory/product_name
site.ru/sub_catygory/product_name
site.ru/product_name
If I set canonical, it is different for all these pages in the form of the current url.
You need to make it the same everywhere for the current product in the form - site.ru/category/sub_catygory/product_name
The problem is that I don’t know how to get the
full chain of categories in which the product is located in the catalog/controller/product/product.php file , tell.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zoozag, 2018-04-28
@lexstile

You most likely have a bare Opencart without seo_pro, which means that the main category is not set for the product in the admin panel.
Accordingly, you will not get the full path to the product in any way, because. he is not.
The easiest solution is to install seo_pro

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question