title: Get current page and url in prestashop
body: <p>I am trying to get the url of current page in prestashop to test multiple pages of a website even if the website pages do not have a consistent pattern. I noticed that most of the prestashop pages are of the form <code>/index.php?id_category=&lt;categoryid&gt;&amp;controller=&lt;controllername&gt;, /index.php?id_product=&lt;productid&gt;&amp;controller=&lt;controllername&gt;</code> etc. I am able to get the controller name using 
  <code>Context::getContext()-&gt;controller-&gt;php_self</code></p>
  
  <p>So, I want to know how do I get the product id or category id to form the current url of a page?</p>