Post by scd1982 » Sat Jan 19, 2013 1:25 am

Slightly off topic, but this might help someone.

I was having trouble with duplicate content when it came to category and manufacturer pages that get sorted (i.e. same category sorted A-Z or Z-A was getting indexed as two separate pages).

I included the following in my header:

Code: Select all

<?php if ( !empty($_GET['sort']) )  { ?>
	<link rel="canonical" href="http://mysite.com<?php echo parse_url($_SERVER['REQUEST_URI'],PHP_URL_PATH);?>" />
	<?php } ?>
Any page that is sorted now will have a canonical link to http://mysite.com/preferred-category-url

It even works on sub categories, so http://mysite.com/category-url/subcategory-url

I haven't had any trouble with product pages showing up as duplicate content, but this seems to be working for my category and manufacturer pages.

I usually forget to mention I'm using OC v1.4.9.4


New member

Posts

Joined
Tue Mar 27, 2012 3:57 am

Post by jipsa78 » Thu Apr 25, 2013 4:43 pm

Thanks for sharing scd1982!
Another solution for your issue is excluding the sort pages from indexing using the robots.txt file, like so:

Code: Select all

User-agent: * 
Crawl-Delay: 20
Disallow: /*?sort
Disallow: /*&sort
Disallow: /*?limit
Disallow: /*&limit
Disallow: /*?route=checkout
Disallow: /*?route=account
Disallow: /*?route=product/search
Disallow: /*&keyword
Disallow: /*?page=1
Allow: /

Newbie

Posts

Joined
Sun Aug 12, 2012 6:21 pm

Post by jipsa78 » Thu Apr 25, 2013 4:51 pm

I am interested if anyone has found a solution for multi store setups?

The fixes in this thread work perfectly for duplicate products in multiple categories, but not for duplicate products in multiple stores.

Does anyone know which code to add, to check if a product is in multiple stores and if so, to point the canonical to the default store? Or even better, to point the canonical to a specified preferred store id?
Seems like the process would be similar to checking for multiple categories, just with different parameters to call.

EDIT: I guess you would also need to take care of situations when a duplicate product is not in the default store or preferred store id. A solution could be to point the canonical to the store with the lowest store id, instead of the default store.
Or something like: if product not in preferred store id, point canonical to the lowest store id it is in.

If calling a lowest store id is not possible in php code and a specific store id always needs to be specified, a condition to revert to the default canonical tag without store id, would be great for the cases where the duplicate product is not in the specified store id.

Newbie

Posts

Joined
Sun Aug 12, 2012 6:21 pm

Post by mkp007 » Wed Nov 13, 2013 3:33 pm

Featured products and Latest modules seem to be the primary issue for me. Those modules list product's URL as site.com/product. It would be better if I could customize the URL in these modules to be whatever I want, for instance, site.com/category/product. I removed the modules from our homepage until I find a suitable solution.

Vorticy, Inc.
Opencart 1.5.6.4, MySQL 5.1.73-5, PHP 5.3.3-46, Plesk v12.0.18, OS CentOS 6


New member

Posts

Joined
Fri May 10, 2013 12:56 am

Post by stokeyblokey » Wed Dec 11, 2013 2:29 am

kgkaraoke's vQmod does remove the link from the last breadcrumb which is great - there is however one problem in that when you navigate from category>sub-category it removes first the Category one (as this is the final crumb) but then it also removes the sub-category one and does not "re-link" the Category one meaning users cannot use the breadcrumb to go back a level.

It restores both links when you enter a product, and then the breadcrumbs are as they should be again with just the final (product) one not linked.

Highly recommend the robots.txt approach to avoid duplicate indexing :)

Stokey

Stokey


User avatar
Active Member

Posts

Joined
Sat Aug 31, 2013 10:19 pm

Post by ultimatia » Mon Dec 23, 2013 6:49 pm

Hello,

I `ve tried the vQmod uksb_product_canonical.xml and category_in_canonical_url.xml
But i cant see any change in the url on my site. What can I expect to see?

I would like to see: sitename.com/category/sub-category/name.html
Instead of: sitename.com/name.html

Is this possible with this vQmod?

Thanks in advance, Ultimatia

(I`m using 1.5.1.1)

Kaskeus.nl


Newbie

Posts

Joined
Fri Mar 25, 2011 6:19 pm


Post by ultimatia » Thu Dec 26, 2013 7:40 am

No one?!

Kaskeus.nl


Newbie

Posts

Joined
Fri Mar 25, 2011 6:19 pm


Post by aneroxic » Mon Nov 03, 2014 5:09 pm

hi i dont know what to do with the vqmod file (category_in_canonical_url.xml) that i download, what do i do with it or where do i upload it to activate the said change?

Newbie

Posts

Joined
Mon Nov 03, 2014 4:45 pm

Post by chinpack » Sun Mar 15, 2015 1:23 am

Hello
I want
<link href="http://www.domain.in/conspicuous-magent ... aree-11448" rel="canonical" />
on every product page only..
How do I do that?
Please help me..

Newbie

Posts

Joined
Sun Jul 07, 2013 12:55 am

Post by kirkhall » Sun Mar 15, 2015 8:53 am

chinpack wrote:Hello
I want
<link href="http://www.domain.in/conspicuous-magent ... aree-11448" rel="canonical" />
on every product page only..
How do I do that?
Please help me..
You're going to need to use an extension for that.
This one does canonical and much more.
http://www.opencart.com/index.php?route ... on_id=7540
This one does just canonical.
http://www.opencart.com/index.php?route ... n_id=15360

Active Member

Posts

Joined
Thu May 22, 2014 11:31 am

Post by jorjevio » Mon Feb 01, 2016 6:47 pm

I also had this issue with the duplicate content with products in several categories.
I found this post http://www.bensprotips.com/2014/02/addi ... -for-free/
which sets the product name / url to domain.com/product [SEO Keyword:] thereby which ever the category it is in the product Canonical URL is always in the root so to speak. which minimize the url length, and good for seo. And I've seen a dramatic change to the serp ratings.
applicable to opencart 1.5.6.4

Thanks to Ben's top tips.

Newbie

Posts

Joined
Mon Apr 29, 2013 5:19 pm
Location - Greece

Post by rohitkunal » Thu May 26, 2016 8:43 pm

I am using canonical tag code given by UKsitebuilder for product pages but now I want them to show https URL. How to change it?

Ref: http://forum.opencart.com/viewtopic.php ... 1&p=620162

Newbie

Posts

Joined
Wed May 25, 2016 8:45 pm
Who is online

Users browsing this forum: No registered users and 94 guests