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

Triggered by Shop_ShippingOption
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onExtendShippingOptionForm(Shop_ShippingOption $shipping_option, string $context)
$shipping_option Shop_ShippingOption specifies the shipping option object.
$context string specifies the execution context.
Allows to add new fields to the Create/Edit Shipping Option form in the Administration Area. Usually this event is used together with the shop:onExtendShippingOptionModel event. To add new fields to the shipping option form, call the add_form_field() method of the shipping option object.
public function subscribeEvents()
{
   Backend::$events->addEvent('shop:onExtendShippingOptionModel', $this, 'extend_shipping_option_model');
   Backend::$events->addEvent('shop:onExtendShippingOptionForm', $this, 'extend_shipping_option_form');
}

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

public function extend_shipping_option_form($shipping_option, $context)
{
   $shipping_option->add_form_field('x_extra_description')->tab('General Parameters');
}