I hope to understand the request.
The code is your in your tutorial https://www.wix.com/corvid/example/Wishlist :
//-------------Page Setup-------------//
$w.onReady(async function () {
// Get the currently displayed product. product = await $w('#productPage1').getProduct();
// Check if the current product is in the wishlist and act accordingly. checkWishlist();
// Set the action that occurs when the login message is clicked to be the loginMessageClick() function. $w('#loginMessage').onClick(loginMessageClick);
});
and the loginMessageClick is :
// Set the action that occurs when the login message is clicked.
async function loginMessageClick() {
// Set the login options.
let options = {"mode": "login"};
// Hide the login message.
$w('#loginMessage').hide();
// Prompt the user to login using the options created above.
await wixUsers.promptLogin(options);
}
The page inviting to log in opens, but once the user has logged in, the page must be reloaded to function properly