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

Triggered by Shop_ExtraOption
Author LemonStand eCommerce Inc.

Event handler signature

public float event_onGetProductExtraPrice(Shop_ExtraOption $extra_option, Shop_Product $product)
$extra_option Shop_ExtraOption specifies the extra option object.
$product Shop_Product specifies the product object.
{return} float returns the updated extra option price.
Allows to override a product's extra option price. The handler should return the new price, if applicable. Example:
public function subscribeEvents() 
{
  Backend::$events->addEvent('shop:onGetProductExtraPrice', $this, 'get_product_extra_price');
}

public function get_product_extra_price($extra, $product) 
{
  return $extra->price * 1.10;
}