- Posts: 3
- Thank you received: 0
How to import categories from another component
12 years 8 months ago #140634
by ydl
How to import categories from another component was created by ydl
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 3.2.1
I try to import a list of categories from DJ-Catalog2 to hikashop.
I have a CVS file with all the categories and import it to the SQL directly because I didn't find a category import (just product).
I understand that my "top" categories shoud have the 'category_parent_id' = 2 (product)
the 'category_type' = 'product'
I don't know how to initialize the value of:
- category_left
- category_right
- category_depth
- category_namekey (I put a unique name, BUT saw that it is a 'random' one!?)
- category_created, category_modified - Is this a timestamp?
any help will be appreciated.
I can think about two solutions:
1. Corect the CSV file
2. Have a PHP script to do it
Thanks in advance.
-- Joomla version -- : 3.2.1
I try to import a list of categories from DJ-Catalog2 to hikashop.
I have a CVS file with all the categories and import it to the SQL directly because I didn't find a category import (just product).
I understand that my "top" categories shoud have the 'category_parent_id' = 2 (product)
the 'category_type' = 'product'
I don't know how to initialize the value of:
- category_left
- category_right
- category_depth
- category_namekey (I put a unique name, BUT saw that it is a 'random' one!?)
- category_created, category_modified - Is this a timestamp?
any help will be appreciated.
I can think about two solutions:
1. Corect the CSV file
2. Have a PHP script to do it
Thanks in advance.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 8 months ago #140673
by Mohamed Thelji
Replied by Mohamed Thelji on topic How to import categories from another component
Hi,
I think that hte best solution will probably be to
- Create some products and categories manually
- Export them through a CSV file
- Edit this CSV file so that you'll be able to add your products and categories in it
- Import your CSV file back
I think that hte best solution will probably be to
- Create some products and categories manually
- Export them through a CSV file
- Edit this CSV file so that you'll be able to add your products and categories in it
- Import your CSV file back
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140747
by ydl
Replied by ydl on topic How to import categories from another component
Yes, I did it... BUT it does not explain how the attributes I mentioned get the values...
It seems that I have to digg it from the code
It seems that I have to digg it from the code
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140762
by nicolas
Replied by nicolas on topic How to import categories from another component
If you import the categories yourself via mysql, the simplest is to leave empty the category_depth category_right and category_left columns and click on the "reduild" button of the categories listing of HikaShop in order to fill them all automatically following the binary tree algorithm in order to increase performances.
The namekey indeed random. Its only purpose is to be unique.
The category_created, category_modified fields are indeed timestamps.
The namekey indeed random. Its only purpose is to be unique.
The category_created, category_modified fields are indeed timestamps.
Please Log in or Create an account to join the conversation.
Time to create page: 0.188 seconds