Announcement

Collapse
No announcement yet.

Email address checker

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Email address checker

    is there any way that we can build into the address page 2 fields for putting email addresses in, To check there email address has been put in right. We would like this as far too many people are putting incorrect email addresses in and when they place an order the order email is getting returned to us because they have inputting their email address wrong.
    http://www.phoenixdirectuk.co.uk
    http://www.inkdeals.co.uk
    http://www.computerfairdeals.co.uk
    http://www.computerfairink.co.uk
    http://www.bestprceink.co.uk

    #2
    Try this:-

    Code:
    Confirming email addresses:
    
    Try this:
    
    Edit Act_Order1.html
    
    Look for the line
    
    
          <input type="TEXT" name="INVOICEEMAIL" maxlength="255" value="NETQUOTEVAR:INVOICEEMAIL">
    
    
    
    REPLACE it with
    
    
    
          <input type="TEXT" name="INVOICEEMAIL" id="email1" size="20" maxlength="255" value="NETQUOTEVAR:INVOICEEMAIL">
    
    <!-- start Check email address -->
          <br>
          Repeat email address:
          <br>
          <input type="TEXT" name="DUMMY" id="email2" size="20" maxlength="255" value="NETQUOTEVAR:INVOICEEMAIL">
    <script language=JavaScript>
    <!--
    function checkemailaddress()
      {
      if ( document.getElementById('email1').value != document.getElementById('email2').value )
        {
        alert('The Email addresses do not match');
        return false;
        }
    return true;
    }
    // -->
    </script>
    <!-- end Check email address -->
    
    
    
    Look for the line
    
    
        <input type=SUBMIT name=ACTION value="NETQUOTEVAR:NEXTBUTTON">
    
    
    REPLACE it with
    
    
        <input type=SUBMIT name=ACTION value="NETQUOTEVAR:NEXTBUTTON" onclick="return checkemailaddress()">
    
    
    Update and see if it worked.
    I'd recommend tesing this on as old a browser as you expect your customers to use as I've no old kit here.


    Norman
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thank you Norman, this is a really nice patch, I've installed it at mole end because we rely on email addresses and are sometimes given incorrect ones.

      You have actually solved a second problem for me as well, I wanted to add a call to my affiliate scheme scripts on order_02 but wasn't quite sure where to put it (despite Nadeem brave attempts to explain it to me), by copying the javascript routine and changing the guts to call my affiliate scheme script (and then always returning true), then adding the same code to the next button it is now sorted.

      BTW: Affiliate scripts usually go on order_04, the receipt page but if you use an online credit card provider users don't always go back to the merchants page which means that affiliates would not be accredited with the sale if you put the code onto order_04.

      What a nice start to a Monday morning this has been :-)

      Cheers,
      Jan Strassen, Mole End Software - Plugins and Reports for Actinic V4 to V11, Sellerdeck V11 to V2018, Sellerdeck Cloud
      Visit our facebook page for the latest news and special offers from Mole End

      Top Quality Integrated label paper for Actinic and Sellerdeck
      A4 Paper with one or two peel off labels, free reports available for our customers
      Product Mash for Sellerdeck
      Link to Google Shopping and other channels, increase sales traffic, prices from £29.95
      Multichannel order processing
      Process Actinic, Sellerdeck, Amazon, Ebay, Playtrade orders with a single program, low cost lite version now available from £19.95

      Comment


        #4
        Yes thanks also, works like a dream, just was feed up with users putting wrong email address then you cant contact them. Once again you saved the day!!!

        thank you

        dont want to sound like i am pushing my look but would there be anyway to change the bit where it says about how users found our site, ie like google, yahoo, etc but instead of the users having to type it in, maybe use a drop down box with the values already in.
        http://www.phoenixdirectuk.co.uk
        http://www.inkdeals.co.uk
        http://www.computerfairdeals.co.uk
        http://www.computerfairink.co.uk
        http://www.bestprceink.co.uk

        Comment


          #5
          would there be anyway to change the bit where it says about how users found our site...
          I'm sure that's already on this Forum or the Knowledge Base or Advanced Guide.

          Norman
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Originally posted by inkjet
            would there be anyway to change the bit where it says about how users found our site, ie like google, yahoo, etc but instead of the users having to type it in, maybe use a drop down box with the values already in.
            Article can be found here on Knowledge Base
            Ref 864


            Regards
            Raymond Allen
            GraphicBiz
            ----------------------------------------
            GraphicBiz: www.graphicbiz.co.uk
            Order Rubber Stamps Online: www.custom-stamps.co.uk

            Comment


              #7
              hello Norman,

              thanks for the help on the other topics.

              Is there any chance you could update the script so that is works with registered users. Actinic support fixed a simpilar problem with the terms and conditions.

              their fix can be viewed here

              thanking you
              Raymond Allen
              GraphicBiz
              ----------------------------------------
              GraphicBiz: www.graphicbiz.co.uk
              Order Rubber Stamps Online: www.custom-stamps.co.uk

              Comment


                #8
                Got that. It's needed for logged in customers where the delivery address is fixed as they never get any email entry fields.

                Here's the patch updated:-

                Code:
                Confirming email addresses:
                
                Try this:
                
                Edit Act_Order1.html
                
                Look for the line
                
                
                NETQUOTEVAR:THEORDERDETAILS <br>
                
                
                APPEND this code below it
                
                
                
                <!-- start Check email address -->
                <script language=JavaScript>
                <!--
                function checkemailaddress()
                  {
                  if ( ! document.getElementById('email1') ) return true;
                  if ( document.getElementById('email1').value != document.getElementById('email2').value )
                    {
                    alert('The Email addresses do not match');
                    return false;
                    }
                return true;
                }
                // -->
                </script>
                
                
                
                Look for the line
                
                
                      <input type="TEXT" name="INVOICEEMAIL" maxlength="255" value="NETQUOTEVAR:INVOICEEMAIL">
                
                
                
                REPLACE it with
                
                
                
                <!-- start Check email address -->
                      <input type="TEXT" name="INVOICEEMAIL" id="email1" size="20" maxlength="255" value="NETQUOTEVAR:INVOICEEMAIL">
                      <br>
                      Repeat email address:
                      <br>
                      <input type="TEXT" name="DUMMY" id="email2" size="20" maxlength="255" value="NETQUOTEVAR:INVOICEEMAIL">
                <!-- end Check email address -->
                
                
                
                Look for the line
                
                
                    <input type=SUBMIT name=ACTION value="NETQUOTEVAR:NEXTBUTTON">
                
                
                REPLACE it with
                
                
                    <input type=SUBMIT name=ACTION value="NETQUOTEVAR:NEXTBUTTON" onclick="return checkemailaddress()">
                
                
                Update and see if it worked.

                Norman
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment


                  #9
                  Thank You Norman

                  I will try it out in the morining.

                  Regards
                  Raymond Allen
                  GraphicBiz
                  ----------------------------------------
                  GraphicBiz: www.graphicbiz.co.uk
                  Order Rubber Stamps Online: www.custom-stamps.co.uk

                  Comment


                    #10
                    Thanks Norman, it works a treat.

                    This would be a good script to be included in the AUG

                    Regards
                    Raymond Allen
                    GraphicBiz
                    ----------------------------------------
                    GraphicBiz: www.graphicbiz.co.uk
                    Order Rubber Stamps Online: www.custom-stamps.co.uk

                    Comment


                      #11
                      I agree - I'll add it in the next few weeks.

                      Comment


                        #12
                        Chris if your adding it would you add in abit of info for the next button.

                        In both the Terms and Conditions and email address checker script, your asked to replace
                        Code:
                        <input type=SUBMIT name=ACTION value="NETQUOTEVAR:NEXTBUTTON">
                        with either

                        Code:
                        <input type=SUBMIT name=ACTION value="NETQUOTEVAR:NEXTBUTTON" onclick="return checkemailaddress()">
                        for check email

                        or

                        Code:
                        <input type=SUBMIT name=ACTION value="NETQUOTEVAR:NEXTBUTTON" onClick="return (ValidatePage());">
                        for terms agreed

                        BUT

                        if you want to use both scripts, you need to use the following script

                        Code:
                        <input type=SUBMIT name=ACTION value="NETQUOTEVAR:NEXTBUTTON" onclick="return ( checkemailaddress() && ValidatePage() );">

                        Regards
                        Raymond Allen
                        GraphicBiz
                        ----------------------------------------
                        GraphicBiz: www.graphicbiz.co.uk
                        Order Rubber Stamps Online: www.custom-stamps.co.uk

                        Comment


                          #13
                          Older browsers

                          If you need Norman's excellent checker to work in Netscape 4.x and other older browsers that don't recognise getElementById , just replace all instances of
                          Code:
                          document.getElementById('email1').value
                          with:
                          Code:
                          document.forms[0].INVOICEEMAIL.value
                          and all instances of:
                          Code:
                          document.getElementById('email2').value
                          with:
                          Code:
                          document.forms[0].DUMMY.value
                          Chris
                          -----
                          http://www.livingaidsonline.co.uk

                          Comment


                            #14
                            Yes. That will work or nearly all browsers.

                            However the reason I don't usually go that way is there is a chance that someone may have a Search Form (or any other <FORM...>) on their checkout template and thus document.forms[0] may not be the correct one.

                            What I do on some other patches is to scan the entire document.forms array, and then each element looking for the one I want. It's rather a lot of code but will work with any JavaScript enabled browser regardless of the number of forms on the page. So here's the patch amended to be browser and form number independent.

                            Code:
                            Confirming email addresses:
                            
                            Try this:
                            
                            Edit Act_Order1.html
                            
                            Look for the line
                            
                            
                            NETQUOTEVAR:THEORDERDETAILS <br>
                            
                            
                            APPEND this code below it
                            
                            
                            
                            <!-- start Check email address -->
                            <script language=JavaScript>
                            <!--
                            function formfield(fname){		// look through all forms 'till one containing field "fname"
                              var df = document.forms;		// simplified version - only return object fname
                              var i = df.length - 1;
                              for ( var j = 0; j <= i; j++ )
                                {
                                var k = df[j].length - 1; 
                                for ( var l = 0; l <= k; l++ )
                                  {
                                  if ( df[j].elements[l].name == (fname) ) 
                                    {
                                    return df[j].elements[l];
                                    }
                                  }
                                }
                              return false;
                            }
                            function checkemailaddress()
                              {
                              if ( ! formfield('INVOICEEMAIL') ) return true;
                              if ( formfield('INVOICEEMAIL').value != formfield('DUMMY').value )
                                {
                                alert('The Email addresses do not match');
                                return false;
                                }
                            return true;
                            }
                            // -->
                            </script>
                            
                            
                            
                            Look for the line
                            
                            
                                  <input type="TEXT" name="INVOICEEMAIL" maxlength="255" value="NETQUOTEVAR:INVOICEEMAIL">
                            
                            
                            
                            REPLACE it with
                            
                            
                            
                            <!-- start Check email address -->
                                  <input type="TEXT" name="INVOICEEMAIL" size="20" maxlength="255" value="NETQUOTEVAR:INVOICEEMAIL">
                                  <br>
                                  Repeat email address:
                                  <br>
                                  <input type="TEXT" name="DUMMY" size="20" maxlength="255" value="NETQUOTEVAR:INVOICEEMAIL">
                            <!-- end Check email address -->
                            
                            
                            
                            Look for the line
                            
                            
                                <input type=SUBMIT name=ACTION value="NETQUOTEVAR:NEXTBUTTON">
                            
                            
                            REPLACE it with
                            
                            
                                <input type=SUBMIT name=ACTION value="NETQUOTEVAR:NEXTBUTTON" onclick="return checkemailaddress()">
                            
                            
                            Update and see if it worked.
                            Norman
                            Norman - www.drillpine.biz
                            Edinburgh, U K / Bitez, Turkey

                            Comment


                              #15
                              Well spotted Norman! I realised the oversight in my post this afternoon and was about to post an explanation of the forms[0] and the need to amend if another was present, but your solution is, as usual far more elegant!
                              Chris
                              -----
                              http://www.livingaidsonline.co.uk

                              Comment

                              Working...
                              X