Home » Magento

Magento: Get store information

6 December 2009 1,817 views 4 Comments Popularity: 19% 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: How to set and get registry?
  3. Magento: Showing Store Selector / Switcher in header and footer
  4. Magento: How to get most viewed products?
  5. Website statistic (User Information) in Javascript

4 Comments »

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.