Forums / Bug Reports / Rel Canonical for product navigation

Rel Canonical for product navigation

Views: 1,397

Results 1 to 2 of 2
23 Apr 2013, 11:57 AM
#1
dan123 avatar

dan123

New Zenner

Join Date:
Apr 2008
Posts:
82
Plugin Contributions:
0

Rel Canonical for product navigation

Hello!

I noticed that rel canonical is not being used correctly in Zen Cart for product listing pages(except for the first one). Here is what I mean, in the demo store category - "Test Examples" has two pages, the first page has a rel canonical equal to the second one:

<link rel="canonical" href="example.com/index.php?main_page=index&cPath=23" />. This is wrong, the second page should have <link rel="canonical" href="example.com/index.php?main_page=index&cPath=23&sort=20a&page=2" />

More on this 'http://googlewebmastercentral.blogspot.co.uk/2011/09/pagination-with-relnext-and-relprev.html

Though it is easy to fix, just to remove "$excludeParams[] = 'page';" from the init_canonical.php file.

Also I wanted to add rel next/prev to the header by modifying and using functions from split_page_results.php, but so far not so successful. I can not include those functions in the header, could you please help me figure out how to do it correctly?

Thank you!

23 Apr 2013, 12:38 PM
#2
mattzcm avatar

mattzcm

New Zenner

Join Date:
Dec 2010
Posts:
9
Plugin Contributions:
0

Re: Rel Canonical for product navigation

I've also just been trying to figure out a way to add the relevant prev/next links in the <head> on product listing pages too.