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:onExtendCustomGroupModel event

Triggered by Shop_CustomGroup
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onExtendCustomGroupModel(Shop_CustomGroup $group, string $context)
$group Shop_CustomGroup specifies the group object.
$context string specifies the execution context.
Allows to define new columns in the custom product group model. To add new columns to the category model, call the define_column() method of the group object. Before you add new columns to the model, you should add them to the database (the shop_custom_group table).
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');
}