Hi Yisrael,
The url of my site is www.markhatterassociates.co.uk
I have updated the code for the login and it is working fine in the ‘Login’ page under ‘Members’ where the page loads if a user tries to access the ‘ISW’ page without an active session. However, when I try to load the lighbox ‘Login’ this a) doesn’t open and b) the code is not doing anything.
The following code is in the ‘ISW’ page where wixLocation.to triggers the correct action but wixWindow.openLightbox does not.
$w.onReady(function () {
let value = session.getItem("activeSession"); // "value"
if (value) {
console.log("Session Active - ", value);
} else {
console.log("Session not Active");
//wixLocation.to("/member-login");
wixWindow.openLightbox("Login");
}
});
Many thanks,
Rachel