Jump to content

How to update categories menus after having changed the categories hierarchy in the DB using SQL?

Recommended Posts

Willing to mass-modify the "URL rewritten field" of all my categories I have imported a CSV file of 2 fields: ID (of the categories already in the database and populated) and the URL. Unfortunatelly the effect was different from what I had expexted: all the categories have moved to the top level leaving their parent categories (I supposed the parent group field will be left uncanged if not specified in the file imported).


Seeking to fix this quickly (editing every category through the administration panel would take too long) I have written a quick SQL UPDATE query to change the ps_category.id_parent field to what I need.


As the result I have got the correct category hierarchy as seen in the administration panel and the shop site structure (if I open (click) one of the top categories I can see the pictures of the subcategories that belong there).


But if I don't click the top category but just hover the mouse over it to open the pop-up subcategories menu I can only see the subcategories that I have moved there manually. The same problem applies to the left vertical (I use the default PrestaShop 1.6 theme) categories menu.


What do I need to do for these menus to catch up with the categories hierarchy in the database?

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

  • 2 weeks later...

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