Gipielle Posted May 17, 2011 Share Posted May 17, 2011 I have many many categories. Each of the categories contain a code. The code has numbers, letters and special characters. All toghether are very long (more than 64/128 characters).Now my question is: how can I import these categories exactly as they are in my database?I tried to use the import tool, but prestashop 1.4.1.0 gives me strange behaviour because of the numbers contained in the names of my categories: PS once you click on a product in one of these categories it gets the number as an ID and it goes back to the category linked to that ID and not to the right product or category.Post Scriptum: I head the 1.4.2.0 may solve this problem but i cannot find it: when does it go out ? Link to comment Share on other sites More sharing options...
gonandriy Posted May 17, 2011 Share Posted May 17, 2011 Did import was successful? Do you have all of your categories in prestashop database? Link to comment Share on other sites More sharing options...
Gipielle Posted May 17, 2011 Author Share Posted May 17, 2011 Yes, but the problem is not import but url rewrite i think Link to comment Share on other sites More sharing options...
gonandriy Posted May 18, 2011 Share Posted May 18, 2011 If such behaviour in front office, may be you can give link? Link to comment Share on other sites More sharing options...
Gipielle Posted May 18, 2011 Author Share Posted May 18, 2011 This is the link of a product in my front office:http://www.betafer.it/ps/101511-6600-m221-assortimento-77-utensili-con-ganci-senza-pannellIf you click on the product or view it, prestashop goes to an unknow category because of the url rewriting. in the url rewrite there is the name of the product and a code composed by numbers and letters. Prestashop gets that code as category ID and in this case it is not a category.In this case our (product's prestashop ID = 66000221, category's ID 101511).PrestaShop gets 6600 as category from the url rewriting giving an error.In case the code would have been a valid prestashop category ID clicking the product link would put the custumer in a completely different category.Because we have all our sub-subcategories (third level category) made of code and name, most of the links are wrong.In the import csv file we gave as URL Rewrite a unique number (Each one of our products has its own number). Link to comment Share on other sites More sharing options...
gonandriy Posted May 18, 2011 Share Posted May 18, 2011 Try this:find in your prestashop installation file .htaccess and swap this two lines:RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]* /foto/ua/category.php?id_category=$1 [QSA,L]RewriteRule ^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /foto/ua/product.php?id_product=$1 [QSA,L]Please let me know what happened. Link to comment Share on other sites More sharing options...
Gipielle Posted May 18, 2011 Author Share Posted May 18, 2011 Great !! It works !! Thanks a lot, you are a wizard ! Link to comment Share on other sites More sharing options...
gonandriy Posted May 18, 2011 Share Posted May 18, 2011 I was glad to help you! 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