Jump to content
Daresh

[Free module] Prestashop canonical, hreflang, next, prev, noindex tags

Recommended Posts

Duplicate content is something that search engine robots don't like.

To avoid it, it's recommended to add canonical links in the header of your shop.

It's also good to:

  • direct robots to other language versions of your shop with hreflang links
  • help them navigate through paginated content with prev and next links
  • prevent them from indexing unnecessary parts of the shop with noindex tag

To achieve all this, we combined some of the common solutions into one handy free module.

You can download the module directly here:

 

gmseofields.zip

or from this location

(module is for prestashop version 1.6, newer version has canonical tags already partially implemented, so maybe other are coming soon)

Edited by Daresh
  • Like 4
  • Thanks 2

Share this post


Link to post
Share on other sites

Hi Daresh

Excellent module and working prefect.

But a suggestion hreflang should contain language code instead of iso code. example:-  

hreflang="en-gb"
hreflang="en-us"

As per google:  Make sure that all language codes you use identify the language (in ISO 639-1 format) and optionally the region (in ISO 3166-1 Alpha 2 format) of an alternate URL. Specifying the region alone is not valid.

Screenshot attached for your reference. 

 

Hope you will make an improvement.

Thanks

Improvement.png

Share this post


Link to post
Share on other sites

Thanks for sharing! ;) The update od hreflang would be awsome! ;)

 

Do you think setting default hreflang where there is only one language is proper?

Edited by Sebastian

Share this post


Link to post
Share on other sites

Thanks for the feedback, I just updated the module to have the language code instead of the iso code, so please test.

I don't know if setting hreflang for sites having one language is proper, but if you have any information about it just let me know and I'll be happy to update the module :)

Share this post


Link to post
Share on other sites

;) I am not sure about it. I try to gain this information reading articles about SEO. But still I am not sure if it is correct. But for instance: 

<link rel="prev" href="https://www.example.com/category-29">
<link rel="next" href="https://www.example.com/category-29?p=3">
<link rel="canonical" href="https://www.example.com/category-29">
<link rel="alternate" href="https://www.example.com/category-29?p=2" hreflang="pl">
<link rel="alternate" href="https://www.example.com/category-29?p=2" hreflang="x-default">

Then, we have the following situation: Because of the fact  that main and the only one languge is "pl".
we have on the page two self-referencing links. I'm still confused about that. 
From one point of view, it is still valuable information for Google (meta), but possibly overflowed.

 

 

Share this post


Link to post
Share on other sites

Hreflang is not required for single language site. Hreflang tells google that the site is available in multiple language and to be shown in particular geo location depending upon language.

Thanks for the module update.

 

 

Share this post


Link to post
Share on other sites

Hello Daresh,

 

Thank you for this free module.

How can we verify module is working ?

Share this post


Link to post
Share on other sites

Thanks Daresh for this module. 

It's working perfect since we don't use layered navigation. 

Do you think it can be modified to work with blocklayered?

Share this post


Link to post
Share on other sites

I don't see a reason why this module should be working with blocklayered module.

Share this post


Link to post
Share on other sites

Hello,

I am currently working on the code to implement in my site prestashop but I am in version 1.7

I'm having a problem with foreach loops.
I used as a base code for a version 1.6

 

{if $page_name == 'category'}
    {foreach $languages as $lang}
        {if $lang_iso != $lang.iso_code}
        <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getCategoryLink($smarty.get.id_category, null, $lang.id_lang,null,null )}/" />
        {/if}
    {/foreach}
{/if}
 
{if $page_name == 'product'}
    {foreach $languages as $lang}
        {if $lang_iso != $lang.iso_code}
        <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getProductLink($smarty.get.id_product, null, null, null, $lang.id_lang, null, 0, false)}/" />
        {/if}
    {/foreach}
{/if}
 
{if $page_name == 'cms'}
    {foreach $languages as $lang}
        {if $lang_iso != $lang.iso_code}
        <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getCMSLink($smarty.get.id_cms, null, false, $lang.id_lang)}/" />
        {/if}
    {/foreach}
{/if}
 
{if $page_name == 'manufacturer'}
    {foreach $languages as $lang}
        {if $lang_iso != $lang.iso_code}
        <link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getManufacturerLink($smarty.get.id_manufacturer, null, $lang.id_lang , null)}/" />
        {/if}
    {/foreach}
{/if}
 
{if $page_name == 'index'}
    {foreach $languages as $lang}
        {if $lang_iso != $lang.iso_code}
        <link rel="alternate" hreflang="{$lang.language_code}" href="/{$lang.iso_code}/"/>
        {/if}
    {/foreach}
{/if}
 
for the index page I did this because I could not make the code work
 
{if $page.page_name == 'index'}
        <link rel="alternate" hreflang="fr" href="https://mysite.com/fr/"/>
        <link rel="alternate" hreflang="de" href="https://mysite.com/de/"/>
        <link rel="alternate" hreflang="en" href="https://mysite.com/en/"/>
        <link rel="alternate" hreflang="es" href="https://mysite.com/es/"/>
        <link rel="alternate" hreflang="it" href="https://mysite.com/it/"/>
        <link rel="alternate" hreflang="nl" href="https://mysite.com/nl/"/>
        <link rel="alternate" hreflang="pl" href="https://mysite.com/pl/"/>
        <link rel="alternate" hreflang="pt" href="https://mysite.com/pt/"/>
        <link rel="alternate" hreflang="ro" href="https://mysite.com/ro/"/>
{/if}

 
 

I am lost so if you have an idea or the variables to use in the foreach to be able to integrate the hreflang tag in other pages it would be the best.

PS: last information my site is in SSL

Edited by montana063

Share this post


Link to post
Share on other sites
On 2/14/2018 at 5:28 PM, Daresh said:

gmseofields.zipDuplicate content is something that search engine robots don't like.

To avoid it, it's recommended to add canonical links in the header of your shop.

It's also good to:

  • direct robots to other language versions of your shop with hreflang links
  • help them navigate through paginated content with prev and next links
  • prevent them from indexing unnecessary parts of the shop with noindex tag

To achieve all this, we combined some of the common solutions into one handy free module.

You can download the module directly here:

gmseofields.zip

(module is for prestashop version 1.6, newer version has canonical tags already partially implemented, so maybe other are coming soon)

Hi, please attach some image with what make your module. Thanks a lot!

Share this post


Link to post
Share on other sites

Hello! :) Thank you for your module and for your time. Really appreciate it.

I noticed that module generate hreflangs with country targeting. (EN-GB, CS-CZ etc.). I really like to have just the languange here, without any further specification. Can you please point me to the right direction? I can modify it myself, but cant find what should :)

 

Thank you!

Share this post


Link to post
Share on other sites

But maybe you should only modify the code of the language? Go to Localization -> Languages and change the EN-GB to just EN.

  • Thanks 1

Share this post


Link to post
Share on other sites

I thought about that, but i was afraid that this can disrupt my translations. I will backup my shop and try that, but i would be happier with just an "get iso" code. Im trying to understand the PHP file :)

 

Again, thank you for your time! :)

Share this post


Link to post
Share on other sites

Ok, its working without problem.. When you need to apply only language without country targeting, all you have to do is change language codes on localization :) Thank you :)

Share this post


Link to post
Share on other sites

This module gave noindex, nofollow to all categories of the website! Please advise how to go around this issue. I've deleted module after I've seen this, but there is still meta noindex, nofollow across pages. 

Share this post


Link to post
Share on other sites

Seems to work well. 

I did not get the same issue than milica. Categories have follow direction.

Edited by bartom34

Share this post


Link to post
Share on other sites

Hello,

Thank you for the module, it is exactly what I needed.

However, for me (I am a novice...) it doesn't work properly. I use it in Prestashop 1.6.1.3

Here is the problem: I tested it with Flang,


     https://www.my_domain.com             Reciprocal not found
2.     https://www.my_domain.com/en     English         We can't found link on alternate location!
3.     https://www.my_domain.com/en     X-default         We can't found link on alternate location!
4.     https://www.my_domain.com/fr     French         We can't found link on alternate location!
5.     https://www.my_domain.com/es     Spanish; Castilian         We can't found link on alternate location!
6.     https://www.my_domain.com/de     German         We can't found link on alternate location!
7.     https://www.my_domain.com/it     Italian         We can't found link on alternate location!

 

I'll be very thankful if you could help me,

Thank you in advance,

Nina

Share this post


Link to post
Share on other sites
10 hours ago, Nina said:

Hello,

Thank you for the module, it is exactly what I needed.

However, for me (I am a novice...) it doesn't work properly. I use it in Prestashop 1.6.1.3

Here is the problem: I tested it with Flang,


     https://www.my_domain.com             Reciprocal not found
2.     https://www.my_domain.com/en     English         We can't found link on alternate location!
3.     https://www.my_domain.com/en     X-default         We can't found link on alternate location!
4.     https://www.my_domain.com/fr     French         We can't found link on alternate location!
5.     https://www.my_domain.com/es     Spanish; Castilian         We can't found link on alternate location!
6.     https://www.my_domain.com/de     German         We can't found link on alternate location!
7.     https://www.my_domain.com/it     Italian         We can't found link on alternate location!

 

I'll be very thankful if you could help me,

Thank you in advance,

Nina

 

Hard to help without seeing the actual site..

 

52 minutes ago, Jason Wong said:

It appears the link for gmseofields.zip is broken.  If anyone has this module, please share it here.  Thank you.

 

Just downloaded it, works fine for me, another download location: http://greenmousestudio.com/en/seo-tags

Share this post


Link to post
Share on other sites

Hello Daresh,

I am not sure that I am allowed to write the link, and I hope that I am not doing something wrong.

The site is https://www.spytechman.comFlang.thumb.JPG.1697c9ff3160ed636ae38fa850fab226.JPG

I am attaching the image as I see it.

I'll be very thankful if you could help me,

Thank you in advance,

Nina

Edited by Nina
ERROR

Share this post


Link to post
Share on other sites
Just now, Nina said:

Hello,

Thank you for the module, it is exactly what I needed.

However, for me (I am a novice...) it doesn't work properly. I use it in Prestashop 1.6.1.3

Here is the problem: I tested it with Flang,


     https://www.my_domain.com             Reciprocal not found
2.     https://www.my_domain.com/en     English         We can't found link on alternate location!
3.     https://www.my_domain.com/en     X-default         We can't found link on alternate location!
4.     https://www.my_domain.com/fr     French         We can't found link on alternate location!
5.     https://www.my_domain.com/es     Spanish; Castilian         We can't found link on alternate location!
6.     https://www.my_domain.com/de     German         We can't found link on alternate location!
7.     https://www.my_domain.com/it     Italian         We can't found link on alternate location!

 

I'll be very thankful if you could help me,

Thank you in advance,

Nina

 

Share this post


Link to post
Share on other sites

Many thanks, Daresh. :)

It's working great for PS 1.6.1.6.

However, I noticed both hreflang and canonical tags are placed far at the bottom of the head section.

How do I get them to be placed on the top, say, after meta keywords?

 

Please advise.  Thank you.

Edited by Jason Wong

Share this post


Link to post
Share on other sites
On 10/9/2018 at 4:11 AM, Jason Wong said:

Many thanks, Daresh. :)

It's working great for PS 1.6.1.6.

However, I noticed both hreflang and canonical tags are placed far at the bottom of the head section.

How do I get them to be placed on the top, say, after meta keywords?

 

Please advise.  Thank you.

You'll need to add a new hook in the <head> section, and modify the module to use this new hook instead, because as it is developed, it is using the default "displayHeader" hook

image.thumb.png.868cd575de212e692797dd92f51d7bf7.png

Share this post


Link to post
Share on other sites

Hi,

Sorry about the question. I installed the module on presta 1.6.1.23 and the installation is ok, the question is any configuration is needed? When I select configuration just a welcome message and donate filed is showed. I'm doing something wrong?

Thank you

Share this post


Link to post
Share on other sites

No configuration needed, the module adds tags directly into the header of your shop.

Share this post


Link to post
Share on other sites

You would need to look into the code of your shop (CTRL + U) and search for "canonical".

Share this post


Link to post
Share on other sites

hello, I want to omit the (rel part prev and rel next ) and edited the file gmseofields.php tell me please if I did it right

 

<?php
/**
 * Adds canonical, hreflang and prev next tags to the header
 *
 * @package   gmseofields
 * @author    Dariusz Tryba (contact@greenmousestudio.com), based on Faktiva and ThirtyBees
 * @copyright Copyright (c) Green Mouse Studio (http://www.greenmousestudio.com)
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
if (!defined('_PS_VERSION_')) exit;

class GmSeoFields extends Module
{
    private $nobotsControllers = array(
        '404',
        'address',
        'addresses',
        'attachment',
        'authentication',
        'cart',
        'discount',
        'footer',
        'get-file',
        'guest-tracking',
        'header',
        'history',
        'identity',
        'images.inc',
        'init',
        'my-account',
        'order',
        'order-opc',
        'order-slip',
        'order-detail',
        'order-follow',
        'order-return',
        'order-confirmation',
        'pagination',
        'password',
        'pdf-invoice',
        'pdf-order-return',
        'pdf-order-slip',
        'product-sort',
        'search',
        'statistics',
    );

    public function __construct()
    {
        $this->name = 'gmseofields';
        $this->tab = 'front_office_features';
        $this->version = '1.0.2';
        $this->author = 'GreenMouseStudio.com';
        $this->bootstrap = true;
        $this->need_instance = 0;

        parent::__construct();

        $this->displayName = $this->l('SEO Fields');
        $this->description = $this->l('Adds canonical, hreflang, prev, next and noindex tags to the header');
        $this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.6.99.99');
    }

    public function install()
    {
        return parent::install() && $this->registerHook('displayHeader');
    }

    public function getContent()
    {
        return $this->context->smarty->fetch($this->local_path.'views/templates/admin/gms.tpl');
    }

    public function hookDisplayHeader()
    {
        if ($this->handleNobots()) {
            // no need to add anything else as robots should ignore this page
            return;
        }
        //Nothing more neaded for ThirtyBees
        if (defined('_TB_VERSION_')) {
            return;
        }

        if (isset($this->context->controller->php_self)) {
            $this->php_self = $this->context->controller->php_self;
            return $this->getSeoFields();
        }
    }

    private function handleNobots()
    {
        if (in_array($this->context->controller->php_self, $this->nobotsControllers, true) || Tools::getValue('selected_filters')
        ) {
            $this->context->smarty->assign('nobots', true);
            return true;
        }
        return false;
    }

    public function getSeoFields()
    {
        $content = '';
        $languages = Language::getLanguages();
        $defaultLang = Configuration::get('PS_LANG_DEFAULT');
        switch ($this->php_self) {
            case 'product': // product page
                $idProduct = (int) Tools::getValue('id_product');
                $canonical = $this->context->link->getProductLink($idProduct);
                $hreflang = $this->getHrefLang('product', $idProduct, $languages, $defaultLang);

                break;

            case 'category':
                $idCategory = (int) Tools::getValue('id_category');
                $canonical = $this->context->link->getCategoryLink((int) $idCategory);
                $hreflang = $this->getHrefLang('category', $idCategory, $languages, $defaultLang);

                break;

            case 'manufacturer':
                $idManufacturer = (int) Tools::getValue('id_manufacturer');
                $hreflang = $this->getHrefLang('manufacturer', $idManufacturer, $languages, $defaultLang);

                if (!$idManufacturer) {
                    $canonical = $this->context->link->getPageLink('manufacturer');
                } else {
                    $canonical = $this->context->link->getManufacturerLink($idManufacturer);
                }

                break;

            case 'supplier':
                $idSupplier = (int) Tools::getValue('id_supplier');
                $hreflang = $this->getHrefLang('supplier', $idSupplier, $languages, $defaultLang);

                if (!Tools::getValue('id_supplier')) {
                    $canonical = $this->context->link->getPageLink('supplier');
                } else {
                    $canonical = $this->context->link->getSupplierLink((int) Tools::getValue('id_supplier'));
                }

                break;

            case 'cms':
                $idCms = Tools::getValue('id_cms');
                $idCmsCategory = Tools::getValue('id_cms_category');
                if ($idCms) {
                    $canonical = $this->context->link->getCMSLink((int) $idCms);
                    $hreflang = $this->getHrefLang('cms', (int) $idCms, $languages, $defaultLang);
                } else {
                    $canonical = $this->context->link->getCMSCategoryLink((int) $idCmsCategory);
                    $hreflang = $this->getHrefLang('cms_category', (int) $idCmsCategory, $languages, $defaultLang);
                }
                break;

            default:
                $canonical = $this->context->link->getPageLink($this->php_self);
                $hreflang = $this->getHrefLang($this->php_self, 0, $languages, $defaultLang);
                break;
        }
        // build new content
        $content .= '<link rel="canonical" href="'.$canonical.'">'."\n";
        if (is_array($hreflang) && !empty($hreflang)) {
            foreach ($hreflang as $lang) {
                $content .= "$lang\n";
            }
        }

        return $content;
    }

    public function getHrefLang($entity, $idItem, $languages, $idLangDefault)
    {
        $links = array();
        foreach ($languages as $lang) {
            switch ($entity) {
                case 'product':
                    $lnk = $this->context->link->getProductLink((int) $idItem, null, null, null, $lang['id_lang']);
                    break;

                case 'category':
                    $lnk = $this->context->link->getCategoryLink((int) $idItem, null, $lang['id_lang']);
                    break;
                case 'manufacturer':
                    if (!$idItem) {
                        $lnk = $this->context->link->getPageLink('manufacturer', null, $lang['id_lang']);
                    } else {
                        $lnk = $this->context->link->getManufacturerLink((int) $idItem, null, $lang['id_lang']);
                    }
                    break;
                case 'supplier':
                    if (!$idItem) {
                        $lnk = $this->context->link->getPageLink('supplier', null, $lang['id_lang']);
                    } else {
                        $lnk = $this->context->link->getSupplierLink((int) $idItem, null, $lang['id_lang']);
                    }
                    break;
                case 'cms':
                    $lnk = $this->context->link->getCMSLink((int) $idItem, null, null, $lang['id_lang']);
                    break;
                case 'cms_category':
                    $lnk = $this->context->link->getCMSCategoryLink((int) $idItem, null, $lang['id_lang']);
                    break;
                default:
                    $lnk = $this->context->link->getPageLink($entity, null, $lang['id_lang']);
                    break;
            }

            // append page number
            if ($p = Tools::getValue('p')) {
                $lnk .= "?p=$p";
            }

            $links[] = '<link rel="alternate" href="'.$lnk.'" hreflang="'.$lang['language_code'].'">';
            if ($lang['id_lang'] == $idLangDefault) {
                $links[] = '<link rel="alternate" href="'.$lnk.'" hreflang="x-default">';
            }
        }

        return $links;
    }

    public function getRelPrevNext($entity, $idItem)
    {
        switch ($entity) {
            case 'category':
                $category = new Category((int) $idItem);
                $nbProducts = $category->getProducts(null, null, null, null, null, true);
                break;
            case 'manufacturer':
                $manufacturer = new Manufacturer($idItem);
                $nbProducts = $manufacturer->getProducts($manufacturer->id, null, null, null, null, null, true);
                break;
            case 'supplier':
                $supplier = new Supplier($idItem);
                $nbProducts = $supplier->getProducts($supplier->id, null, null, null, null, null, true);
                break;
            default:
                return '';
        }

        $p = Tools::getValue('p');
        $n = (int) Configuration::get('PS_PRODUCTS_PER_PAGE');

        $totalPages = ceil($nbProducts / $n);

        $linkprev = '';
        $linknext = '';
        $requestPage = $this->context->link->getPaginationLink($entity, $idItem, $n, false, 1, false);
        if (!$p) {
            $p = 1;
        }

        if (Configuration::get('PS_REWRITING_SETTINGS')) {
            $requestPage = strtok($requestPage, '?');
        }

        if ($p > 1) { // we need prev
            $linkprev = $this->context->link->goPage($requestPage, $p - 1);
        }

        if ($totalPages > 1 && $p + 1 <= $totalPages) {
            $linknext = $this->context->link->goPage($requestPage, $p + 1);
        }

        $return = '';

        if ($linkprev) {
            $return .= '<link rel="prev" href="'.$linkprev.'">';
        }
        if ($linknext) {
            $return .= '<link rel="next" href="'.$linknext.'">';
        }
        return $return;
    }
}
 

Share this post


Link to post
Share on other sites

You want to say that I see it on my website? apparently I see it well

Share this post


Link to post
Share on other sites

So if you still see the prev and next tags in your website's code than you did not do it right.

Share this post


Link to post
Share on other sites

I want to say that I see it well, that is, I do not see the labels

Share this post


Link to post
Share on other sites

Great! So it seems you did the right change. You pasted in the whole module and it's not very good for readability :)

Share this post


Link to post
Share on other sites

Hello, how can I modify the module so that the language tag changes its format, for example, currently in Spanish I have it so hreflang = "es-es"> but I want it to be like this hreflang = "es" I want to change it because it seems to google puts problem if the page label is not equal to hreflang I put this thread where you can see that many people have this problem https://productforums.google.com/forum/#!topic/webmaster-en/dmo8Oupju-0

Share this post


Link to post
Share on other sites
3 minutes ago, juanrojas said:

Hello, how can I modify the module so that the language tag changes its format, for example, currently in Spanish I have it so hreflang = "es-es"> but I want it to be like this hreflang = "es" I want to change it because it seems to google puts problem if the page label is not equal to hreflang I put this thread where you can see that many people have this problem https://productforums.google.com/forum/#!topic/webmaster-en/dmo8Oupju-0

Invalid link, or maybe not a public thread?

Share this post


Link to post
Share on other sites
On 2/14/2018 at 8:28 PM, Daresh said:

Duplicate content is something that search engine robots don't like.

To avoid it, it's recommended to add canonical links in the header of your shop.

It's also good to:

  • direct robots to other language versions of your shop with hreflang links
  • help them navigate through paginated content with prev and next links
  • prevent them from indexing unnecessary parts of the shop with noindex tag

To achieve all this, we combined some of the common solutions into one handy free module.

You can download the module directly here:

gmseofields.zip

or from this location

(module is for prestashop version 1.6, newer version has canonical tags already partially implemented, so maybe other are coming soon)

 

 

Edited by Bilal17
I have Prestashop 1.7.4 version. Which is best canonical tag module?

Share this post


Link to post
Share on other sites
Guest antoxa7
Posted (edited)

I'm not a programmer, and I spent a lot of time solving the problem of canonical links. Everything was decided with this module. Thank you very much!

Edited by antoxa7

Share this post


Link to post
Share on other sites

I just updated the module so it should also give the canonical tag on some other pages then the default ones (like other modules, blogs etc.)

  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited)

Daresh, it works great. Thank you very much.

1.7+ anyone?

Edited by SED Web

Share this post


Link to post
Share on other sites

Hi, at first thank you very much for the module. I've installed today the module over prestashop 1.6.1.20 and works well. I see don't apply labels rel previous next in best seller and new products modules. Is this normal? Aren't implemented in this modules yet?

Thanks in advance. 

 

Share this post


Link to post
Share on other sites

Right, next prev is implemented for category, manufacturer and supplier.

Share this post


Link to post
Share on other sites

Will be implemented the tag for the best seller and new products modules in the future or this isn't necessary for this modules?
By the way, my store is only in one language. How can I remove the hreflang tag?

Thanks again for your reply

Share this post


Link to post
Share on other sites

I will consider adding it, and to remove the hreflang you can add:

return '';

just after:

public function getHrefLang($entity, $idItem, $languages, $idLangDefault) {

 

Share this post


Link to post
Share on other sites

Thank you very much. Worked perfectly!

 

Share this post


Link to post
Share on other sites
Posted (edited)

Great Daresh. Thanks to share your works.

Edited by markoroots
Wrote for error

Share this post


Link to post
Share on other sites
On 2/14/2018 at 5:28 PM, Daresh said:

Duplicate content is something that search engine robots don't like.

To avoid it, it's recommended to add canonical links in the header of your shop.

It's also good to:

  • direct robots to other language versions of your shop with hreflang links
  • help them navigate through paginated content with prev and next links
  • prevent them from indexing unnecessary parts of the shop with noindex tag

To achieve all this, we combined some of the common solutions into one handy free module.

You can download the module directly here:

 

gmseofields.zip

or from this location

(module is for prestashop version 1.6, newer version has canonical tags already partially implemented, so maybe other are coming soon)

Hi, thanks for the great module! Almost everything works correctly for me except for the tag Prev and Next. The prev tag is not displayed at all on all pages and the next tag only indicates page 2, even if the current page is 3 or higher. Maybe someone can help me - Prestashop 1.6.1.23 & Transformer theme 3

Here is an example view-source:https://www.chemodanoff.com.ua/ru/15-чемоданы-hauptstadtkoffer#/page-3

Share this post


Link to post
Share on other sites

Hello, I find the following and is that the attributes do not put the canonical url as it should for example this is the route of the url with its attribute

.../de/abdeckung-fuer-bebe-confort-rodifix-airprotect-gruppe-23.html#/12-gestempelt-racoon_town

but if I observe the canonical url it is the following

.../de/abdeckung-fuer-bebe-confort-rodifix-airprotect-gruppe-23.html

that is, it puts it without identifying the attribute.

the documentation says the following: Such a combination of elements can confuse search engines because it suggests different URLs for indexation. The best practice is to either remove the canonical tag or to link the canonical element to the page itself.

How can I solve it?

 

Share this post


Link to post
Share on other sites

Hi, Daresh,

thanks for the great module!

Almost everything works correctly for me except for the tag Prev and Next. The prev tag is not displayed at all on all pages and the next tag only indicates page 2, even if the current page is 3 or higher.- Prestashop 1.6.1.16

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More