1

Is there a way to add information to the post request which will be sent when I press the "save product" button? I have added some custom things to the product I need to transmit in order to process them (using the catalog_product_prepare_save event).
I have a dropdown menu next to a button, and when I press that button, I need to transmit the content of the dropdown via the request array so that I can receive the option selected in the observer I have registered.

Thanks a lot in advance

EDIT: I have a feeling there is something completely wrong about the way I'm approaching this, a nudge in the right direction would be much appreciated, I'm quite stuck atm.

6
  • why dont to go for event observer?. Dec 8, 2014 at 5:14
  • @Manik well, I have an event observer, but with that, I can only get the php request data (obviously). The things I need to process though are on the page. My question now is how I can somehow put this data I got into the php request in order to handle it with an observer
    – Yorrd
    Dec 8, 2014 at 11:19
  • can you please update the question with what data you want to get where it exist? Dec 8, 2014 at 11:44
  • done, hope this helps
    – Yorrd
    Dec 8, 2014 at 12:01
  • maybe I got you wrong, but shouldn't you already get it in the Post array if you named your select (as in name="myselect")? Dec 8, 2014 at 14:57

1 Answer 1

1

It's purely PHP-related I think, just name your select like this :

<select name="myselect">.....</select>

And you should be able to retrieve it like this

$this->getRequest()->getParam('myselect');

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.