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

Triggered by Shop_Product
Author LemonStand eCommerce Inc.

Event handler signature

public array event_onGetProductSortColumns(Shop_Product $product)
$product Shop_Product specifies the product object.
{return} array returns a list of column names.
Allows to add new sorting columns to list_products() methods. This events affects the following methods: Shop_Category::list_products(), Shop_CustomGroup::list_products(), Shop_Manufacturer::list_products(). The handler should return an array of column names of the shop_products table, including custom fields. Example:
public function subscribeEvents()
{
  Backend::$events->addEvent('shop:onGetProductSortColumns', $this, 'get_sorting_columns');
}

public function get_sorting_columns()
{
  return array('x_newfield');
}