Created
February 15, 2018 10:08
-
-
Save LinguistMB/c32d3237882bd262d4055f23a00d8622 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: '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