Skip to content

Commit

Permalink
hotfix issue with variable
Browse files Browse the repository at this point in the history
  • Loading branch information
callanzimmermann committed Jan 12, 2024
1 parent 4090f4c commit a84311f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
<!-- Refer to: https://keepachangelog.com/en/1.0.0/ -->

## [1.2.2] 2024-12-01
### Fix
- Issue with variable
## [1.2.1] 2024-12-01
### Added
- Ability for cart to open after add to cart
Expand Down
4 changes: 2 additions & 2 deletions view/frontend/templates/hyva/script/addtocart.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ window.setAjaxCart = (selectors = '<?= $escaper->escapeJs($selectors) ?>', recur
return window.location.href = response.url;
}

const data = await response.json();

if (data.backUrl) {
return window.location.href = data.backUrl;
}

const data = await response.json();

if (recursive) {
window.dispatchEvent(new CustomEvent('product-addtocart-success'));
}
Expand Down

0 comments on commit a84311f

Please sign in to comment.