Post by Xark » Fri Aug 27, 2010 8:33 pm

Hi

SEO URLs are working fine no problem there - it's a nice way it has been implemented.

However, we want to avoid having 1 product having 2 different URLs

Examples:

product#234 (SEO URL name: product#234.html ) is linked as a recent item on the front page. URL is: http://www.store.com/product#234.html

product#234 belongs to category#5 (SEO URL: category#5) and when I browse to that category and go to the product view of the page, the URL is: http://www.store.com/category#5/product#234.html

This one product then have 2 URL's messing up on our google

http://www.store.com/product#234.html
and
http://www.store.com/category#5/product#234.html

Is there a way to make it so when you browse to the category, you see

http://www.store.com/category#5

and when you then press the link to the product, you come to

http://www.store.com/product#234.html

- what I'm thinking is a re-write of the SER URL php file, that either removes the category SEO URL from the link URL inside the category or the other way around, that the products on the front page, includes category SEO URL - this would actually be the better solution.

Anyone who is able to help? - because that is php programming that I am not able to do :'(

Newbie

Posts

Joined
Fri Aug 27, 2010 8:18 pm

Post by Xsecrets » Fri Aug 27, 2010 8:45 pm

yes it can be done I think there are instructions somewhere. You would need to remove the category and manufacture information from product links. It's not terribly difficult, I have it done on my site. It's been proposed as the default to keep people from complaining about the duplicate URL nonsense, but then lots of "seo experts" came out of the woodworks claiming that not having the category/manufacturer in the url is worse than "duplicate content"

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 Xark » Fri Aug 27, 2010 9:06 pm

Hehe yea, everyone's an expert and everyone want it on a specific way

Thanks for the reply, I'll try to dig harder for the instructions :)

Cheers

Newbie

Posts

Joined
Fri Aug 27, 2010 8:18 pm

Post by Xark » Sat Aug 28, 2010 2:16 am

Great, found it :)

This post covers it, however the change suggested in post 1 does not work for the 1.4.8

http://forum.opencart.com/viewtopic.php?f=31&t=7898

You should change \catalog\controller\product\category.php

line 168:
from

Code: Select all

'href'    => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&path=' . $this->request->get['path'] . '&product_id=' . $result['product_id']),
to

Code: Select all

'href'    => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $result['product_id']),
That way it always displays the product as http://www.store.com/product#234

Easy hack :)

Newbie

Posts

Joined
Fri Aug 27, 2010 8:18 pm

Post by grooverdan » Sat Sep 25, 2010 11:08 am

patch here http://code.google.com/p/opencart/issues/detail?id=195

database enforcement of uniqueness and optimisation of database queries.

New member

Posts

Joined
Sun Jul 04, 2010 9:08 am
Who is online

Users browsing this forum: No registered users and 2 guests