26 lines
1.2 KiB
JavaScript
26 lines
1.2 KiB
JavaScript
// Zmiana linku po anulowaniu zamówienia;
|
|
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);
|
|
}
|
|
}, 100);
|
|
}
|
|
|
|
|
|
if(window.location.pathname.includes("order1.html") || window.location.pathname.includes("order-nonstandardized") || window.location.pathname.includes("order1.php") || ((window.location.pathname.includes("signin.html") || window.location.pathname.includes("signin.php")) && window.location.search.includes("operation=onceorder"))){
|
|
// app_shop.fn.ajaxLoadSite(1);
|
|
window.location = "/place-order.php";
|
|
}
|
|
|
|
// Przekierowanie ze strony order1 na OSCOP
|
|
// document.querySelectorAll("a").forEach(aElement=>{
|
|
// if(aElement.href.includes("order1.php") || aElement.href.includes("order1.html")){
|
|
// console.log(aElement);
|
|
// aElement.href = "/place-order.php";
|
|
// }
|
|
// });
|