Skip to content

Instantly share code, notes, and snippets.

@zeljkoprsa
Created March 2, 2015 12:37
Show Gist options
  • Save zeljkoprsa/8d13d7b764941339a1e9 to your computer and use it in GitHub Desktop.
Save zeljkoprsa/8d13d7b764941339a1e9 to your computer and use it in GitHub Desktop.
Get store info
<?php
// 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();
// Homepage URL of Store
Mage::app()->getStore()->getHomeUrl();
// Current page URL of Store
Mage::app()->getStore()->getCurrentUrl();
// Multiple stores
Mage::app()->getStore()->getGroup()->getName();
// Reference: http://stackoverflow.com/questions/2713042/how-to-get-store-information-in-magento
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment