Add Categories direct to database using t-sql
Add Categories direct to database using t-sql
I added new categories to database into ac_Categories table and also into ac_CategoryParents table using the rules discovered from early added sample categories. I check these two table - a data presents correctly. However, I cannot see the newly added categories neither in Store UI neither in Admin Catalog Browser. What's wrong ? Might be I need to add record(s) into some additional table(s), or its just impossible to add categories directly to database? Or might be I need to use ONLYAblecommerce objects?
It's possible but I would highly recommend using the Able methods.
Otherwise you risk something (incorrect) going unnoticed until weeks after going live and it'll be a nightmare to clean up. I speak from experience.
What you missed is adding entries in the ac_CatalogNodes table. It is also part of the category table set.
Able has some well-designed methods that can automatically create the catalog tree, even if you've specified sub-categories. It will even give you the option to search for a particular category tree branch and if it doesn't exist, automatically create it.
Otherwise you risk something (incorrect) going unnoticed until weeks after going live and it'll be a nightmare to clean up. I speak from experience.
What you missed is adding entries in the ac_CatalogNodes table. It is also part of the category table set.
Able has some well-designed methods that can automatically create the catalog tree, even if you've specified sub-categories. It will even give you the option to search for a particular category tree branch and if it doesn't exist, automatically create it.
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
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
ac_CatalogNodes table - ??
Thanks, that thought cross my mind too, but I opened the ac_CatalogNodes table, it looks like link table between Categories and Products. I cannot see the way how to add categories into it. I’ll try to use Able methods, just want to investigate the Ablecommerce structure.
There is a correlation, so you are on the right track.
The confusion comes when you realize a product can be assigned to more than one category.
Then the table relationships get weird as you-know-what and you just decide it's better to let Able do the work for you.
If you think categories-to-products is tough, wait'll you see Variants, OptionChoices and Options. Took me a solid 20-30 hours to get the hang of those in code.
The confusion comes when you realize a product can be assigned to more than one category.
Then the table relationships get weird as you-know-what and you just decide it's better to let Able do the work for you.
If you think categories-to-products is tough, wait'll you see Variants, OptionChoices and Options. Took me a solid 20-30 hours to get the hang of those in code.

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
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