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

Triggered by Shop_Product
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onGetProductSalePrice(Shop_Product $product, int $quantity, int $customer_group_id)
$product Shop_Product specifies the product object.
$quantity int specifies the product quantity in the shopping cart.
$customer_group_id int specifies a customer group identifier.
Allows to override product's sale price. The event handler should return either the product sale price or FALSE if the price should not be overridden. This event overrides sale prices defined with Catalog Price Rules and with the Sale Price or Discount field in the Shop/Edit Product form. Example:
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onGetProductSalePrice', $this, 'get_sale_price');
}

public function get_sale_price($product, $quantity, $customer_group_id)
{
  if ($product->sku == 'laptop')
    return 999.99;

  return null;
}