Skip to content

Commit 27fd1c9

Browse files
Fix 404 AJAX Request (#195)
* Fix 404 AJAX Request The base URL needs to be set, otherwise you will generate a relative URL which will 404 on any URL that has a path with more than 1 level deep (ie: /checkout/cart) * Update CHANGELOG.md
1 parent 3425a52 commit 27fd1c9

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
### [Unreleased]
8+
- Fix 404 AJAX Request
89

910
### [4.0.4] - 2022-05-24
1011
- Skipped 4.0.3 due to cancelled extension in magento marketplace

view/frontend/templates/checkout/cart.phtml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
'jquery',
55
'mage/url'
66
], function (jQuery, url) {
7+
url.setBaseUrl('<?= $block->escapeJs($block->escapeUrl($block->getBaseUrl())) ?>');
78
jQuery.ajax({
89
url: url.build('reclaim/checkout/reload'),
910
method: 'POST',

0 commit comments

Comments
 (0)