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

Defined in /modules/shop/classes/shop_producthelper.php, lines 9-45
Author LemonStand eCommerce Inc.
Provides methods which help in developing front-end pages and partials for displaying product details information.

Public methods

Method Description Defined By
get_default_options() returns a list of selected product options suitable for passing to Shop_Product::om() method. Shop_ProductHelper

Method details

ΒΆ get_default_options() method

public static array get_default_options(Shop_Product $product, boolean $return_first_enabled_om_record=true)
$product Shop_Product specifies a product to return options for.
$return_first_enabled_om_record boolean determines whether the function should return first enabled Option Matrix record options.
{return} array returns an array of option names and values.
Returns a list of selected product options suitable for passing to Shop_Product::om() method. The $return_first_enabled_om_record parameter determines whether the method should return an option set corresponding to the first enabled Option Matrix record. If the parameter value is FALSE, the method returns an option set corresponding to the first existing Option Matrix product.
Product options can be selected in 2 ways - passed through the page URL (product search feature uses this method) or POSTed when a visitor selects another option on the product details page.