- Posts: 97
- Thank you received: 0
Fields in #__hikashop_category, left and right?
11 years 11 months ago #173884
by shpuser
Fields in #__hikashop_category, left and right? was created by shpuser
-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.4
I import categories with a custom script and everything is ok. but i try to add a product to this cateogry then is category path wrong:http://prntscr.com/4s0zwi, i seen in database, in the table for cateogries are two fields and they are everytime different:
"category_left and category_right", which type of values how i to generate to have true category path?
At the moment are my all values on: 0 prntscr.com/4s0zcu
-- Joomla version -- : 3.3.4
I import categories with a custom script and everything is ok. but i try to add a product to this cateogry then is category path wrong:http://prntscr.com/4s0zwi, i seen in database, in the table for cateogries are two fields and they are everytime different:
"category_left and category_right", which type of values how i to generate to have true category path?
At the moment are my all values on: 0 prntscr.com/4s0zcu
Please Log in or Create an account to join the conversation.
11 years 11 months ago - 11 years 11 months ago #173888
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Fields in #__hikashop_category, left and right?
Hi,
Left/Right is coming from the "b tree" algorithm, also use in Joomla for they tree structures.
It's not related to HikaShop.
en.wikipedia.org/wiki/B-tree
Regards,
Left/Right is coming from the "b tree" algorithm, also use in Joomla for they tree structures.
It's not related to HikaShop.
en.wikipedia.org/wiki/B-tree
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 11 years 11 months ago by Jerome.
Please Log in or Create an account to join the conversation.
11 years 11 months ago #174411
by shpuser
Replied by shpuser on topic Fields in #__hikashop_category, left and right?
Ok. many thanks, can you please give me a guide, which values have i to insert, are they a auto values as primary key? A read this but technical i have no idea...
Please Log in or Create an account to join the conversation.
11 years 11 months ago #174412
by nicolas
Replied by nicolas on topic Fields in #__hikashop_category, left and right?
Hi,
HikaShop has a built-in function to regenerate all the left/right/level fields of all the categories. It's done when you click on the "rebuild" button of the categories listing in the backend.
So you could simply call that same code from your script.
You can look at the rebuild() function of administrator/components/com_hikashop/controllers/category.php
HikaShop has a built-in function to regenerate all the left/right/level fields of all the categories. It's done when you click on the "rebuild" button of the categories listing in the backend.
So you could simply call that same code from your script.
You can look at the rebuild() function of administrator/components/com_hikashop/controllers/category.php
Please Log in or Create an account to join the conversation.
11 years 11 months ago #174497
by shpuser
Replied by shpuser on topic Fields in #__hikashop_category, left and right?
I implemented it in my script, works well, thank you...
Please Log in or Create an account to join the conversation.
Time to create page: 0.173 seconds