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

Triggered by Shop_Manufacturer
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onExtendManufacturerModel(Shop_Manufacturer $manufacturer, string $context)
$manufacturer Shop_Manufacturer specifies the manufacturer object.
$context string specifies the execution context.
Allows to define new columns in the product manufacturer model. The event handler should accept two parameters - the manufacturer object and the form execution context string. To add new columns to the manufacturer model, call the define_column() method of the manufacturer object. Before you add new columns to the model, you should add them to the database (the shop_manufacturers table).
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onExtendManufacturerModel', $this, 'extend_manufacturer_model');
  Backend::$events->addEvent('shop:onExtendManufacturerForm', $this, 'extend_manufacturer_form');
}

public function extend_manufacturer_model($manufacturer, $context)
{
  $manufacturer->define_column('x_extra_description', 'Extra description');
}

public function extend_manufacturer_form($manufacturer, $context)
{
  $manufacturer->add_form_field('x_extra_description')->tab('Name and Description');
}