Jump to content

Addin prefix to order reference (question)


LauraPresta

Recommended Posts

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 ?)

Link to comment
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
×
×
  • Create New...