Step 1 ) Go to script Manager inside the theme settings.
2) Add a file called ‘swym-behind-login’ and set up the script options. Set the script category as Funtional
4) Now add the following script and save
<script> function swymCallbackFn(swat) { let isLoggedIn = SwymPageContext.swym_custid ? true : false; const LOGIN_PAGE_URL = "/login.php"; const swymRedirectToLoginPage = () => { window.location = window.origin + LOGIN_PAGE_URL }; if (!isLoggedIn) { SwymUtils.getHostedURL = function() { /* Navigate to login page on click of swym-icons for wishlist page.*/ return LOGIN_PAGE_URL; } // Override launchpoints. swat.ui.open = swymRedirectToLoginPage // Override default API implementations. buttons,icons..etc swat.api.addToWishList = swymRedirectToLoginPage // Override API for Pop-up swat.ui.uiRef.addToWishlist = swymRedirectToLoginPage } } if (!window.SwymCallbacks) { window.SwymCallbacks = []; } window.SwymCallbacks.push(swymCallbackFn); </script>
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article