Page 1 of 1
Using INSERT to load products into Products table
Posted: Mon Jul 07, 2008 7:19 am
by Mike718NY
I would like to use SQL INSERTs to load the Category, Manufacturer, and Product tables.
First, I would INSERT the 'Name' field to the Category and Manufacturer tables.
Then load the Products table using:
INSERT INTO [AbleCommerce Products table]
(Name, Description, CategoryId, ManufacturerId, . . .)
SELECT ProductName as Name, Description, CategoryId, ManufacturerId, . . .)
FROM [Old Database Products table]
Can this done without problems? I don't think I will be able to use the
DataPort because my Description field has some weird characters in it.
Re: Using INSERT to load products into Products table
Posted: Mon Jul 07, 2008 7:23 am
by jmestep
You should be able to do it, but they might not show up in the navigation of the store since information needs to be put into the catalog nodes table. After you insert them, you might be able to find them as orphans, then move them where you want them. Just try a few and see what happens.
Re: Using INSERT to load products into Products table
Posted: Mon Jul 07, 2008 11:54 am
by Mike718NY
If I add Category Names to the Category table first, and then
specify a CategoryID value in the Products table, shouldn't that
work to display the products in those categories?
The category name is the only required field. Thanks
Re: Using INSERT to load products into Products table
Posted: Mon Jul 07, 2008 4:15 pm
by jmestep
There has to be an entry in the CatalogNodes table for each product also. So if you do a batch import of products by SQL DTS or something, you have to populate that also.
Re: Using INSERT to load products into Products table
Posted: Tue Jul 08, 2008 10:59 am
by Mike718NY
Thanks Judy. It turns out that I can use the DataPort.
If I use the DataPort, do I still need to be concerned about whether
the products will be in the Categories, . . . using a .csv file with
a "Category Name" field for the Import?
That would be great because I can't make heads or tails out of these tables yet:
ac_CatalogNodes
CategoryId (FK)
CatalogNodeId
CatalogNodeTypeId
ac_Categories
CategoryId
StoreId (FK)
ParentId
Name
ac_CategoryParents
CategoryId (FK)
ParentId
ParentLevel
ParentNumber
Re: Using INSERT to load products into Products table
Posted: Tue Jul 08, 2008 3:26 pm
by jmestep
If you use the dataport utility and have category info in your file, it will make the updates to the necessary tables. I think Naveed has explained the process on some recent forum posts.