Browse Source

Fix widget refreshing issue

pull/43/head
enisn 5 years ago
parent
commit
ec4b88c896
  1. 8
      apps/public-web/src/EShopOnAbp.PublicWeb/Pages/index.js

8
apps/public-web/src/EShopOnAbp.PublicWeb/Pages/index.js

@ -5,10 +5,6 @@
console.info("Anonymous user set:" + anonymousId);
}
var widgetManager = new abp.WidgetManager({
wrapper: $($('.abp-widget-wrapper[data-widget-name="CartWidget"]')[0])
});
$(function () {
$('.product-list-item').click(function () {
@ -18,6 +14,10 @@
productId: productId,
anonymousId: anonymousId,
}).then(function () {
let widgetManager = new abp.WidgetManager({
wrapper: $($('.abp-widget-wrapper[data-widget-name="CartWidget"]')[0])
});
widgetManager.refresh();
abp.notify.success("Added product to your basket.", "Successfully added");
});

Loading…
Cancel
Save