Announcement

Collapse
No announcement yet.

Need help to change order number

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

    Need help to change order number

    I modified the way the order number is created.
    I need to have a number beginning with INT followed by 5 numbers. I fixed the first order number at INT10001 and used the following code into orderscript.pl:
    # now we are ready to construct the order number
    #
    $::s_sOrderNumber = "INT" . substr($$::g_pSetupBlob{CGI_ID}, -1) .
    substr("0000" . $nCounter, -4);

    After reaching INT19999 the new order number has been INT10000.
    How can I change code to get INT20000 ?
    Thanks
    Didier
    www.supreme.fr
    _____________________
    Saint Malo. France

    #2
    This should do it:

    # now we are ready to construct the order number
    #
    $::s_sOrderNumber = "INT2" . substr("0000" . $nCounter, -4);

    Mike
    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

    -----------------------------------------

    Comment


      #3
      Thank you Mike. It works.
      I will probably have to change when I will arrive at 29999 ?
      Didier
      www.supreme.fr
      _____________________
      Saint Malo. France

      Comment


        #4
        Hi Didier, I'm glad it works.

        Yes, you'll have to change it after 29999 as you're only using 4 digits for the counter. It's an easy change (change the 2 in INT2 to a 3) but you could also use 5 digits for the count if you don't want to change it too often.

        Mike
        -----------------------------------------

        First Tackle - Fly Fishing and Game Angling

        -----------------------------------------

        Comment


          #5
          Thank you for you help and clear explanation.
          Didier
          www.supreme.fr
          _____________________
          Saint Malo. France

          Comment

          Working...
          X