Wprowadzenie drobnych poprawek i przekierowania ze strony order1 na place-order

This commit is contained in:
2024-01-18 08:10:53 +01:00
parent aee6659f67
commit 7c1c1b97dd
4 changed files with 83 additions and 32 deletions

View File

@@ -1,9 +1,15 @@
// Zmiana linku po anulowaniu zamówienia;
setTimeout(function() {
if(window.location.pathname.includes("return.html") && window.location.search.includes("ordercancel_ok")){
const returnButtonInterval = setInterval(function() {
const returnPage = document.querySelector(".return_page");
const returnButton = document.querySelector("#retbut_ordercancel_ok");
if(returnPage && returnButton){
returnButton.href = returnButton.href.replace("&order_number", "&order_number");
clearInterval(returnButtonInterval);
}
}, 50);
}, 100);
}
// Przekierowanie ze strony order1 na OSCOP
if(window.location.pathname.includes("order1.html")) window.location = "/place-order.php";