Given I have a Page Object (
Mage_Cms_Model_Page), how do I get its associated store id's? As an array is preferable.
You can do
$page->getStoreId() which will return an array (it can return
null on new instances which are not yet saved to the DB).
In the page's resource model
Mage_Cms_Model_Resource_Page there is an
_afterLoad() method which will get the associated store ID's from the
cms_page_store table and set them to the model as
'store_id' which you can get by calling
Hi Please try with resource model which is give the store id basic of
$Store_ids= $page->getResource()->lookupStoreIds($page->getId()); print_r($Store_ids)
It give the array for store ids using fetchCol().
$select = $adapter->select() ->from($this->getTable('cms/page_store'), 'store_id') ->where('page_id = ?',(int)$pageId); return $adapter->fetchCol($select);
This every used full whenever you can get store id from collection of cms page