Skip to content

Instantly share code, notes, and snippets.

@LinguistMB
Created February 15, 2018 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LinguistMB/c32d3237882bd262d4055f23a00d8622 to your computer and use it in GitHub Desktop.
Save LinguistMB/c32d3237882bd262d4055f23a00d8622 to your computer and use it in GitHub Desktop.
_successHandler: function(data) {
if (!data.success && data.error == 'not_logged_in') {
alert({
title: 'Wish List',
content: mageTemplate(this.options.notLoggedInErrorMessage, {
url: this.options.customerLoginUrl
})
});
return;
}
$(this.options.wishlistBlockSelector).replaceWith(data.wishlist);
$('body').trigger('contentUpdated');
if (this.options.isShowSuccessMessage && data.message) {
alert({
title: 'Wish List',
content: data.message
});
}
},
_errorHandler: function () {
alert({
title: 'Wish List',
content: mageTemplate(this.options.errorMessage)
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment