I have written a code for the sucess page after submitting the quote. It only worked for a number of times after that the page is redirecting to homepage of the website . I'm attaching the code for the particular page, could you please check and let me know what is the issue. The problem mainly persist for apple devices (latest safari browsers)
Hoping you will send some suggestions regrading this Issue
Thank you
[enter image description here][1]
$(document).on('click', '.submit-quote', function() {
var url = "<?php echo $block->getUrl('request-quote/quote/convertToQuote'); ?>";
var data = {
'id' : $(this).data('id')
}
$(".submit-quote").attr("disabled", true);
$.ajax({
url : url,
dataType : 'json',
type : 'POST',
data: data,
showLoader: true,
success : function(res)
{
$(".submit-quote").attr("disabled", false);
if (res.status == 200) {
swal.fire({
title: "<?= __('Sucess') ?>",
text: res.message,
icon: "success",
button: "<?= __('Ok') ?>",
confirmButtonColor: '#323776',
}).then(function() {
document.location.assign("<?php echo $block->getUrl('shop/quote/success'); ?>");
});
} else {
swal.fire({
title: "<?= __('Failed') ?>",
text: res.message,
icon: "error",
button: "<?= __('Ok') ?>",
confirmButtonColor: '#9F8830',
});
}
}
});
});