diff --git a/_packs/controllers/cart_confirmation_controller.js b/_packs/controllers/cart_confirmation_controller.js index 74e4d48..1b138ca 100644 --- a/_packs/controllers/cart_confirmation_controller.js +++ b/_packs/controllers/cart_confirmation_controller.js @@ -4,7 +4,10 @@ export default class extends CartBaseController { static targets = [ 'order' ] async connect () { - if (this.clear) this.storage.clear() + if (this.clear) { + this.storage.clear() + window.dispatchEvent(new CustomEvent('cart:counter', { detail: { item_count: 0 }})) + } if (!this.template) return