Jump to content

Order Reference From Text To Number - Limit 9 Characters?


gabriiel

Recommended Posts

Hi all,

 

I am trying to change the order reference string to number, for my needs the best is to use strftime("%s"), which is 10 characters and unique (I don't believe I will have more than one order in a second in a close period of time, that's why :)

 

But the problem is, it gets truncated to 9 characters and I cannot find out why.

 

Instead of order reference 1452181417 I get only 145218141, the last digit gets removed.

 

Currently I have in override Order.php this function:

    public static function generateReference()
    {
        return strftime("%s");
    }
 
Any help would be appreciated.
 
Thanks in advance.
Gabriel
 
Link to comment
Share on other sites

  • 6 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...