April 25, 2014

Magento : Currently running Store info (getStore() info)

// To fetch the current store information 
$_storeInfo = Mage::app()->getStore(); 

Zend_Debug::dump($_storeInfo ->debug());
You can do debugging for all the collections. This will help you a lot in all the case.
 
// To fetch the current store id 
$_storeId = Mage::app()->getStore()->getStoreId(); 

// To fetch the current store code 
$_storeCode = Mage::app()->getStore()->getCode(); 

// To fetch the current store's group id 
$_storeGroupId = Mage::app()->getStore()->getGroupId(); 

// To fetch the current store's name 
$_storeName = Mage::app()->getStore()->getName(); 

// To fetch the current store's sort order 
$_storeOrder = Mage::app()->getStore()->getSortOrder(); 

// To fetch the current store's status 
$_storeStatus = Mage::app()->getStore()->getIsActive(); 

// To fetch the current store's locale 
$_storeCode = Mage::app()->getStore()->getLocaleCode(); 

// To fetch the current website id 
$_websiteId = Mage::app()->getStore()->getWebsiteId(); 

// To fetch the current store's home url 
$_storeHomeUrl = Mage::app()->getStore()->getHomeUrl();