I want to know place of "Add Product" of magento on Manage products page. And also the function which is work onclick of that button.

1 Answer 1


enter image description here

if you talking about the this Add product and function.


this is simple function to redirect the page that are defined in js/varien/js.js on line 30.

function setLocation(url){
    window.location.href = url;
  • I want to pass some more parameters in location for my extension. How can i pass that parameter. I find _prepareLayout function and here "'onclick' => "setLocation('{$this->getUrl('*/*/new')}')"," this line is written.
    – Mathew
    Oct 22, 2015 at 7:05
  • "'onclick' => "setLocation('{$this->getUrl('*/*/new').?param=param}')" simplae way to do it Oct 22, 2015 at 7:18
  • It opens add product page, for security reason if user manaually remove that parameter from url and hit page then i want location redirect with my parameters.
    – Mathew
    Oct 22, 2015 at 7:22
  • 1
    if you want to put for security purpose then pass with in session. url parameter is never secure. it is easily accessible. or you can encode the value it's up to you. Oct 22, 2015 at 7:27
  • Ok, so as you check in your image "Choose Store View" select box. I want to get that value in my session on other page how can i do that.
    – Mathew
    Oct 22, 2015 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.