Skip to content

Instantly share code, notes, and snippets.

@LinguistMB
Created February 15, 2018 10:05
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/9c5647411180ef5bef974c4d46554f6a to your computer and use it in GitHub Desktop.
Save LinguistMB/9c5647411180ef5bef974c4d46554f6a to your computer and use it in GitHub Desktop.
_successHandler: function(data) {
if (!data.success && data.error == 'not_logged_in') {
alert({
title: 'Ajax Wishlist',
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: 'Ajax Wishlist',
content: data.message
});
}
},
_errorHandler: function () {
alert({
title: 'Ajax Wishlist',
content: mageTemplate(this.options.errorMessage)
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment