Jump to content

"Thank you" after Registering/Loggin In


Guest

Recommended Posts

After a customer registers or logs in, it just brings them back to the home page.

Is there a way to give them a message like "Thank you for registering/logging in"?

Link to comment
Share on other sites

I've found a quick fix. There is currently no email validation with the Cubecart mailing list. I've used the following code to validate the email address. If the address is valid, the script informs the user via an alert box "Your email address will now be added to our mailing list".

skins/{your skin}/styleTemplates/boxes/mailList.tpl/mailList.tpl:

<!-- BEGIN: mail_list -->



<script language = "Javascript">

/**

 * DHTML email validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)

 */



function echeck(str) {



		var errorMsg="That email address is not valid.\nPlease ensure you have entered it correctly"

		var at="@"

		var dot="."

		var lat=str.indexOf(at)

		var lstr=str.length

		var ldot=str.indexOf(dot)

		if (str.indexOf(at)==-1){

		   alert(errorMsg)

		   return false

		}



		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){

		   alert(errorMsg)

		   return false

		}



		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){

		   alert(errorMsg)

			return false

		}



		 if (str.indexOf(at,(lat+1))!=-1){

		   alert(errorMsg)

			return false

		 }



		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){

		   alert(errorMsg)

			return false

		 }



		 if (str.indexOf(dot,(lat+2))==-1){

		   alert(errorMsg)

			return false

		 }

		

		 if (str.indexOf(" ")!=-1){

		   alert(errorMsg)

			return false

		 }



 		 return true					

	}



function ValidateForm(){

	var emailID=document.frmSample.email

	

	if ((emailID.value==null)||(emailID.value=="")){

		alert("That email address is not valid.\nPlease ensure you have entered it correctly")

		emailID.focus()

		return false

	}

	if (echeck(emailID.value)==false){

		emailID.value=""

		emailID.focus()

		return false

	}

	alert("Thank you! \n \nYour email address will now be added to our mailing list.")

	return true

 }

</script>



<div class="boxContentMailList">

	<!-- BEGIN: form -->

	Sign-up for exclusive <br />offers & news



	<form name="frmSample" action="{FORM_METHOD}" method="post" onSubmit="return ValidateForm()">

	  <input name="email" type="text" onfocus="this.value=''" value="Enter email address" size="18" maxlength="255"  /> 

	<input type="hidden" name="act" value="mailList" />

	<INPUT TYPE="IMAGE" SRC="go.gif" value="Submit" ALT="Submit button" align="top">	

	</form>





	

	<!-- END: form -->

</div>

<!-- END: mail_list -->

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...