Allows to add new fields to the Create/Edit Product Group form in the Administration Area.
Usually this event is used together with the
shop:onExtendCustomGroupModel event.
To add new fields to the product group form, call the
add_form_field() method of the
group object.
public function subscribeEvents()
{
Backend::$events->addEvent('shop:onExtendCustomGroupModel', $this, 'extend_custom_group_model');
Backend::$events->addEvent('shop:onExtendCustomGroupForm', $this, 'extend_custom_group_form');
}
public function extend_custom_group_model($custom_group, $context)
{
$custom_group->define_column('x_gender', 'Gender');
}
public function extend_custom_group_form($custom_group, $context)
{
$custom_group->add_form_field('x_gender')->tab('Group');
}