A long time ago, I built an importer for xt:Commerce that worked fine up to v4.1. The data came from the same PIM system as before.
But now, v4.2.0 is out, and they've added a nested set for the categories. Anyways that's ok, but they've added two new columns called categories_left
and categories_right
- and they mess up my importer.
First of all, I really don't understand what those columns are for. My importer works and puts all stuff correctly in the database, but in the frontend, the cats style is broken. The cause is that my importer sets all cats in those two columns to 0.
If I add the cats in the backend, it works fine and the frontend style is working. It seems that these columns are incrementing themselves by 2.
categories_id categories_left categories_right parent_id
1 1 2 0
2 3 4 1
3 5 6 1
4 7 8 1
5 9 10 1
So I implemented a func in the importer that will do exactly the same shown above. On the homepage, the frontend style is fine, but if I click on a category the style is broken again.
Could anyone explain what these two columns are for, and how to get this fixed, please?
Got the answer by myself and built a function that loops through the whole cats. This helped me a lot: nested set "Raupe", full documentation here: wolkekraft Nested Set (german)