Jump to content

[FREE MODULE] Numeric order reference


Daresh

Recommended Posts

Changes the order reference from a random string to a random number or order ID.

This module was used by many shops, but deleted some time ago from this forum by one nasty user.

People keep asking me for it, so here it is reuploaded.

Still works for Prestashop 1.6, 1.7 and 8.0.

gmnumeric_v_1_2_0.zip

New version - to make sure the new override is applied, I recommend to reinstall and reconfigure the module.

gmnumeric_1_2_1.zip

Edited by Daresh (see edit history)
  • Like 8
  • Thanks 4
Link to comment
Share on other sites

  • 2 weeks later...

Hello, thank you for the module, it works great, but it messes up my Email order confirmation template.
it looks kind a messy in sent e-mail.

What is the name of the template so I could change it. I looked all available templates but couldn't find this one.
 

Any ideas?

Thank you very much
R

 

 

gmail-preview.jpg

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

  • 4 weeks later...

I had a problem with this module. It happened after I had moved my shop to another server (both PHP 8.1).

On the new server you could pay for an order. But the cart was never converted into an order. Instead the software hang and got a timeout after you paid.

On analysis it turned out that the problem was in the function validateOrder() in /classes/module/PaymentModule.php.

It turned out that the following code had become an eternal loop:

            do {
                $reference = Order::generateReference();
            } while (Order::getByReference($reference)->count());

Order::generateReference(); always returned the number of the last order.

This was with Thirty Bees 1.4.

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
  • 1 month later...
  • 1 month later...

The simplest solution is to set the AUTO_INCREMENT value in the database for the ps_orders table to one that you like, and then set the module to make the order reference the same as order ID.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
On 9/9/2024 at 8:19 AM, Daresh said:

Hi,

yes, it is 1000000000.

Hello Daresh,

thank you for your module. Is there any update? I would by happy if there will be function like (y) for current year in prefix field...etc. thank you

Link to comment
Share on other sites

  • 2 weeks later...

In this module I stick to the safe number of characters for order reference, which is 9. So adding dates and other long prefixes may not leave anough room for the reference to be unique.

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...