Magento – Get Current Store Details (ID, Code, Name and Status)

Published 18 Comments on Magento – Get Current Store Details (ID, Code, Name and Status)

// Gets the current store’s details
$store = Mage::app()->getStore();

// Gets the current store’s id
$storeId = Mage::app()->getStore()->getStoreId();

// Gets the current store’s code
$storeCode = Mage::app()->getStore()->getCode();

// Gets the current website’s id
$websiteId = Mage::app()->getStore()->getWebsiteId();

// Gets the current store’s group id
$storeGroupId = Mage::app()->getStore()->getGroupId();

// Gets the current store’s name
$storeName = Mage::app()->getStore()->getName();

// Gets the current store’s sort order
$storeSortOrder = Mage::app()->getStore()->getSortOrder();

// Gets the current store’s status
$storeIsActive = Mage::app()->getStore()->getIsActive();

// Gets the current store’s locale
$storeLocaleCode = Mage::app()->getStore()->getLocaleCode();

// Gets the current store’s home url
$storeHomeUrl = Mage::app()->getStore()->getHomeUrl();


  1. it is another important one ;)
    $store_front_name = Mage::app()->getStore()->getFrontendName();

  2. I didn’t get store code from store.phtml file. using this below code
    foreach ($this->getGroups() as $_group):
    echo “”; print_r($_group->code);

    1. $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
      $currency_symbol = Mage::app()->getLocale()->currency( $currency_code )->getSymbol();

  3. I’m not a programmer, but I had a developer create store id’s that made body id=”store1, store2, etc.. for a specific theme. What do I need to do to create these store ID’s in a different theme for multiple stores so i can create different styles for different store in my Magento

Comments are closed.