Need inserting categories into database

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
joebeazelman
Lieutenant (LT)
Lieutenant (LT)
Posts: 78
Joined: Wed Mar 05, 2008 11:27 am

Need inserting categories into database

Post by joebeazelman » Wed Mar 19, 2008 2:31 pm

I have a question about the ac_CatalogNodes and ac_CategoryParents tables.

I'm converting a large database of products from another shopping cart product. So far, I've been able to convert the categories into ac_Categories, which is straightforward, but I find its related tables to be confusing. The information seems to be duplicated across tables.

I'm having difficulty understanding the ac_CatalogNodes table. Through my experimentation, I figured that CategoryID is the ID of a parent category and CatalogNodeID is the child of that parent and the OrderBy determines the order it's displayed in.

I'm also having difficulty understanding the ac_CategoryParents table. I am assuming that CategoryID is the ID of the category and the ParentID is the parent of that category. There's an extra entry that has the CategoryID and its parent set to the same value. I'm completely baffled by ParentLevel and ParentNumber.

Any help you can provide in assisting me in understanding these tables would be greatly appreciated. Thanks in advance.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Post by AbleMods » Thu Mar 20, 2008 10:06 pm

CatalogNodes provides the relationship between what ProductIds are assigned to which Categories.

CategoryParents decides the tree structure of the various categories themselves.

CatalogNodes is somewhat confusing because it contains all 4 catalog record types: Product, Web Page, Category and Link. Able looks at them all the same when it comes to building the complete catalog tree.

I avoid working with the tables directly at all costs. I use the data classes and methods provided by Able.

A great example to study is the ~/Admin/Catalog/MoveCatalogObject.aspx page. It should give you a strong insight into how they work with the tables.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply