Jump to content

Order Reference From Text To Number - Limit 9 Characters?


gabriiel
 Share

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
 

Share this post


Link to post
Share on other sites

  • 6 years later...
On 1/7/2016 at 5:30 PM, gabriiel said:

I was looking into another shop db, where I use modrefchange and noticed this coulmn to be 100chars long... It was simplier than I thought. It works fine now :)

 

Thanks a lot.

How did you manage to change this @gabriiel?

Share this post


Link to post
Share on other sites

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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More