Allows to add new fields to the Create/Edit Shipping Option form in the Administration Area.
Usually this event is used together with the
shop:onExtendShippingOptionModel event.
To add new fields to the shipping option form, call the
add_form_field() method of the
shipping option object.
public function subscribeEvents()
{
Backend::$events->addEvent('shop:onExtendShippingOptionModel', $this, 'extend_shipping_option_model');
Backend::$events->addEvent('shop:onExtendShippingOptionForm', $this, 'extend_shipping_option_form');
}
public function extend_shipping_option_model($shipping_option, $context)
{
$shipping_option->define_column('x_extra_description', 'Extra description');
}
public function extend_shipping_option_form($shipping_option, $context)
{
$shipping_option->add_form_field('x_extra_description')->tab('General Parameters');
}