Post by benjamin » Mon Jul 26, 2010 2:43 pm

Hi,

it would be great to have canonical URLs for information pages, too.

We did this as a customization in the catalog/controller/information/information.php with the lines below. But it would be nice to see this in the core.

Code: Select all

// CUSTOMIZATION BEGIN
// CANONICAL URL
$this->load->model('tool/seo_url'); 
$this->document->links = array();
$this->document->links[] = array(
    'href' => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=information/information&information_id=' . $this->request->get['information_id']),
    'rel'  => 'canonical'
);
// CUSTOMIZATION END
 
Cheers
Benjamin

--------------------------------------------------------
Bar54 | Toys in Capetown | Catering in Stuttgart


Newbie

Posts

Joined
Wed May 12, 2010 6:12 am
Location - Germany

Post by Xsecrets » Mon Jul 26, 2010 9:30 pm

why would you ever need them for information pages? As far as I know there is only one url for information pages anyways.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by benjamin » Tue Jul 27, 2010 2:17 pm

you can set the file "SEO_Keyword" for information pages and they will be available with the regular index.php?route=... and the search engine friendly url.

I.e.:
http://www.timelesstoys.co.za/about_us
and
http://www.timelesstoys.co.za/index.php ... ation_id=4

google takes them as duplicate content.

--------------------------------------------------------
Bar54 | Toys in Capetown | Catering in Stuttgart


Newbie

Posts

Joined
Wed May 12, 2010 6:12 am
Location - Germany

Post by Xsecrets » Tue Jul 27, 2010 9:13 pm

sure, but how would google ever get to them by the regular method unless you are linking them that way somewhere?

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by benjamin » Wed Jul 28, 2010 6:44 am

Good question, i have no idea, but they did. :)
The only place I know are the links a user has to confirm during checkout. But I think, google should not be able to get to this point.
Anyway, google managed to get those urls in the index.

--------------------------------------------------------
Bar54 | Toys in Capetown | Catering in Stuttgart


Newbie

Posts

Joined
Wed May 12, 2010 6:12 am
Location - Germany

Post by JAY6390 » Wed Jul 28, 2010 8:40 am

Could be the regular sitemap, or the google sitemap that caused it I guess. I have to say that even though there shouldn't be duplicates really there would be no harm in doing this for most of the core pages

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by SteveSherry » Wed Jul 28, 2010 5:34 pm

I've seen this before,
it was when a site was initially set up, google searched it, and then the admin updated the seo urls after that.

Its a little annoying, but not life threatening :) I agree, with Jay, setting up the canonical wouldn't harm anything.

My Website ¦ Summer Madness Special Offer ¦


Active Member

Posts

Joined
Thu Apr 08, 2010 7:47 am
Location - Wirral, UK

Post by JAY6390 » Wed Jul 28, 2010 7:14 pm

Oh one quick thing to point out, google don't just take your canonicals as being definitive. Matt Cutts on on of his screencasts said google can pick and choose which sites it will use them on

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 34 guests