Home » Magento

Magento: Get store information

6 December 2009 12,806 views Popularity: 24% Share/Bookmark

Below is the code to get Magento store id, store code, store name, etc.

Get store data
Mage::app()->getStore();

Store Id
Mage::app()->getStore()->getStoreId();

Store code
Mage::app()->getStore()->getCode();

Website Id
Mage::app()->getStore()->getWebsiteId();

Store Name
Mage::app()->getStore()->getName();

Is Active
Mage::app()->getStore()->getIsActive();

Store Home Url
Mage::app()->getStore()->getHomeUrl();

From Mukesh Chapagain's Blog, post Magento: Get store information

Related posts:

  1. Magento: Load store specific product
  2. Magento: Show/Hide Demo Store Notice
  3. Magento: Showing Store Selector / Switcher in header and footer
  4. Magento: Track Visitor’s Information
  5. Magento: How to set and get registry?
  6. Magento: Send Transactional Email
  7. Magento: How to get product stock quantity & other stock information?
  8. Magento: How to get most viewed products?
  9. Magento: Get Bestselling products by category and date time
  10. Magento: Authorize.net not displayed in Payment Information section while Checkout
  • Pingback: Magento: Get store information http://blog.chapagain.com.np/magento-get-store-information/ | Magento News

  • Jeremy

    I have multiple stores and I need the id’s in order to import products to specific stores. What exactly do I do with/put the code from the link?

  • Steve

    How do you find the store address and contact phone number? I’ve looked and looked but haven’t found it yet

  • http://webraumfahrer.com T Low

    Also looking for a method to get store information such as company name, address or e.g. a store email address…

  • Alinasrulah

    Hey Bro Thanks….!!!

  • Turrnerart

    you rock, spent way too much time looking for this!

  • Turrnerart

    you rock, spent way too much time looking for this!

  • Sandipgulati08

    how to set stor id at run time

  • http://www.register-web-domain.in Domain register

    Very nice information I really bookmarked it, for further
    reading.Thanks 

  • Stasepravitepametni

    Dont work on 1.6

  • Stasepravitepametni

    Dont work on 1.6