Custom Button

The [cart custom button] option adds a button to the cart that triggers a custom function. This function could be used for example to forward cart items to an external application in a new window. Sample function

// Added to Settings > Custom > Custom Javascript
function cart_custom_click(cart, current_page_items, elements, options){
  var keys = Object.keys(cart);
  console.log(cart);
  var response = 'Cart contains ' + keys.length + ' images.\n\n';
  keys.forEach(function(key){
    response += key.split('/').pop() + '\n';
  });
  alert(response);
}