01.
public
function
subscribeEvents()
02.
{
03.
Backend::
$events
->addEvent(
'shop:onExtendProductReviewModel'
,
$this
,
'extend_product_review_model'
);
04.
Backend::
$events
->addEvent(
'shop:onExtendProductReviewForm'
,
$this
,
'extend_product_review_model'
);
05.
}
06.
07.
public
function
extend_product_review_model(
$product_review
)
08.
{
09.
$product_review
->define_column(
'x_would_recommend'
,
'Would recommend this product to a friend'
);
10.
}
11.
12.
public
function
extend_product_review_model(
$product_review
,
$context
)
13.
{
14.
$product_review
->add_form_field(
'x_would_recommend'
)->tab(
'Review'
);
15.
}