Tuesday, August 18, 2015

Get the current URL

<?php
$currentUrl = Mage::helper('core/url')->getCurrentUrl();
$url = Mage::getSingleton('core/url')->parseUrl($currentUrl);
$path = $url->getPath();

echo $currentUrl;

print_r($path);
?>

No comments: