Jump to content
  • 0
LauraPresta

Addin prefix to order reference (question)

Question

Hello guyz,

Just a little question, and i make some description because i know it will intrest some other people

 

I need to add a prefix to order reference for exemple : PREKLKLKLKLK instead of original KLKLKLKLK reference

 

i changed generateReference (in class order/order.php) to :

    public static function generateReference()
    {
        $temp = strtoupper(Tools::passwdGen(9, 'NO_NUMERIC'));
        return ('PRE'.$temp);
    }

 

and in DB table order i had to change 'reference' structure from 

varchar(9)

 to 

varchar(12)

 

At first look everything work nice, but do you think i may have some trouble in the future ? (for any reason i could'nt discover right now ?)

Share this post


Link to post
Share on other sites

1 answer to this question

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

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