gabriiel Posted January 7, 2016 Share Posted January 7, 2016 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 More sharing options...
roja45 Posted January 7, 2016 Share Posted January 7, 2016 Field in the DB is only 9 chars so it's getting truncated: reference varchar(9) utf8_general_ci Link to comment Share on other sites More sharing options...
gabriiel Posted January 7, 2016 Author Share Posted January 7, 2016 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. Link to comment Share on other sites More sharing options...
Patrick Oort Posted May 7, 2022 Share Posted May 7, 2022 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? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now