Created
September 19, 2013 15:58
-
-
Save danielkmariam/6625605 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nextStep: function(transport){ | |
jQuery('.checkout-block-button button').mxLoaderOverlay('hide'); | |
jQuery('#shipping-method-please-wait').hide(); | |
if (transport && transport.responseText){ | |
try{ | |
response = eval('(' + transport.responseText + ')'); | |
} | |
catch (e) { | |
response = {}; | |
} | |
if (parseInt(response.order.error === 1) { | |
alert(Translator.translate(response.message)); // we should render the correct erro message | |
jQuery('.checkout-loader').hide(); | |
return false; | |
} else { | |
var ajaxResponse = new MXAjaxResponse(); | |
ajaxResponse.process(transport.responseText); | |
} | |
} else { | |
new Messi("An error occurred while saving your order", {title: 'Error!', modal: true, titleClass: 'error'}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment