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_ComparisonList class

Defined in /modules/shop/classes/shop_comparisonlist.php, lines 18-96
Author LemonStand eCommerce Inc.
Manage the list of products added to the Compare Products list. This class has methods for adding products to the list, loading added products, removing specific products from the list and clearing the list. The Shop module also has a number of AJAX handlers which you can use for managing the product compare list. shop:compare action uses this class internally.

Public methods

Method Description Defined By
add_product() adds a product to the product comparison list. Shop_ComparisonList
clear() removes all products from the comparison lis. Shop_ComparisonList
list_products() returns a list of products previously added with add_product() method. Shop_ComparisonList
remove_product() removes a product from the product comparison list. Shop_ComparisonList

Method details

add_product() method

public static void add_product(integer $product_id)
$product_id integer specifies the product identifier.
Adds a product to the product comparison list.

clear() method

public static void clear()
Removes all products from the comparison lis.

list_products() method

public static array list_products()
{return} array returns an array of Shop_Product objects.
Returns a list of products previously added with add_product() method.

remove_product() method

public static void remove_product(integer $product_id)
$product_id integer specifies the product identifier.
Removes a product from the product comparison list.