Created
April 23, 2014 12:25
-
-
Save thagxt/11213234 to your computer and use it in GitHub Desktop.
How to Get the Base Url for a specific Magento Store View
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 | |
/* | |
+ If you want, you can set manually the '$storeId' with the number (id) of the desired store. | |
+ You can also change 'Mage_Core_Model_Store::URL_TYPE_LINK' with one of these: | |
- Mage_Core_Model_Store::URL_TYPE_JS | |
- Mage_Core_Model_Store::URL_TYPE_LINK | |
- Mage_Core_Model_Store::URL_TYPE_MEDIA | |
- Mage_Core_Model_Store::URL_TYPE_SKIN | |
- Mage_Core_Model_Store::URL_TYPE_WEB | |
*/ | |
?> | |
<?php echo Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK); ?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment