Forked from DevertNet/Magento How to get the customer login, logout, register and checkout urls.php
Created
September 12, 2019 18:39
-
-
Save davirs/4fceccf617784594a854c3533e477f3e to your computer and use it in GitHub Desktop.
Magento How to get the customer login, logout, register and checkout urls
This file contains hidden or 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
| login url | |
| <?php echo Mage::getUrl('customer/account/login'); ?> | |
| logout url | |
| <?php echo Mage::getUrl('customer/account/logout'); ?> | |
| My Account url | |
| <?php echo Mage::getUrl('customer/account'); ?> | |
| Register url | |
| <?php echo Mage::getUrl('customer/account/create'); ?> | |
| Checkout url | |
| <?php echo Mage::getUrl('checkout/cart'); ?> | |
| To get SKIN URL | |
| {{skin url='images/sampleimage.jpg'}} | |
| To get Media URL | |
| {{media url='/sampleimage.jpg'}} | |
| To get Store URL | |
| {{store url='mypage.html'}} | |
| {{store url="page_identifier_here"}}#something | |
| To get Base URL | |
| {{base url=”}} | |
| TO Retrieve URL path in PHTML | |
| Not secure Skin URL | |
| <?php echo $this->getSkinUrl('images/sampleimage.jpg') ?> | |
| Secure Skin URL | |
| <?php echo $this->getSkinUrl('images/ sampleimage.gif',array('_secure'=>true)) ?> | |
| Get Current URL | |
| <?php $current_url = Mage::helper('core/url')->getCurrentUrl();?> | |
| Get Home URL | |
| <?php $home_url = Mage::helper('core/url')->getHomeUrl();?> | |
| Get Magento Media Url | |
| <?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);?> | |
| <?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);?> | |
| Get Magento Skin Url | |
| <?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);?> | |
| Get Magento Store Url | |
| <?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);?> | |
| Get Magento Js Url | |
| <?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment