Magento store and website information

MagentoIf you need to get information about the current store, or storeview or website, you may find handy the following small snippets:

Mage::app()->getStore()->getId()
Will give you the Store ID, easy uh?

Mage::app()->getStore()->getName()
Will give you the Store View Name.

Mage::app()->getStore()->getGroup()->getName()
Will give you the Store Group Name.

Mage::app()->getWebsite()->getName()
Will give you the Website Name.

Small & handy.

I use this stuff a lot while working on custom themes or some special integration processes on custom ad hoc modules.

Enjoy!

Advertisements

Your opinion is important!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s