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

Triggered by Shop_ShippingOption
Author LemonStand eCommerce Inc.

Event handler signature

public array event_onFilterShippingOptions(array $params)
$params array specifies the method parameters.
{return} array returns updated list of shipping options.
Allows to filter the shipping option list before it is displayed on the checkout pages. The event handler should accept a single parameter - the options array. The array contains the following fields:
  • options - a array of shipping options. Each element is the Shop_ShippingOption object.
  • country_id - shipping country identifier.
  • state_id - shipping state identifier.
  • zip - shipping ZIP/Postal code.
  • city - shipping city.
  • total_price - total price of all order items.
  • total_volume - total volume of all order items.
  • total_weight - total weight of all order items.
  • total_item_num - total number of order items.
  • order_items - a list of order items (Shop_OrderItem or Shop_CartItem objects, depending on the caller context).
  • customer_group_id - identifier of the customer group.
The handler should return an updated options array. Note, that for multi-option shipping methods (like USPS) you may need to update the $sub_options property.
Usage example: