This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

shop:onExtendProductReviewForm event

Triggered by Shop_ProductReview
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onExtendProductReviewForm(Shop_ProductReview $review, string $context)
$review Shop_ProductReview specifies the review object.
$context string specifies the execution context.
Allows to add new fields to the Edit Product Review form in the Administration Area. Usually this event is used together with the shop:onExtendProductReviewModel event. To add new fields to the review form, call the add_form_field() method of the review object.
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onExtendProductReviewModel', $this, 'extend_product_review_model');
  Backend::$events->addEvent('shop:onExtendProductReviewForm', $this, 'extend_product_review_model');
}

public function extend_product_review_model($product_review)
{
  $product_review->define_column('x_would_recommend', 'Would recommend this product to a friend');
}

public function extend_product_review_model($product_review, $context)
{
  $product_review->add_form_field('x_would_recommend')->tab('Review');
}