Home » Magento6 December 2009

Magento: Get store information

Magento allows to maintain multiple websites from single backend admin. Furthermore, each website can have multiple stores. Below is the code to get Magento store information like store id, store code, store name, etc. All of these functions can be found in class Mage_Core_Model_Store.

Get store data array

Get store ID

Get store code

Get website ID of store

Get store name

Check if store is active

Get homepage URL of the store

Get current page URL of the store

Hope it helps. Thanks.


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed
  • 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

  • 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

  • Very nice information I really bookmarked it, for further

  • Stasepravitepametni

    Dont work on 1.6

  • Stasepravitepametni

    Dont work on 1.6