Created
February 15, 2018 10:05
-
-
Save LinguistMB/9c5647411180ef5bef974c4d46554f6a to your computer and use it in GitHub Desktop.
This file contains 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
_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