Friday, May 18, 2012

Get Current Store Information

To get information about the current store in Magento


<?php
$store = Mage::app()->getStore();

//Get Current Store Name
$storeName = $store->getName();

//Get Current Store ID
$storeName = $store->getStoreId();

//Get Current Store Code
$storeName = $store->getCode();

//Get Current Store Website ID
$storeName = $store->getWebsiteId();

//Check if the current store is active
$storeName = $store->getIsActive();

//Get Current Store Home URL
$storeName = $store->getHomeUrl();

?>