window['wishlist'] || {}; window['wishlist'].add = function (product_id) { $.ajax({ url: 'index.php?route=account/wishlist/add', type: 'post', data: 'product_id=' + product_id, dataType: 'json', success: function (json) { $('.alert').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { $('[data-toggle="tooltip"]').tooltip('hide'); if (json['notification']) { show_notification(json['notification']); } else { $('header').after('