I am wondering if this is possible.
I would like to create same functionality as this image in my custom module.
I could use a widget- product chooser, however that is letting me choose only one product. I need to select more than one product.
I will have just a button where I can click and then it will render the product chooser grid and then when selected multiple items, it sends id or sku
in the input field.
Then later on I will save this info in to database.
Please suggest.
Best Answer
This feature relies heavily on the Javascript vor the Magento Promotional rules.
It's location in file
js/mage/adminhtml/rules.js
. The method you want to look at isshowChooserElement
, which is called byinitParam
, this part to be exact.So calling
VarienRulesForm.showChooserElement(element);
with the right kind of element (having all the required attributes) should in theory give you the chooser. Still, you'll need to do a lot of tweaking I guess.