Announcement

Collapse
No announcement yet.

Pre Filled Postcode at checkout

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

    Pre Filled Postcode at checkout

    We only ship within Ireland (the Rep having no postcode) and despite all the notices, customers insist on putting NA instead of 000 which is require by Sagepay. Is there a way for me to have 000 prefilled in the postcode box of the checkout when a customer goes to the checkout. This way only Northern Ireland customer need change anything.

    Thanks

    TON

    #2
    You can try replacing the input field for the post code with this (untested and backup first!):
    Code:
    <input type="text" name="INVOICEPOSTALCODE" size="10" maxlength="50" value="000" />" tabindex="NETQUOTEVAR:TABINDEXINVOICEPOSTALCODE" />

    Comment


      #3
      That worked perfectly,
      Thanks
      TON

      Comment


        #4
        And if you add readonly the customer won't be able to tinker with it.

        E.g.

        <input readonly type="text" .....
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          To get over the problem, your postcode needs to have a value in it i.e. a "0".

          You can pre-fill the input box if you only ship to Ireland, however, if you wish to ship to both UK and Ireland, if you make the following changes to your OCCProtxTemplate, this will resolve the issue at run time so your customers don't see any changes to their usual checkout process and postcode can be set to optional within your actinic store.

          v10 or above (v9 code below)

          Step 1 (replace invoice postcode with "0" if blank);

          Find the line:
          $sCrypt .= "BillingPostCode=" . substr($::InvoiceContact{POSTALCODE}, 0, 10);

          Replace this line with:
          my ($InvPostcode);
          if (length($::InvoiceContact{POSTALCODE})!=0)
          {
          $InvPostcode = $::InvoiceContact{POSTALCODE};
          }
          else
          {
          $InvPostcode = "0";
          }
          $sCrypt .= "BillingPostCode=" . substr($InvPostcode, 0, 10);






          Step 2 (replace delivery postcod with "0" if blank);

          Find the line:
          $sCrypt .= "DeliveryPostCode=" . substr($::OCCShipData{POSTALCODE}, 0, 10);

          Replace this line with:
          my ($DelPostcode);
          if (length($::OCCShipData{POSTALCODE})!=0)
          {
          $DelPostcode = $::OCCShipData{POSTALCODE};
          }
          else
          {
          $DelPostcode = "0";
          }
          $sCrypt .= "DeliveryPostCode=" . substr($DelPostcode, 0, 10);





          Step 3:

          Open the following file in notepad:
          c:\Program Files\Actinic v10\OCCUpgrade\OCCUpgrade.ini

          Find the line:
          [Version]
          Number=

          Increment the Version Number by 1





          Step 4:

          Open each actinic site in turn... actinic will do an OCC upgrade.

          Upload your site changes

          Hope that helps!




          For V9 its almost the same (with a couple of "&" thrown in because the code is in a slightly different order in the OCCProtsTemplate) - as follows:

          Step 1 (replace invoice postcode with "0" if blank);

          Find the line:
          $sCrypt .= "&BillingPostCode=" . substr($::InvoiceContact{POSTALCODE}, 0, 10);

          Replace this line with:
          my ($InvPostcode);
          if (length($::InvoiceContact{POSTALCODE})!=0)
          {
          $InvPostcode = $::InvoiceContact{POSTALCODE};
          }
          else
          {
          $InvPostcode = "0";
          }
          $sCrypt .= "&BillingPostCode=" . substr($InvPostcode, 0, 10);






          Step 2 (replace delivery postcod with "0" if blank);

          Find the line:
          $sCrypt .= "&DeliveryPostCode=" . substr($::OCCShipData{POSTALCODE}, 0, 10);

          Replace this line with:
          my ($DelPostcode);
          if (length($::OCCShipData{POSTALCODE})!=0)
          {
          $DelPostcode = $::OCCShipData{POSTALCODE};
          }
          else
          {
          $DelPostcode = "0";
          }
          $sCrypt .= "&DeliveryPostCode=" . substr($DelPostcode, 0, 10);





          Step 3:

          Open the following file in notepad:
          c:\Program Files\Actinic v10\OCCUpgrade\OCCUpgrade.ini

          Find the line:
          [Version]
          Number=

          Increment the Version Number by 1





          Step 4:

          Open each actinic site in turn... actinic will do an OCC upgrade.

          Upload your site changes

          Hope that helps!

          Comment

          Working...
          X