Announcement

Collapse
No announcement yet.

Can I add a prefix to the order numbers?

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

    Can I add a prefix to the order numbers?

    The order number can be no longer than 14 characters so if you want to add a prefix you will have to adjust the number of characters that make up the rest of the order number.

    * Locate the file 'OrderScript.pl' within your site folder and open it using 'Notepad' or a similar text editor.

    * Search for '0000000'. You should find the following line:

    $::s_sOrderNumber = $sInitials . $sPostCode . substr($$::g_pSetupBlob{CGI_ID}, -1) . substr("0000000" . $nCounter, -7);

    * This is made up of the following:

    $sInitials = customers initials
    $sPostCode = last 4 characters of the postcode
    substr($$::g_pSetupBlob{CGI_ID}, -1) = last digit of the cgi-script ID number
    substr("0000000" . $nCounter, -7) = 7 digit sequential number

    * In this example we will create a prefix of three letters ('ACT') and then only have 4 characters for the sequential number, rather than 8.

    * Change the line to:

    $::s_sOrderNumber = "ACT" . $sInitials . $sPostCode . substr($$::g_pSetupBlob{CGI_ID}, -1) . substr("00000" . $nCounter, -4);

    Change "ACT" as required.

    * Save and close the file and update your site.

    If you want to change the length of the postcode characters to accommodate the prefix then change the postcode part to:

    substr($sPostCode, -2)

    This will show the last two characters of the postcode. You can also remove any of the items except the sequential number part at the end.

    SellerDeck is not able to provide any detailed support for script changes made. If you find that there is a problem, an original copy of the script can be found within the 'Original' folder in your installation. Copy this into your site folder.
Working...
X