Reputation: 6344
FYI this is Magento 1.4 which might possibly change things but I'm fairly certain the answer is no.
We have thousands of stores in our Magento site, each representing a school. Each store is supposed to have a Root Category assigned.
My question is simple, where in the db tables is this relationship stored? I would like to search for stores by root category, and programmatically (or better yet by db query also) update this information. Thanks!
Upvotes: 0
Views: 468
Reputation: 151
This is stored in core_store_group.root_category_id
.
This will return a collection of stores which have a root category ID of 1.
$stores = Mage::getModel('core/store')
->getCollection()
->addFieldToFilter('root_category_id', array('eq' => 1));
Upvotes: 1