Created
March 2, 2015 12:37
-
-
Save zeljkoprsa/8d13d7b764941339a1e9 to your computer and use it in GitHub Desktop.
Get store info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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