I'm talking about the page at admin -> catalog -> manage products -> any product -> custom options tab. I customized this page and added a new button which I basically want to act similarly. Presumably it is done via JavaScript, but it isn't clear to me where this functionality is defined.

A pointer in the right direction would be greatly appreciated.

1 Answer 1


Take a look at the file app/design/adminhtml/default/default/template/catalog/product/edit/options/option.phtml.
I think that one contains the js for the custom options.
Look specially at the function productOption.add. That's the one that adds a new option.
The add event is binded to the add button through this

if($('<?php echo $this->getAddButtonId() ?>')){
    Event.observe('<?php echo $this->getAddButtonId() ?>', 'click', productOption.add.bind(productOption));
  • Yess... I tried that, did nothing. Turns out I had forgotten to override the original file, so the things I tested had no chance of being used. Thanks man, pointed me back in the right direction :)
    – Yorrd
    Dec 4, 2014 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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