changed async code in updateOrder to use jQuery.Deferred to be future-proof