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:product CMS action

Defined in /modules/shop/classes/shop_actions.php, lines 93-206
Author LemonStand eCommerce Inc.
Base action for the Product Details page. The action loads a product by its URL Name specified in the page URL and creates all required PHP variables.

Supported form fields

Field Type Description
product_cart_quantity integer optional field, specifying the number of items to add to the cart.
add_to_cart string the name of the Add To Cart SUBMIT element.
add_review string tHe name of the Add Review SUBMIT element.

Generated PHP variables

Variable Type Description
product Shop_Product a product object.
product_unavailable boolean indicates whether the product is out of stock or disabled.

Supported form field details

product_cart_quantity form field

Optional field, specifying the number of items to add to the cart.

add_to_cart form field

The name of the Add To Cart SUBMIT element. The button name is required only if you use the regular POST (non AJAX) method. Alternatively you can use the shop:on_addToCart handler.

add_review form field

THe name of the Add Review SUBMIT element. The button name is required only if you use the regular POST (non AJAX) method. Alternatively you can use the shop:on_addProductReview handler.

Generated PHP variable details

product variable

Shop_Product $product;
A product object. This variable can be NULL if a requested product was not found. Always check whether the variable is NULL and display the "product not found" message instead of a normal product page if the variable is NULL.

product_unavailable variable

boolean $product_unavailable;
Indicates whether the product is out of stock or disabled. Check this variable to generate corresponding messages.