Jump to content

Categories rename


Recommended Posts

Hi,

 

today I encountered in a very strange thing, when I tried to modify categories and sub categories names. When I modified the name, it updated on the site normally, but in the back office, somewhere I still see the old category name, somewhere the new one.

 

Example:

Old naming:

Home/Computers/Mobile Computers

 

New naming:

Home/Computers/Notebooks (in the Catalog-Categories -> Computers view i still see Mobile Computers)

 

Same thing in the Top Horizontal Menu module. This doesn't happent only on sub categories, but on all level of categories.

 

I use the latest version of Prestashop 1.6.0.11 with default-bootstrap theme.

 

Any idea how to corrent this?

 

Thanks!

Link to comment
Share on other sites

Hi,

 

found the "problem". You have to correct the category name and link_rewrite even in the English language (if you use multiple languages).

 

The workaround can be done in PhpMyAdmin (in SQL manager of Prestashop it doesn't work):

 

/*1. create a category_lang temporary table*/
CREATE TABLE temp_ps_category_lang AS SELECT * FROM ps_category_lang
 
/*2. Update fields NAME and LINK_REWRITE*/
UPDATE `ps_category_lang` cat1
SET name = ( SELECT name FROM temp_ps_category_lang cat2 WHERE cat2.id_category = cat1.id_category AND id_lang = 2) ,
link_rewrite  = ( SELECT link_rewrite FROM temp_ps_category_lang cat2 WHERE cat2.id_category = cat1.id_category AND id_lang = 2) 
WHERE cat1.id_lang = 1
 
/*3. Drop temporary table*/
DROP TABLE temp_ps_category_lang
 
Modify the prefix table name if you entered a different then ps_
 
I hope this will help someone  :)
Link to comment
Share on other sites

×
×
  • Create New...