Jump to content

Configuring order reference ?


Recommended Posts

Hi everyone,

 

so PS 1.6. introduces a random letters series as order reference instead of the incremental numbers system like I am used to in 1.4. - is there a way to change that, or configure how the order reference is generated?

 

Because while I understand that this new reference system prevents customers from knowing how many orders a business really has, it also makes my own workflow and filing a lot more complicated. 

 

Thanks for your help and input!

 

Dan

Link to comment
Share on other sites

Hi and thank you both for your replies! I am upgrading from 1.4 so this order number issue is new to me, and searching the 1.6 forum  did not show any results (and I did not think of checking the 1.5 forums).

 

@ tuk66 - I just watched the M4 PDF demo video, and it looks like it is possible to create two different PDF invoice templates, is that right? In that case I could create a template for internal use that shows the order number in addition to the reference, which would allow me to keep my current warehouse management and filing practices, and I could edit a separate invoice for the customer that only shows the order reference.

 

@ Nemo - yes, but it is not clearly visible, and not on the printed invoice either. We usually refer internally to orders by the three last digits of the order number, and it's so much easier to tell the person packing the order "hey, you need to do this and that with order 456" rather than "can you look up order RGDJKELFRP"! ;-)

  • Like 1
Link to comment
Share on other sites

@ tuk66 - I just watched the M4 PDF demo video, and it looks like it is possible to create two different PDF invoice templates, is that right? In that case I could create a template for internal use that shows the order number in addition to the reference, which would allow me to keep my current warehouse management and filing practices, and I could edit a separate invoice for the customer that only shows the order reference.

 

Exactly!

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

@vekia - sadly I just upgraded my store from 1.4.7.0 to 1.6.0.7 and this module doesn't work I'm afraid.

Anyone else know how this can be changed? I'm with @Mr Denial ... it's much easier to look up an order with numbers in order rather than random letters - argh !!!

  • Like 1
Link to comment
Share on other sites

  • 3 months later...
  • 4 weeks later...

@vekia - sadly I just upgraded my store from 1.4.7.0 to 1.6.0.7 and this module doesn't work I'm afraid.

 

Anyone else know how this can be changed? I'm with @Mr Denial ... it's much easier to look up an order with numbers in order rather than random letters - argh !!!

Hi,

 

actually it`s pretty easy.

If you want order number to be generated from numbers (for example 943751684) and not from letters (GFKELCTRY), 

1. Open the file /classes/order/Order.php

2. Find the function generateReference()      (row 1497 in version 1.6.0.9, for example)

3. Two rows below change the parameter 'NO_NUMERIC' to 'NUMERIC'

4. Optionaly change the number  '9' to different one (it defines the length of order ID)

 

The whole row should looks like:

return strtoupper(Tools::passwdGen(9, 'NUMERIC'));

 
This calls the function passwdGen that you can find in /classes/Tools.php, if you want to play more with algorithm how the order ID is generated.
 

 

PS:

I`m not programmer and I have only basic knowledge of PHP.

I`m using Prestashop for 1 month only.

Still it`s possible to dive inside the Prestashop code and find the way how to change the behavior.

  • Like 6
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

i have more than one shop and the system (numerical or not) does not allow me to see difference between orders on different shops. when a payment comes in, i don't see straight away on my bank account which shop has generated a paid sale. Is it possible to have a reference like this?

 

Shop1-5689

Shop2-6985

 

Or completely numerical where the first number is the number of the shop:

 

15689

26985

 

So i would need a fixed first part followed with the reference of this order.

I hope this is possible...

 

thanks

Christophe

Edited by paleoglobe (see edit history)
Link to comment
Share on other sites

i have more than one shop and the system (numerical or not) does not allow me to see difference between orders on different shops. when a payment comes in, i don't see straight away on my bank account which shop has generated a paid sale. Is it possible to have a reference like this?

 

Shop1-5689

Shop2-6985

 

Or completely numerical where the first number is the number of the shop:

 

15689

26985

 

So i would need a fixed first part followed with the reference of this order.

I hope this is possible...

 

thanks

Christophe

 

Both are possible.

Just play with the function generateReference() as I described.

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

I need sequential numbers, like: 0001, 0002...

 

Now I can get random letters or numbers, but I need it sequentially.

 

I followed all the methods and non worked for me, even the module.

 

I'm on PS 1.6.0.11

 

Thanks for your help.

Link to comment
Share on other sites

I need sequential numbers, like: 0001, 0002...

 

Now I can get random letters or numbers, but I need it sequentially.

 

I followed all the methods and non worked for me, even the module.

 

I'm on PS 1.6.0.11

 

Thanks for your help.

I also need reference is the same as the invoice number, so I want to know where to change it.. thanks

Edited by Brian.abk (see edit history)
  • Like 2
Link to comment
Share on other sites

The only way to have sequential numbers is to

1- On that method, grab the highest ref number from the db (let's pretend we have it, if not it's 00001)

2- Extract the integer from that string, then increment by 1, use lpad to add 0s and save it to the reference field

Link to comment
Share on other sites

×
×
  • Create New...