-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SEO URL - Categories #2384
Comments
Hi Daniel, Has this been resolved recently? Thanks |
While i know that the current generation of SEO URLs is not perfect, why not using (e.g.) jackets-men (or jackets_men) as keyword? |
Hi osworx, Thanks for your input, I understand there are ways around the issue :) I have raised the issue in order to bring it to the attention of the dev team so it can be looked at ;) It is an issue that I believe will cause much confusion with OC users and can be addressed from a technical standpoint. The issue effectively means that users can't have a duplicate seo keyword at any level in their category structure, which is not a restriction that most will find acceptable, especially in today’s SEO driven environment. An additional issue is that there is no warning that a duplicate situation exists, so store owners will be totally unaware that their category listings aren't showing correctly. I know of no other shopping cart available, that places this kind of restriction on the URL structure. Iteratively constructing the URLs would be OK, but if using this method, the application must maintain the category structure, otherwise the results effectively become 'luck of the draw'. Cheers |
Hi danielkerr, I'm at a loss as to why this issue has been closed. Thanks |
this doesnt have to be a problem, there is no need for categories of different paths to have unique keyword !! |
Hi,
The way in which SEO URL's are created for category listings has an issue which I believe needs addressing. The problem may also affect other areas, but I haven't yet come across any yet.
If we take two category SEO URL example routes below:
/jackets/men
/hats/men
Lets say the categories above have the following category ID's in the database:
jackets = 1
(jackets/) men = 2
hats = 3
(hats/) men = 4
The above routes are passed to the seo_url.php script which then explodes the URL into separate categories parts (e.g. array(jackets, men).
It then iterates through each part in the array and searches the url_alias table in the database on the 'keyword' field for a matching entry.
So for /jackets/men, it first searches for jackets and gets the 'category_id=1', after which it searches for an entry for 'men' and get the first matching entry 'category_id=2'. It then uses category 2 to form a SQL query to find products in that category and display the results.
Now we go to /hats/men. The script searches for the keyword 'hats' in the table, which returns ID 3, then it searches again for 'men' which again returns category 2, as this is the first match in the table. However, the category we wanted was 4!
There are two issues here:
IMHO I think that it would be better to have a flatter structure and simply have entries in the url_alias table that correspond directly to the route in question.
For example:
/hats/men => category_id=4
Alternatively, keeping the existing system would mean tracking the parent of an alias in the url_alias table as well to ensure that the category structure doesn't get broken.
The text was updated successfully, but these errors were encountered: