Jump to content
scorpionsworld

[MODULE] Change Order reference using Order ID and/or Cart ID

Recommended Posts

Wow, this looks good. Does it change the core or do any other changes?

No, the module simply hooks on to actionvalidateorder. The hook is called when the order gets validated by the paymentmodule.

Share this post


Link to post
Share on other sites

I´ve installed but when I finished some orders two numbers are shown in the payment details (bankwire) and in the confirmation e-mails:

 

No te olvides de insertar tu número de pedido 19_24 en el tema de su transferencia bancaria.

No te olvides de insertar tu número de pedido 20_25 en el tema de su transferencia bancaria.

No te olvides de insertar tu número de pedido 21_26 en el tema de su transferencia bancaria

 

The correct ID_order are 19, 20, and 21!!

please help!!

Share this post


Link to post
Share on other sites

looks like you might have it set to also show the "cart" number as the order reference. Try setting it like this.

 

I get 000000345 style references like this

 

see pic

 

 

 

I could be wrong though???

post-62668-0-35727600-1360328433_thumb.png

Edited by jimmyc

Share this post


Link to post
Share on other sites

Great module. However, It would be nice to see an option to set a total order reference digit length. 9 is a bit an overkill for me.

Share this post


Link to post
Share on other sites

We do need 000 in front but not so many. Just like in previous versions 6 total digits would be enough. Say order number 16, Order reference 000016.

Share this post


Link to post
Share on other sites

looks like you might have it set to also show the "cart" number as the order reference. Try setting it like this.

 

I get 000000345 style references like this

 

see pic

 

 

 

I could be wrong though???

many thanks, I set off the cart ID option

Share this post


Link to post
Share on other sites

I see yes it is 9 digits, future proof?? HA! I can still search for the number without the 000's so i do not mind. Much better for our mental proximity than HSUENDHSHE. Point taken though.

Share this post


Link to post
Share on other sites

Great module. However, It would be nice to see an option to set a total order reference digit length. 9 is a bit an overkill for me.

I might be able to create such an option BUT, by default reference is a 9 digit length. My guess is Prestashop had a reason to raise the bar.

Share this post


Link to post
Share on other sites

yes, that reason was to avoid duplicates as they use random letter password generator for their new order reference. Most of the users just want the old 6 digit sequential order reference back.

Share this post


Link to post
Share on other sites

help! I can´t enter in the backoffice in modules, and in the frontffice an error appears in the last step of the cart (after choose payment method)-

The module worked well!! but after install the module I´ve modified the spanish tranlations in bankwire/ltranslations/es.

 

For unistall the module, Can I delete the folder ordrefchange? or I have to do anymore? or its a problem of the modifications in the spanish tranlations?

thanks

Share this post


Link to post
Share on other sites

[NEDERLANDS]

Update van de module. modrefchange v1.1

 

In de geupdate versie is het nu ook mogelijk om het aantal nullen gebruikt als voorloopnullen van de cart of order id in te stellen.

Standaard is dit tot 9 nullen maar is in te stellen van 1 t/m 10.

 

[ENGLISH]

Module update. modrefchange v1.1

 

In this updated version it is now possible to configure the number of zeros uses as padding before the cart or order id.

Standard this is set to 9 but can be configured between 1 and 10.

Edited by scorpionsworld

Share this post


Link to post
Share on other sites

Hi guys, here is french translation, hope it's good certainly not perfect but it's a start.

 

Thank you for the module it's a good idea.

 

[FRENCH]

https://www.dropbox.com/s/e4nqzifjcppui0g/fr.php

 

Bonjour tout le monde, je viens de faire la traduction du module, j'espère qu'elle est correcte si quelqu'un peut vérifier ce serait pas mal en tout cas (attention mot clés) c'est pratique de pouvoir personnalisé la référence des commandes prestashop

 

by

Share this post


Link to post
Share on other sites

Hallo Scorpionsworld,

 

wanneer ik de module wil installeren krijg ik de foutmelding "The module modules you uploaded is not a module"

 

Enig idee, wat ik moet doen ?

 

Thanks,

Ivan

Share this post


Link to post
Share on other sites

Hallo Scorpionsworld,

 

wanneer ik de module wil installeren krijg ik de foutmelding "The module modules you uploaded is not a module"

 

Enig idee, wat ik moet doen ?

 

Thanks,

Ivan

Ja. De modrefchange folder uit de zip met FTP uploaden naar de /modules/ folder van de je webserver.

Share this post


Link to post
Share on other sites

Dear Sir,. Could you add several simple and useful option to you fantastic module?

 

Namely:

 

1. Set starting number of orders ID (and as final order #) as it done for inoice numbers in Prestashop 1.5.3.1 (see Back Office-Orders-Invoices)

 

2. I think that Order ID, Order Number and Invoice numbers for the same order should nbe the same number.

 

Could you merge all these features/options in your module?

 

1. set leading zeros for order number

2. make invoice number = order number = order ID

3. set starting number for order's numbering. I.e. next order number will be for example 15456 and will be increment for each next number.

4. Possibility choose # or № as prefix for numbering orders as in different countries used or # or №.

 

The options "3" I made manually so far, but you can integrate it in your module. I run SQL Query

 

ALTER TABLE `ps_orders` AUTO_INCREMENT=15456;

 

 

Next I set in BO-Orders-Invoices starting number for order invoices to 15456

 

That's all.

 

Of couse you should chack that this number should be greater then last order_id in ps_orders table.

 

 

Please add this features to yur module and it will be most helpful thing for Prestashop' users!

 

Best regards. Thank you!

Share this post


Link to post
Share on other sites

Dear Sir,. Could you add several simple and useful option to you fantastic module?

 

Namely:

 

1. Set starting number of orders ID (and as final order #) as it done for inoice numbers in Prestashop 1.5.3.1 (see Back Office-Orders-Invoices)

 

2. I think that Order ID, Order Number and Invoice numbers for the same order should nbe the same number.

 

Could you merge all these features/options in your module?

 

1. set leading zeros for order number

2. make invoice number = order number = order ID

3. set starting number for order's numbering. I.e. next order number will be for example 15456 and will be increment for each next number.

4. Possibility choose # or № as prefix for numbering orders as in different countries used or # or №.

 

The options "3" I made manually so far, but you can integrate it in your module. I run SQL Query

 

ALTER TABLE `ps_orders` AUTO_INCREMENT=15456;

 

 

Next I set in BO-Orders-Invoices starting number for order invoices to 15456

 

That's all.

 

Of couse you should chack that this number should be greater then last order_id in ps_orders table.

 

 

Please add this features to yur module and it will be most helpful thing for Prestashop' users!

 

Best regards. Thank you!

I'm sorry to say, but the features you mention will not be put in this module.

The reason for this is that all mentioned features are meant to change either the order id or the invoice id, while the module is only meant to change the random code order reference.

The changes you mention can either be done by editing (PDF-)templates or by using an SQL query in BO->Advanced Parameters->SQL Manager

Share this post


Link to post
Share on other sites
The reason for this is that all mentioned features are meant to change either the order id or the invoice id, while the module is only meant to change the random code order reference.

 

Daer Sir, did you mean that this module generate random numeric number, not increment number?

Share this post


Link to post
Share on other sites

Daer Sir, did you mean that this module generate random numeric number, not increment number?

Dear Lion1,

This module doesn't generate any number, it takes the number already generated by the cart and/or order objects.

Share this post


Link to post
Share on other sites

Many thanks for your job scorpionsworld.

 

I only have one problem with your module, it doesn't work the function of using zeros for the order ID prefix. If I have activated the option it doesn't work, and also if I specify a number of "0" to use, it doesn't work too.

 

¿Could you help me? :-)

Share this post


Link to post
Share on other sites
Many thanks for your job scorpionsworld. I only have one problem with your module, it doesn't work the function of using zeros for the order ID prefix. If I have activated the option it doesn't work, and also if I specify a number of "0" to use, it doesn't work too. ¿Could you help me? :-)
Could you please check if the module is hooked correctly to 'actionvalidateorder' in Backoffice->Moduels->Positions?

Share this post


Link to post
Share on other sites

here works perfectly in the form

MyText000[Ord_ID]

 

big thank you, Prestashop would be almost unusable without people like you

Edited by andrep

Share this post


Link to post
Share on other sites

And the module doesn't do anything to the order reference when an order is placed?

 

Yes, the module works, it replaces the letter code used by prestashop with the corresponding numbers, even if I add something as prefix (a letter for example) works. The only thing that don't work is if you try to use zeros to prefix the order.

 

35lccbs.jpg

Share this post


Link to post
Share on other sites

just a note

 

pay attention that your REF id is < than 9 characters

 

my REF code was GREEN000324 (11 characters) and prestashop dropped an internal error 500.

After debugging it turned out that it was the paypal module which freaked out.

 

Prestashop always reminds me internet explorer 6.0...

Edited by andrep

Share this post


Link to post
Share on other sites

This is strange, when I try to install from the BO I get a message saying "The module modules you uploaded is not a module" and nothing happens, it won't install. I'm using PS 1.5.3, am I missing something?

 

Never mind, I unzipped and pasted it in instead and was able to install it just fine. Great module, thanks!!

Edited by artofadornment

Share this post


Link to post
Share on other sites

Hmm, om de één of andere reden krijg ik de leading zero's niet actief...

Kun jij me eens uitleggen wat ik precies moet instellen voor onderstaand voorbeeld:

 

Gewenst ordernummer: 2013_0000[Order_id] (Totaal aantal posities na '2013_' is 6, dit is inclusief het aantal posities van de "Order_id").

 

Ik heb de volgende instellingen gemaakt/geprobeerd in PS1.5.1:

 

Use Order ID Enabled

Use Zeros to prefix Order ID Enabled

Number of zeros to prefix Order ID "Leeg"

Use Character(s) to prefix Order ID 2013_

Use Cart ID Disabled

Use Zeros to prefix Cart ID "Leeg"

Number of zeros to prefix Cart ID 6

Use Characters to prefix Order Reference "Leeg"

 

 

Use Order ID Enabled

Use Zeros to prefix Order ID Enabled

Number of zeros to prefix Order ID 6

Use Character(s) to prefix Order ID 2013_

Use Cart ID Disabled

Use Zeros to prefix Cart ID "Leeg"

Number of zeros to prefix Cart ID "Leeg"

Use Characters to prefix Order Reference "Leeg"

 

Beide geven als output 2013_74 o.i.d. ...

 

Wat doe ik verkeerd?

 

Misschien een extra tip voor de volgende versie: Gebruik van een datestamp voor de text prefix.

Alvast bedankt.

Share this post


Link to post
Share on other sites

×