Skip to content

Instantly share code, notes, and snippets.

@jonazu
Last active July 18, 2016 14:44
Show Gist options
  • Save jonazu/83463c6a2edd56f6cff6 to your computer and use it in GitHub Desktop.
Save jonazu/83463c6a2edd56f6cff6 to your computer and use it in GitHub Desktop.
Magento URLs
Mage::app()->getStore()
/* Store Id */
Mage::app()->getStore()->getStoreId()
/* Store Name */
Mage::app()->getStore()->getName()
/* Store Code */
Mage::app()->getStore()->getCode()
/* Website Id */
Mage::app()->getStore()->getWebsiteId()
/* Is Active */
Mage::app()->getStore()->getIsActive()
/* Store Home Url */
Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
/* Contact Page Url */
phtml: <a href="<?php echo $this->getUrl('contacts');?>">Contact Us</a>
CMS: {{store url="contacts"}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment