Allows to add new fields to the Create/Edit Extra Option form in the Administration Area.
Usually this event is used together with the
shop:onExtendExtraOptionModel event.
To add new fields to the extra option form, call the
add_form_field() method of the
option object.
public function subscribeEvents()
{
Backend::$events->addEvent('shop:onExtendExtraOptionModel', $this, 'extend_extra_model');
Backend::$events->addEvent('shop:onExtendExtraOptionForm', $this, 'extend_extra_form');
}
public function extend_extra_model($model)
{
$model->define_column('x_color', 'Color');
}
public function extend_extra_form($model, $context)
{
$model->add_form_field('x_color', 'Color')->tab('Option');
}