We maintain categories and products information from backend database and need to import these data to shopping cart as routine administration task. The document I read indicates the categoryid is a database sequence number. Can we import the categoryid using the category number we use in our backend database? If the answer is yes, that means the parentid can be the category number we used in backend also, correct? If no, how we can specify the parentid as we will not know the categoryid of the parent category ahead?
thanks!
Import Categories question
Re: Import Categories question
Here is a good reference post for the issue you are facing:
viewtopic.php?f=61&t=10962
Here I am copying some questions/answers from that post:
So, you can import something like (omitting extra csv columns fields for simplicity) :
And even if while importing new categoryId's are assigned to each category, both the "Child Category A" and "Child Category B" will be mapped under correct parent "Parent Category".
viewtopic.php?f=61&t=10962
Here I am copying some questions/answers from that post:
Off course you can specify the CategoryId, and also the parent Id based upon the category Id's. However it is not guaranteed that the specified categoryId's will be assigned to respective categories, because when importing new categories Id's are automatically assigned. But the key point is that the import routine is intelligent enough to correctly map the child categories to correct parents as specified in the CSV data.dooleymort wrote: Since I can't specify the CategoryId, how do I specify what the parentId is when I import?
So, you can import something like (omitting extra csv columns fields for simplicity) :
Code: Select all
"CategoryId", "Name", "ParentId"
"100","Parent Category","0"
"101","Child Category A","100"
"102","Child Category B","100"
And even if while importing new categoryId's are assigned to each category, both the "Child Category A" and "Child Category B" will be mapped under correct parent "Parent Category".
Thanks for your support
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Re: Import Categories question
Thanks!
Will xml import behave the same way?
Will xml import behave the same way?
Re: Import Categories question
Yes.
Thanks for your support
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter