01.
public
function
subscribeEvents()
02.
{
03.
Backend::
$events
->addEvent(
'shop:onExtendCategoryModel'
,
$this
,
'extend_category_model'
);
04.
Backend::
$events
->addEvent(
'shop:onExtendCategoryForm'
,
$this
,
'extend_category_form'
);
05.
}
06.
07.
public
function
extend_category_model(
$category
,
$context
)
08.
{
09.
$category
->define_column(
'x_extra_description'
,
'Extra description'
);
10.
}
11.
12.
public
function
extend_category_form(
$category
,
$context
)
13.
{
14.
$category
->add_form_field(
'x_extra_description'
)->tab(
'Category'
);
15.
}