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:on_addToCompare AJAX handler

Defined in /modules/shop/classes/shop_actions.php, lines 2951-2959
Author LemonStand eCommerce Inc.
Adds a product to the product comparison list. Read the Compare Products Page article for the implementation details. Usage example:
<a href="#" onclick="return $(this).getForm().sendRequest(
  'shop:on_addToCompare', {
     onSuccess: function(){alert('The product has been added to the compare list')},
     extraFields: {product_id: '<?= $product->id ?>'},
     update: {compare_list: 'shop:compare_list'}
});">Add to compare</a>

Supported form fields

Field Type Description
product_id integer specifies the product identifier. Required.

Supported form field details

ΒΆ product_id form field

Specifies the product identifier. Required.