Knowledgebase: Remember Me
How do I Install Remember Me for X-Cart on my Failed Login and Checkout Login pages?
Posted by Nick Poindexter on 04 March 2010 04:48 PM
By default Remember Me applies to the main authentication boxes only. You can however apply the mod to the failed login and checkout login pages with the following code edits:

Open skin1/main/error_login_incorrect.tpl

Find (the first occurrence only):

{capture name=dialog}

AFTER that add:

{literal}Â
<script LANGUAGE="JavaScript">Â
<!--Â
function confirmSubmit3() {Â
if (document.secureform.remember.checked == true) {
alert("{/literal}{$lng.txt_remember_me_warning}{literal}");
document.authform.submit();
}
}
// -->
</script>
{/literal}

Find:

value="{$redirect}">

AFTER that add:

{if $redirect ne "admin"}
<br>
<input type="checkbox" name="remember" value="Y">{$lng.lbl_remember_me}
{else}
<input type="hidden" name="remember" value="">
{/if}

Find:

{include file="buttons/submit.tpl" href="javascript:document.errorform.submit()" js_to_href="Y" type="input"}

AFTER that add:

{include file="buttons/submit.tpl" href="javascript:document.errorform.submit()" js_to_href="Y" onclick="confirmSubmit3()"}

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments: