How To Get URL Parameters in phtml in Magento

Magento get url parameters on phtml

To fetch the URL Parameters in phtml, observer or model controllers then you need to use the below given code to get the desired effect respectively.


$urlParams = Mage::app()->getRequest()->getParams();//will return array of parameters.

You can use Mage::app()->getRequest()->getParams() to get url parameters anywhere you want in Magento.

The above example will return the parameters of url on phtml, observers or model controllers


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *