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

Defined in /modules/shop/classes/shop_actions.php, lines 3036-3052
Author LemonStand eCommerce Inc.
Base action for the Compare Products page. The action loads a list of products, added to the product comparison list, and generates corresponding PHP variables.

Generated PHP variables

Variable Type Description
products Db_DataCollection a list of products added to the comparison list.
attributes array - A list of product attributes of all products in the comparison list.

Generated PHP variable details

products variable

A list of products added to the comparison list. Each element in the collection is an object of the Shop_Product class.

attributes variable

array $attributes;
- A list of product attributes of all products in the comparison list. You can manage product attributes on the Attributes tab of the Create/Edit Product page. To output an attribute value by its name, you can use the following code:
<?= h($product->get_attribute($attribute)) ?>