Announcement

Collapse
No announcement yet.

v9 Order references

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

    v9 Order references

    Hi, I've read the threads on changing from the default 2xInitial + Postcode+ Number to get order reference numbers, and seen advice on how to change OrderScript.pl at the line starting:

    Code:
    $::s_sOrderNumber = $sInitials . $sPostCode . substr($$::g_pSetupBlob{CGI_ID}, -1) .
    However, the following lines in v 9.02 check for order numbers which are 14 characters long.
    Code:
    #? ACTINIC::ASSERT(14 == length $::s_sOrderNumber, "Order number is not 14 characters long (" . (length $::s_sOrderNumber) . ", " . $::s_sOrderNumber . ").", __LINE__, __FILE__);
    
    	return ($::SUCCESS, undef, $::s_sOrderNumber, undef);
    	}
    I wish to change to AAA-NNNNN or 3 alpha, "hyphen", and 5 numeric, total of 9 characters.

    Can I just change the code to

    Code:
    $::s_sOrderNumber = "AAA-" . substr($$::g_pSetupBlob{CGI_ID}, -1) . substr("00000" . $nCounter, -4);
    
    #? ACTINIC::ASSERT(9 == length $::s_sOrderNumber, "Order number is not 9 characters long (" . (length $::s_sOrderNumber) . ", " . $::s_sOrderNumber . ").", __LINE__, __FILE__);
    
    	return ($::SUCCESS, undef, $::s_sOrderNumber, undef);
    	}
    Regards
    Rich

    #2
    I changed my order references according to the following instructions in the AUG:

    Making the Actinic Order Number Shorter
    Currently, order numbers are made up the customer initials, then the postcode, then a sequential number - totalling 14 characters.
    If you want this to be shorter, use the following technique.
    In this example we will replace the first part of the order number with three letters ('ACT') and then only have 5 characters for the sequential number, rather than 8.
    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);
    Change the line to:
    $::s_sOrderNumber = "ACT" . substr($$::g_pSetupBlob{CGI_ID}, -1) . substr("0000" . $nCounter, -4);
    Change "ACT" as required.
    Actinic 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.
    Reusable Snore Earplugs : Sample Earplugs - Wax Earplugs - Women's Earplugs - Children's Earplugs - Music Earplugs - Sleep Masks

    Comment


      #3
      Did you get any problems with the code in the following lines looking for a 14 character order reference? (This is in OrderScript.pl in v9).
      Rich

      Comment


        #4
        Originally posted by Rich Atkins View Post
        Did you get any problems with the code? (This is in OrderScript.pl in v9).
        Nope. Worked first time.
        Reusable Snore Earplugs : Sample Earplugs - Wax Earplugs - Women's Earplugs - Children's Earplugs - Music Earplugs - Sleep Masks

        Comment


          #5
          Hi, I made the script changes as above a number of years ago, but we are know about to reach 9999, so I need to increase the number of digits. We currently have;

          Code:
          $::s_sOrderNumber = "TR" . substr($$::g_pSetupBlob{CGI_ID}, -1) . substr("0000" . $nCounter, -4);
          Ideally I would like to remove the script ID, and add an additional digit, does the below look correct?

          Code:
          $::s_sOrderNumber = "TR" . substr("00000" . $nCounter, -5);
          Thanks
          Jethro

          TridentUK.com, the yacht and dinghy shop on the web

          Comment


            #6
            Hey Jethro,

            The coding seems okay, one thing is you can shorten it, but you cannot extend the order number, As the main application is looking for a certain amount of characters. But what you written seems okay. As always if the scripts fails, then copy the original back into your site folder and update

            Kind Regards

            Comment

            Working...
            X