Jump to content
thirty bees forum
  • 0

Duplicate friendly sub-category URLs from within different categories


Question

Posted

I've now uploaded about 1000 products to my development store, complete with creating categories, manufactures, etc. This has all be done over the API, which so far has been working very well.

Today however I came across a problem with the friendly URLs. I suspect this problem may exist "by design" but I would like to confirm.

One thing we have with certain categories is a subcategory "by brand" with the various brands listed under it. Many brands make more than one type of product so their brand can exist in multiple places. Korg for example makes both AV equipment and musical instruments, so we have the following two categories:

https://www.inxonline.com/index.php?id_category=448&controller=category

and

https://www.inxonline.com/index.php?id_category=587&controller=category

However when I enable friendly URLs these both get shortened to "korg" with no category path included in the URL:

https://www.inxonline.com/korg

The friendly URL won't work right now because I turned the feature off while I figure this out.

Is there anything that can (or should) be done about this? If it's really necessary I can remove the "by brand" sections, but if there is an effective workaround that won't penalize SEO then I'd be interested in learning how to make it work.

7 answers to this question

Recommended Posts

  • 0
Posted

I haven't tested this yet, but maybe you should take a look at the new section "duplicate urls" under preferences. About being penalized, why do you think you will be penalized? The idea is to get a new name to one of those categories, like: korg-1 or something.

  • 0
Posted

@yaniv14 said in Duplicate friendly sub-category URLs from within different categories:

I haven't tested this yet, but maybe you should take a look at the new section "duplicate urls" under preferences.

Does this exist in 1.0.1? I looked but can't see anything there. If not, how do I add it to try it out?

The idea is to get a new name to one of those categories, like: korg-1 or something.

I read the thread where one user proposed adding IDs to category URLs to avoid collision problems, and adding numbers to create unique category names is also possible, though not particularly visually appealing.

Another idea would be to include the category path in the URL instead of just the final category. In this case instead of both URLs converting to /korg, one would convert to /audio-video-equipment/by-brand/korg and the other would convert to /musical-instruments/by-brand/korg.

The problem is that I don't know if the longer URL path is a good idea or if it is even possible in 30bz. On the surface including the full category path in the URL (or having the option to do so) seems like an elegant solution. On the other hand I have no idea what the downsides are (SEO? technical?) to doing this.

About being penalized, why do you think you will be penalized?

I've never run a site where I had to be actively concerned about SEO before. I'm learning but it's still somewhat of a black art to me. Conventional wisdom seems to be that including IDs in URLs is bad for SEO, but as shown in the thread you linked to, not everyone thinks this way. It certainly looks inelegant to include IDs in URLs but looking inelegant doesn't always mean it's a bad solution. Likewise, something looking nice (like a category path URL) doesn't automatically make it the best choice.

  • 0
Posted

@mdekker said in Duplicate friendly sub-category URLs from within different categories:

Marking this as solved, because that admin page is supposed to be the solution.

I just tried adding AdminDuplicateUrls and it crashes with a [PrestaShopException] when trying to access the menu item.

This is on a Cloudways installation of 1.0.0 that was upgraded to 1.0.1 using the 30bz upgrade process. From memory the upgrade completed without errors.

0_1498069409950_duplicate_urls_menu.gif

0_1498069420325_duplicate_urls_exception.gif

I assume I have done something wrong... Any ideas?

  • 0
Posted

The top of that file mentions PS in the notes in a couple of places:

* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://www.thirtybees.com for more information.

Going to download the file now and try to use it.

  • 0
Posted

Okay, I feel like an idiot but I can't make it work.

Where, exactly, should that file go? The error says controllers/duplicate_urls/duplicates.tpl which isn't a full path. I have looked everywhere and dropped the duplicates.tpl file in many places but the error remains.

Help?

  • 0
Posted

So I figured out where it should go by installing 30bz 1.0.1 and then using Linux find to locate the file. It now works and I'll try it out to see how it goes.

Edit: If anyone else is wondering the full path from your public_html root should be: administrator/themes/default/template/controllers/duplicate_urls/duplicates.tpl

  • 0
Posted

After doing my best to replicate the problems I had before I have been unable to do so. The problems may have been related to the other problems I had when Brad was installed, but I'm not sure if everything was caused by Brad or if it was a coincidence. As far as I can tell everything is okay with the way 30bz creates & works with SEO-friendly category URLs. I have marked this as solved.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...