Ecwid.Cart.calculateTotal(function(order) { if (!order) alert('An error occurred!') else alert('Order total: ' + order.total); });