Jump to content

Same URL scheme for product and category


ovlcek

Recommended Posts

Hello,

 

I am moving my eshop from Drupal to Prestashop. What I need is to keep exactly the same URLs as on Drupal.

 

Is it possible to set the same URL scheme for both, product and categories? I need them to look like this:

 

http://www.mysite.com/category-name

http://www.mysite.com/product-name

 

When I set both URLs in backoffice to {id}-{rewrite}, I get errors. Products are redirected to the category page with the same ID. If there is no category with the same ID, I get 404.

 

Is there any possibility, or an addon, that will help me to have URLs as I need? I also need to get rid of IDs in URL. I have installed CleanUrls module, but it does not work for me (same scheme for products and categories)

 

Thanks in advance.

 

Ondro

Edited by ovlcek (see edit history)
Link to comment
Share on other sites

Hi Ovlcek,

The standard URL's Prestashop create are, as you noticed with a numerical ID code in it. When selecting a category, it adds the ID of the category to it. When selecting a product, (strangely enough) it shows the category path WITHOUT any ID and then the product with its ID at the front.

For example:

When selecting Category Laptop it shows www.domainname.com/4-Laptop, where 4 is the numerical CATEGORY ID. When selecting a Mac-pro in this category, you get the URL www.domainname.com/Laptop/7-MacPro, where 7 is the numerical PRODUCT ID.

 

Never gave it much thought why they do it like this. I know that the ID ensures that any same product name there might be is distinguished clearly this way. Especially when using Friendly URL's, as there is no check done if the Friendly URL of a product is used anywhere else already (i.e. it's not Unique in the database)

 

So to answer your direct question: No, it's not directly possible to get the drupal like URL's without changing any code. The problem is, that I have no idea how much work it is to change this, (if realistically possible anyway). They probably did it with some reason, so you have to find those reasons and see if you can find a way around it to make it work. A tedious job, as there are many many files involved.

 

I don't know enough about .htaccess file/redirections and if it is possible to redirect the URL's you want to use and map them onto the Prestashop URL's. I'm also not sure if this 'solves' your problem. (Any 'redirection pro' can maybe add something smart here...??)

 

So therefore a question first: WHY exactly do you want to keep the old URL's? Is it because of old SEO you want to maintain, or other reasons?

 

pascal

Link to comment
Share on other sites

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...