de almacoop: reiniciar el contador del carrito al confirmar
This commit is contained in:
parent
087f1436c5
commit
fffc5e0267
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue