Using INSERT to load products into Products table

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Using INSERT to load products into Products table

Post by Mike718NY » Mon Jul 07, 2008 7:19 am

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.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Using INSERT to load products into Products table

Post by jmestep » Mon Jul 07, 2008 7:23 am

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.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: Using INSERT to load products into Products table

Post by Mike718NY » Mon Jul 07, 2008 11:54 am

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

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Using INSERT to load products into Products table

Post by jmestep » Mon Jul 07, 2008 4:15 pm

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.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: Using INSERT to load products into Products table

Post by Mike718NY » Tue Jul 08, 2008 10:59 am

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

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Using INSERT to load products into Products table

Post by jmestep » Tue Jul 08, 2008 3:26 pm

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.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Post Reply