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

Triggered by Shop_Cart
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onAfterAddToCart(string $cart_name, Shop_Product $product, integer $quantity, array $options, array $extra_options, Shop_CartItem $item, array $custom_data, array $bundle_data, array $master_bund
$cart_name string specifies the cart name.
$product Shop_Product specifies the product object.
$quantity integer specifies the cart item quantity.
$options array an array of product options.
$extra_options array an array of product extra options.
$item Shop_CartItem specifies the cart item object.
$custom_data array an associative array of custom field names and values.
$bundle_data array bundle data associated with the product.
$master_bundle_data array master bundle data associated with the product.
Triggered after a product has been added to the cart. Usage example:
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onAfterAddToCart', $this, 'after_add');
}

public function after_add($cart_name, $product, $quantity, $options, $extra_options, $item, $custom_data, $bundle_data, $master_bundle_data)
{
  traceLog('Added '.$product->name);
}