window.addEventListener('DOMContentLoaded', function(){ /*Redirect for all product2 urls*/ let urlArr =["shoppingCart2/shoppingCart.html"]; let currentPage = window.location.href; for(let i in urlArr){ if(currentPage.includes(urlArr[i])){ window.location.href = "/site/portal/lms/cart"; } } /*Change url for return to shopint cart*/ let cancel = document.querySelector("#order-create-cancel-button"); if(cancel){ cancel.type = "reset"; cancel.addEventListener("click",(e)=>{ e.preventDefault(); window.location.href = "/site/portal/lms/cart"; }) } /*Remove cancel button on client relation 7023*/ let cancelClient = document.querySelector("#client-relation-7023-cancel-button"); if(cancelClient){ cancelClient.remove(); } })