Jump to content

Some unlogical behaviour with categories [SOLVED].


Recommended Posts

Hi.

 

It looks like this:

 

I upgraded form 1.5 to 1.6.1.

 

Then Installed fresh install of newest version - 1.6.1.0 and imported database to it - just in case, to avoid errors etc.

Everything works fine, but there is one problem.

 

It started when I wanted to use multistore function. During the process of setting it up - there is a field where I have to choose root category. But here is no one.

 

The shop works fine but has no root category defined.

 

So i checked database and it appear that root category has an ID of 686 (should be 1) and home category has an ID of 1 (should be 2).

 

I don't know why it is that way and who did it before me.

 

So I decided to repair this situation. And here is funny part.

 

I set IDs of categories in database so root is 1, home is 2 and category that was 2 - now is 686.

Also edited id_parent, position etc in all respective tables regarding categories.

For the end I set form 0 to 1 in the "root" column of ps_category table to "home" category (that how it looks on fresh install - home is set to root category).

 

Now whenever I open "categories" in admin - I see the old category ( I see "bike accessories" instead of root/home), but why - this category is not set as root?

 

Question is - what am I missing - I edited everything in database correctly - it looks like there is a saved setting somewhere that sets id for root category and it is not in database. I can enter other categories only if I modify url, by adding &id_category[iD] - and then the breadcrumbs of categories looks ok. But when I click on home or root - I see category id is 686 (the old root category) in the url and the name is "bike accessories".

 

Important thing is that category 686 had no 1 in "root" column in database - so technically it was not set as root.

 

WTF ?

 

Earlier I set category 686 to root. Then while creating new store in multistore I could choose root category.

But after creating (importing from main store) second store all the products have no names. This is really f**d up.

 

I think it has something to do with those messed up categories that's why I decided to mess with it.

 

Anyone has any lead on this ?

 

I have test installation and backups so I can freely test and modify things.

 

Thx,

Mac

 

 

 

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

Ok - Solved it.

 

To everyone who has hard time with categories 

 

In ps_category set id_category for root  to 1, home to 2 and  for home set to 1 in is_root_category collumn

Don't forget to edit id_parent accordigly and edit other id_category column in other tables.

 

The best part:

 

Check also tables ps_configuration and there you can seet id_category for root and for home - set accordingly.

Also in ps_shop set id_category to your root category (which sholud be 1) - root category - not the one set as root.

 

Regards,

Mac

  • Like 2
Link to comment
Share on other sites

  • 1 month later...
×
×
  • Create New...