Post by AlmightyNinja » Tue Aug 09, 2011 7:22 pm

Hellow,
I'm new - as OpenCart user and forum member so first hi to everbody :) . I have a problem that I don't know how to solve with duplicate content. Here is what I'm reffering to for example:
http://sexydress.us/long-sleeve-top
http://sexydress.us/sexy-lingerie/long-sleeve-top
http://sexydress.us/sexy-lingerie/linge ... sleeve-top
Same product that you can access through all of the above links ( it depends on how you access them if from frontpage it's a direct link without category, if from category you get category + product, .... ) and I would like that it would be available only for example through http://sexydress.us/sexy-lingerie/linge ... sleeve-top so if product is in subcategory it's unique URL would be in http://sexydress.us/category/subcategory/product. Is that possible?

And the other problem is with showing subcategories on frontpage in the right side of the content if now only shows parent categories and doesn't show children categories is that possible that it would show categories and all of the subcategories?

Hope I was understandable :). Thanks for all of the replies.

Newbie

Posts

Joined
Tue Aug 09, 2011 7:13 pm

Post by uksitebuilder » Tue Aug 09, 2011 7:25 pm

Looking at the source code of any of those links you will see

<link href="http://sexydress.us/long-sleeve-top" rel="canonical" />

This tells search engines which page is the real page and will avoid the dupe content issue

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by AlmightyNinja » Wed Aug 10, 2011 12:01 am

Thanks uksitebuilder for the answer. Anybody knows how to solve category display problem?

Newbie

Posts

Joined
Tue Aug 09, 2011 7:13 pm

Post by combusus » Sun Aug 14, 2011 2:14 pm

AlmightyNinja wrote:Thanks uksitebuilder for the answer. Anybody knows how to solve category display problem?
Using canonical links is like putting a band-aid on a broken leg so here's the fix, replace seo_url.php (catalog\controller\common\seo_url.php) with the attached seo_url.php. This is tested and working on version 1.5.1.1. Note were using uksitebuilder's Homepage SEO URL posted in this thread http://forum.opencart.com/viewtopic.php?f=20&t=37271 so now you can also get rid of the UGLY URLS with a simple query through phpmyadmin:

INSERT INTO url_alias (query, keyword) VALUES ('account/register', 'register.html');

After executing the above query the UGLY URL http://demo.opencart.com/index.php?rout ... t/register is now http://demo.opencart.com/register.html

Let us know how it works out - Combusus

Attachments

Fixes the SEO Category Path URLS


User avatar
Newbie

Posts

Joined
Mon Feb 21, 2011 7:31 am

Post by uksitebuilder » Sun Aug 14, 2011 2:39 pm

Be careful not to change the search path for the search page though otherwise search queries break with slashes and ampersands

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Xsecrets » Sun Aug 14, 2011 4:47 pm

ok so what is your solution to the duplicate urls problem? do you only ever show product level urls, or do you guess at the categories, since there is no possible way to know what category you want to show in opencart since it allows you to assign a product to multiple categories.

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 combusus » Mon Aug 15, 2011 3:06 am

Another area of serious concern is the google sitemap which is outputting duplicate urls, example if you have a product listed under a manufacturer and in 2 secondary categories then the sitemap is outputting 3 urls to the same product each with a different url. If you have a large store with 500 products setup like this then your sitemap would have 1500+ urls when it should only have 500.

The quick fix is commenting out lines 12-18 and 39-45 in google_sitemap.php (catalog\controller\feed\google_base.php), this fixes the duplicate urls output by the sitemap - Combusus

User avatar
Newbie

Posts

Joined
Mon Feb 21, 2011 7:31 am

Post by uksitebuilder » Mon Aug 15, 2011 3:34 am

It wont hurt leaving them if you don't wish to mess with the code, because the canonical URL in the product page takes care of duplicate content anyway.

Having said that, there is no need to submit all those links so the fix above is OK too.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by AlmightyNinja » Thu Aug 25, 2011 8:00 pm

Thanks to everybody for clarification. On the other problem I have to also show all subcategories on frontpage I have found thread http://forum.opencart.com/viewtopic.php?f=20&t=3128 , but it seems it's for older version of OpenCart as code isn't the same.

Newbie

Posts

Joined
Tue Aug 09, 2011 7:13 pm

Post by AlmightyNinja » Wed Aug 31, 2011 5:09 am

Anyone knows how to solve this subcategory display problem?

Newbie

Posts

Joined
Tue Aug 09, 2011 7:13 pm

Post by kyprios1 » Tue Sep 13, 2011 1:24 am

@combusus your mod is working great apart from one glitch i found.
When there are subcategories it mashes the cat+subcat aliases together.

edit
I fixed it. at line 43:

Code: Select all

<        return implode('',$result);
>        return implode('/',$result);
you missed it proly :)

edit2
It does produce an extra slash in front of the parent category though when coming from a tag or search and the destination is a product with one category depth i.e. domain.com//cat/product?filter_name=blablah. If the product is in a subcategory the url is ok. Anyway as long as you're keeping the base href statement in the header it is not a problem, the browser follows the url ok.

In retrospect I think you didn't really miss the slash fix I mentioned above, nonetheless for lack of a better solution on the catsubcat mashup problem, i'm keeping that in for now.

New member

Posts

Joined
Mon Jan 31, 2011 9:56 am

Post by kyprios1 » Tue Sep 13, 2011 9:01 am

OK I got to a proper solution after all.
At line 43 of the new seo_url.php:

Code: Select all

<        return implode('',$result);

>        $pathsld = implode('/',$result);
>        $pathcnd = ltrim($pathsld, '/');
>        return $pathcnd;

New member

Posts

Joined
Mon Jan 31, 2011 9:56 am

Post by Gloyns » Fri Sep 16, 2011 2:09 pm

Hi Everyone :) Sorry to wade in here. I'm an SEO, not a Developer, so I'm looking at this from just one angle. I appreciate there is an ongoing debate around SEO URLs within Opencart, and this is just my 2 cents.

Whilst Opencart cites a canonical URL for each product, this canonical URL is rarely, if ever, linked to anywhere within a site as the product is always linked to from within a category or manufacturer page. So, the canonical is saying 'Yeah, this is just a copy of the original version of this more important, original, document that you'll find here... which, err, I don't link to anywhere on my website'.

Separate to whether this issue does effect SEO, I would always prefer for each product to always have one URL just to be consistent. Does the fix described here fix that? I'm yet to find a CMS that can effectively deal with this... I'm hoping opencart can. :)

http://www.gloyns.com


Newbie

Posts

Joined
Sat May 21, 2011 7:01 am
Location - Melbourne, Australia

Post by uksitebuilder » Fri Sep 16, 2011 3:48 pm

the products are linked to directly from modules such as best seller, latest products, featured products etc.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Gloyns » Mon Sep 19, 2011 7:00 am

That's exactly what I mean though Simon - the canonical links to the 'original' page which is only when a product is perhaps temporarily listed as a latest, featured or best selling product. What about products that don't fall into those categories at any time?

For my purposes (and I appreciate this wouldn't fit into everyones needs), I'd like to at least have the Manufacturer version of the URL as the canonical. Does anybody know how this can be achieved?

http://www.gloyns.com


Newbie

Posts

Joined
Sat May 21, 2011 7:01 am
Location - Melbourne, Australia

Post by uksitebuilder » Mon Sep 19, 2011 2:48 pm

Open: catalog/controller/product/product.php

find:

Code: Select all

			$this->document->addLink($this->url->link('product/product', 'product_id=' . $this->request->get['product_id']), 'canonical');

change to

Code: Select all

			if($product_info['manufacturer']){
				$this->document->addLink($this->url->link('product/product', $url . '&manufacturer_id=' . $product_info['manufacturer_id'] . '&product_id=' . $this->request->get['product_id']), 'canonical');
			}else{
				$this->document->addLink($this->url->link('product/product', 'product_id=' . $this->request->get['product_id']), 'canonical');
			}


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Gloyns » Tue Sep 20, 2011 12:47 am

Nice, thanks Simon! :) I also found this post that solves the issue for me perfectly and is, imo, the best solution from an SEO perspective http://forum.opencart.com/viewtopic.php ... 24#p198324

http://www.gloyns.com


Newbie

Posts

Joined
Sat May 21, 2011 7:01 am
Location - Melbourne, Australia

Post by uksitebuilder » Sun Nov 06, 2011 3:19 pm

There are a lot of un-needed links in the sitemap, but, the landing page for these links (i.e. the product page in most cases) is where the canonical link is (it's in the HEAD section of the product page)

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by xlam » Mon Feb 06, 2012 1:48 pm

i download se_url.php , my website working well, thanks

Baju Muslim Baju Pria Baju Anak Baju Korea Sparepart Printer Baju Muslim JNE Surabaya


New member

Posts

Joined
Sun Dec 25, 2011 2:58 pm

Post by seolinktech » Mon Feb 06, 2012 6:03 pm

Duplicate content and multiple URL is now a very big problem and it is difficult to choose among them.........

What is Link Building|What is SEO


Newbie

Posts

Joined
Mon Feb 06, 2012 5:51 pm

Who is online

Users browsing this forum: No registered users and 120 guests