Skip to content

Commit

Permalink
fix cart removing data
Browse files Browse the repository at this point in the history
  • Loading branch information
alksily committed Aug 11, 2024
1 parent 7c84ab9 commit a6564f1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Template/mixin/catalog.twig
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,9 @@
if (res) {
if (res.redirect) {
triggerEvent('cart:checkout:after', data);
this.cartRemoveAll();
// flexibility
setTimeout(() => location = res.redirect, options.cart.delay);
setTimeout(() => {this.cartRemoveAll(); location = res.redirect;}, options.cart.delay);
} else if (res.errors) {
for(let name in res.errors) {
$(getSelector('cart-data'))
Expand Down

0 comments on commit a6564f1

Please sign in to comment.