Announcement

Collapse
No announcement yet.

Postcode field contains invalid characters

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

    Postcode field contains invalid characters

    Hi all,

    I seem to have a simple problem. Some customers enter invalid characters into the postcode field, like TW7 &EX instead of TW7 7EX. Problem from hold down shift and pressing the 7 key.

    The main problem is that Sagepay doesn't like the invalid characters (and I haven't tested this out) but customers find it hard to correct it or simply can't see the error they had made and I lose a sale.

    I want to address the problem before the customer gets to Sagepay, at the moment I've set-up Javascript from the Advance User guide for V8 to make the postcode field all CAPS. This is the code:
    <input type="text" name="INVOICEPOSTALCODE" size="10" maxlength="50" value="<Actinic:Variable Name="InvoicePostalCode"/>" onblur="this.value=this.value.toUpperCase()" />

    Can I change the Javascript to block invalid characters in the postcode field as well?
    Regards,

    Les


    Abc Baby Gifts
    Snuggle Feet
    Baby Casting From My Perfect Impression

    #2
    my advice would be to sign up to postcode anywere and let that do all the hard work for you, it will also correct invalid postcodes when people enter o instead of 0 aswell

    Comment


      #3
      Thanks for reply. Done the Postcode anywhere stuff years ago via Mole-End guides, I found it to costly with Postcode Anywhere.
      Regards,

      Les


      Abc Baby Gifts
      Snuggle Feet
      Baby Casting From My Perfect Impression

      Comment


        #4
        well i guess that depends, if your loosign sales then the 10p look up would possibly pay for itself, also as a buyer i hate sites that dont use it, typing in my full address is a PITA

        Comment


          #5
          OK, as I've said I've tested out Postcode Anywhere for about 18 months and found it costly.

          Anyone help with my first post?
          Regards,

          Les


          Abc Baby Gifts
          Snuggle Feet
          Baby Casting From My Perfect Impression

          Comment


            #6
            Assuming you're selling to the UK only and thus 0-9, A-Z and space are all you'll ever allow, then try this. Edit layout Order01 Bulk Area. Look for the line:
            Code:
            <form method="post" action="<actinic:variable name="OnlineScriptURL" value="Checkout Script URL" />">
            Replace with:
            Code:
            <script type="text/javascript">
            	function checkpcode(){
            		var pcode = document.getElementById('POSTALCODE');
            		pcode.value = pcode.value.toUpperCase();
            		if ( pcode.value.search(/[^A-Z0-9 ]/) > -1 )
            			{
            			alert('Invalid characters in postcode (' + pcode.value + ') Only A-Z and 0-9 and space allowed.');
            			return false;
            			}
            		return true;	
            	}
            </script>	
            
            <form method="post" action="<actinic:variable name="OnlineScriptURL" value="Checkout Script URL" />" onsubmit="return checkpcode();">
            Edit layout Invoice Postal Code and look for the line:
            Code:
                  <input type="text" name="INVOICEPOSTALCODE" size="10" maxlength="50" value="<Actinic:Variable Name="InvoicePostalCode"/>" />
            Replace with:
            Code:
                  <input type="text" id="POSTALCODE" name="INVOICEPOSTALCODE" size="10" maxlength="50" value="<Actinic:Variable Name="InvoicePostalCode"/>" />
            Note that this also does the upper case conversion so you can lose the onblur code you mentioned earlier.


            If you want the same thing on the delivery address page, then edit layouts Order 02 Bulk Area and the same as for Order 01 Bulk Area above.

            Also edit layout Delivery Postal Code and replace:
            Code:
                  <input type="text" name="DELIVERPOSTALCODE" size="10" maxlength="50" value="<Actinic:Variable Name="DeliverPostalCode"/>" />
            With:
            Code:
                  <input type="text" id="POSTALCODE" name="DELIVERPOSTALCODE" size="10" maxlength="50" value="<Actinic:Variable Name="DeliverPostalCode"/>" />
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Hi Norman,

              As always, thank-you very much - worked perfect.

              Norman to the rescue again!!!
              Regards,

              Les


              Abc Baby Gifts
              Snuggle Feet
              Baby Casting From My Perfect Impression

              Comment


                #8
                Could the above be changed to work for the delivery address also?
                Regards,

                Les


                Abc Baby Gifts
                Snuggle Feet
                Baby Casting From My Perfect Impression

                Comment


                  #9
                  Les, if you sign up for Postcode Anywhere through the Actinic site, you will get a 10% discount on all future purchases. Also, since your business is up and running you may be able to accurately estimate how many lookups you will need and so buy in bulk. It works out much cheaper that way.

                  I've just beeen writing some copy for the new Actinic web site concerning post code lookup - I think that a good business case can be made for it.

                  Chris

                  Comment


                    #10
                    Agreed, a great feature to add, portrays confidence and a professional, helpful site in my experience. Its benefits far outweigh its cost IMO.

                    Comment


                      #11
                      I've rewitten my post #6 to also allow work on the delivery address page. Best re-do it completely for Order 01 Bulk Area as I've made some other changes.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #12
                        Sorry, I should have added that Postcode Anywhere is pre-built in to v9 (web site and MOTO form) so you just enter the license details through Business Settings.

                        Chris

                        Comment


                          #13
                          Chris & Lee are you two asking for trouble

                          Comment


                            #14
                            We also use Postcode Anywhere and find that all repeat orders tend to not use it as they have the correct details stored on their system.

                            We have found that a correct address is a real help when sending via courier or Royal Mail and would not be without it.

                            Mark
                            http://www.modelrailwaysdirect.co.uk

                            Comment


                              #15
                              The other thing to bear in mind is that the pricing for Postcode Anywhere has changed considerably since you first signed up including a longer validity time for keys.

                              From reading the post I don't think that you need to go back to PCA however if you do, I hope that you will consider keeping us as your reseller rather than switching to Actinic to get a very small discount, there are benefits to using Mole End as a reseller.

                              Regards,
                              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

                              Working...
                              X