Clears the cart contents.

This method is used to clear a cart completely.

Request example:

Ecwid.Cart.clear(function(success,error) { 
  if (success == true) {
      console.log("Cart was cleared");
  } else {
      console.log("Cart clear failed. Error message: " + error);

// prints
// Cart was cleared

Fields available in the returned object:

successbooleanIs true if a cart was cleared, false otherwise.
errorstringError message. Has value only if success is false