/** * Retrieve the group associated with the splash page * This will retrieve the most related group * If there isn't a group for the same store, the admin group will be returned * * @param Fishpig_AttributeSplash_Model_Page $page * @return Fishpig_AttributeSplash_Model_Group|false */ public function getSplashGroup(Fishpig_AttributeSplash_Model_Page $page) { $groups = Mage::getResourceModel('attributeSplash/group_collection')->addAttributeIdFilter($page->getAttributeModel()->getAttributeId())->addStoreFilter($page->getStoreId())->setCurPage(1)->setPageSize(1)->load(); return count($groups) > 0 ? $groups->getFirstItem() : false; }