Hi,
OC 3.0.3.1 "Canonical" Not working on product, category, information, manufacturer
Sample of code in controller/product/product.php
$this->document->addLink($this->url->link('product/product', 'product_id=' . $this->request->get['product_id']), 'canonical');
Sample of code in controller/product/category.php
if ($page == 1) {
$this->document->addLink($this->url->link('product/category', 'path=' . $category_info['category_id']), 'canonical');
} else {
$this->document->addLink($this->url->link('product/category', 'path=' . $category_info['category_id'] . '&page='. $page), 'canonical');
}
Any suggestions?
OC 3.0.3.1 "Canonical" Not working on product, category, information, manufacturer
Sample of code in controller/product/product.php
$this->document->addLink($this->url->link('product/product', 'product_id=' . $this->request->get['product_id']), 'canonical');
Sample of code in controller/product/category.php
if ($page == 1) {
$this->document->addLink($this->url->link('product/category', 'path=' . $category_info['category_id']), 'canonical');
} else {
$this->document->addLink($this->url->link('product/category', 'path=' . $category_info['category_id'] . '&page='. $page), 'canonical');
}
Any suggestions?
Link canonicals are working fine. The code is correct. What exact error do you experience? Website URL?
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
This is an issue most likely caused by your web theme, not by OpenCart 3.0.x releases. Please consider a more standard compliant web theme.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
We have cloned the site to localhost, and everything works fine.
Also we have tested the current theme on clean install, and works ok.
We have also installed seopackpro, but still no luck
After 3 days of searching finally we found it. We accidentally deleted the following from header.twig
{% for link in links %}
<link href="{{ link.href }}" rel="{{ link.rel }}" />
{% endfor %}
Now everything is ok.
Who is online
Users browsing this forum: No registered users and 4 guests