editorstefan Posted July 15, 2013 Share Posted July 15, 2013 Hello! Alot products on my website will have same name. I use Friendly URL's without ID number and want my urls to be like this: www.name.com/TITLE/REFERENCE.html Settings i got in backoffice for URL to product: {rewrite}/{reference}.html But still all products with same "friendly url" (product title) goes to same URL. How can i fix that: 1. They don't redirect to another product and is checked by reference (which is different for all products). 2. When selecting generate URL in product tab it takes product title + reference. Link to comment Share on other sites More sharing options...
Martin Uker K Posted July 15, 2013 Share Posted July 15, 2013 Hi, I'm not sure of what I am about to say, but it could help you figure it out: This is only a supposition of what could be happening. Changing the backoffice URL might not change the product URL already GENERATED. Which mean that your products already in store has to be changed manually. 2 ways to prove this : 1. When you hit the "generate" button in SEO (Product edition page's tab), does it generate the right URL? 2. When you create a new product (With a reference) does he have the right URL generated? If these test are right, it means that you're gonna have to manually edit every products to generate the URL in every language (might be long) or create a script to do so. Best regards, Martin Link to comment Share on other sites More sharing options...
editorstefan Posted July 15, 2013 Author Share Posted July 15, 2013 Hi, I'm not sure of what I am about to say, but it could help you figure it out: This is only a supposition of what could be happening. Changing the backoffice URL might not change the product URL already GENERATED. Which mean that your products already in store has to be changed manually. 2 ways to prove this : 1. When you hit the "generate" button in SEO (Product edition page's tab), does it generate the right URL? 2. When you create a new product (With a reference) does he have the right URL generated? If these test are right, it means that you're gonna have to manually edit every products to generate the URL in every language (might be long) or create a script to do so. Best regards, Martin When i hit 'generate url' it only takes from product title for both new and old products. What can i do? I have imported only 20products so far, will be 200 soon so can i do something before importing all? Link to comment Share on other sites More sharing options...
Martin Uker K Posted July 15, 2013 Share Posted July 15, 2013 I never used this feature before, so I took the time to try it in my own shop. Here's my discovery : ID is mandatory. You need to have the ID at least ONCE in the URL. it is written on the top of the section: keywords with * are required You can't achieve your goal without the ID. Also, hitting the generate button doesn't affect the url rewriting, that's my mistake, it only regenerate the "rewrite" fields in the product based on the title. Martin 1 Link to comment Share on other sites More sharing options...
editorstefan Posted July 15, 2013 Author Share Posted July 15, 2013 Yes and i use The remove id module linked in thread text. Now i dont need to use ID anymore. Link to comment Share on other sites More sharing options...
Martin Uker K Posted July 15, 2013 Share Posted July 15, 2013 Oh yeah forgot this part!... Did you try turning URL rewriting off and on again? Also I'm not sure if the override make the validation possible of if it only REMOVE the id after ( Which means that you would still need the ID in the name, but it would remove the ID after. Martin 1 Link to comment Share on other sites More sharing options...
editorstefan Posted July 15, 2013 Author Share Posted July 15, 2013 Oh yeah forgot this part!... Did you try turning URL rewriting off and on again? Also I'm not sure if the override make the validation possible of if it only REMOVE the id after ( Which means that you would still need the ID in the name, but it would remove the ID after. Martin The "rewrite" must be there with this module. Now when i delete module i still cant get ID showing :s Link to comment Share on other sites More sharing options...
Martin Uker K Posted July 16, 2013 Share Posted July 16, 2013 It wasn't really a module...much more like a bunch of override. Make sure you deleted them all in "override". I had a question, why did you want the erase the ID in the irst place? Martin Link to comment Share on other sites More sharing options...
editorstefan Posted July 16, 2013 Author Share Posted July 16, 2013 It wasn't really a module...much more like a bunch of override. Make sure you deleted them all in "override". I had a question, why did you want the erase the ID in the irst place? Martin Fixed it now. Well i want delete the ID's since i thought they ware preatty much useless. And then i understood i need to make each url unique so i wanted to take the reference number to be instead of ID numbers. Tried to play with some coding but ended up with keeping ID for products and remove for the rest. Any idea what code i should change so instead of ID numbers its reference number? Link to comment Share on other sites More sharing options...
Martin Uker K Posted July 16, 2013 Share Posted July 16, 2013 Not really, I would need time to get a clear answer and even there I wouldn't be able to assure you it would be bugfree. URL rewritting is quite complicated and I usually never leave that to the client and I never had to deal with it in prestashop. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now