Skip to content

Commit

Permalink
Refactored hipanel.js method ucpateCart
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid authored and hiqsol committed Aug 26, 2020
1 parent feb5876 commit bed9283
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/assets/js/hipanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ window.hipanel = (function () {
var publicMethods = {
updateCart: function (callback) {
$('.dropdown.notifications-cart a.dropdown-toggle').html('<i class="fa fa-refresh fa-spin fa-lg"></i>');
$.get("/cart/cart/topcart", function(data) {
$("li.dropdown.notifications-menu.notifications-cart").html( data );
}).done(callback);
fetch('/cart/cart/topcart')
.then(response => response.text())
.then(html => {
$("li.dropdown.notifications-menu.notifications-cart").html( html );
}).then(callback);
},
loadingBar: function (options) {
options = $.extend({}, options, true);
Expand Down

0 comments on commit bed9283

Please sign in to comment.