Post by eighteenhk » Fri Mar 15, 2019 4:07 pm

Hello Everyone.

May I ask how to change the id? I already know I can add prefix, but I want the order id become either the date or random.
For example: Order time: 2019-03-15 16:05:23 Order ID: 2019031516052301 etc...
If this is impossible, can I make it randomly? I don't want the customer know how many orders of my store. Thanks!! :)

Newbie

Posts

Joined
Thu Feb 14, 2019 10:11 pm

Post by thekrotek » Fri Mar 15, 2019 4:09 pm

You don't change order_id and you can't make it random.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by eighteenhk » Fri Mar 15, 2019 5:34 pm

thekrotek wrote:
Fri Mar 15, 2019 4:09 pm
You don't change order_id and you can't make it random.
so it is impossible to hide my order number from customer?
How about the invoice number?

Newbie

Posts

Joined
Thu Feb 14, 2019 10:11 pm

Post by paulfeakins » Fri Mar 15, 2019 6:54 pm

eighteenhk wrote:
Fri Mar 15, 2019 5:34 pm
How about the invoice number?
You should be able to make something different appear on the confirmation emails by editing that template.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by thekrotek » Fri Mar 15, 2019 7:09 pm

eighteenhk wrote:
Fri Mar 15, 2019 5:34 pm
How about the invoice number?
By default, invoice number is just some prefix plus order ID. You can hide it though.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by kestas » Sat Mar 16, 2019 3:55 am

thekrotek wrote:
Fri Mar 15, 2019 7:09 pm
eighteenhk wrote:
Fri Mar 15, 2019 5:34 pm
How about the invoice number?
By default, invoice number is just some prefix plus order ID. You can hide it though.
It is not by default.
By default you generating invoice number. So, invoice number can be just sequentially generated + some prefix which you set on your shop settings. And invoice number can be different than order number.

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by kestas » Sat Mar 16, 2019 4:00 am

eighteenhk wrote:
Fri Mar 15, 2019 4:07 pm
Hello Everyone.

May I ask how to change the id? I already know I can add prefix, but I want the order id become either the date or random.
For example: Order time: 2019-03-15 16:05:23 Order ID: 2019031516052301 etc...
If this is impossible, can I make it randomly? I don't want the customer know how many orders of my store. Thanks!! :)
If you want to show for your customers some "high" order ID number you can edit the last your order in your phpMyadmin by changing order id to some "high" number. The next orders will show sequentially higher order number. Randomly order_id cannot be generated.

Edited. The better way... do not edit real order. For this you need to make "fake" order by yourself and edit order_id on this one in your phpMyadmin table "order". Before you edit it, you must make backup of your database in case if something goes wrong.
Last edited by kestas on Tue Mar 19, 2019 3:16 pm, edited 1 time in total.

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by chongshengdz » Mon Mar 18, 2019 5:40 pm

you can move to cubecart, they have the order id you want.
opencart is impossible.

https://www.transistorfet.com/
https://www.transistormosfet.com/


New member

Posts

Joined
Sat Apr 12, 2014 10:18 pm


Post by OSWorX » Mon Mar 18, 2019 8:18 pm

I am a bit surprised of some answers here!

Just to clarify: order_id is only the internally generated database table (entry) id.
Is sequential and cannot be changed.
Ot better it can be changed, but that makes no sense at all.

Why has this number be a int(eger)?
As said, is simply the internal id for the database.

Is this id further used?
Yes, at every call of the order (back- and frontend as well as in the order email).

What is the Invoice number?
A custom defined string (letters and numbers).
Can have a prefix (defined in the system settings) or can have some custom output (as done by some invoice extensions).
Some of these extensions (as mine also) allow you to define the output as you want (or need, e.g. in case you need a special number for your bookkeeping software).

Which all at least means, if you do not want to share your order_id, simply use something else.
Simply create an extension which hide all order_id(s) and replace them with your fantasy number/logic/whatelse.

But beware, the moment you want to allow your customers to have access to their order history (e.g. via customer account and/or order confirmation email), you will have troubles .. because no real order_id is used.

If you really want to go this way, you have to 'translate' internally also those fantasy numbers .. otherwise your shop is broken.

Decide however you want and simply create the working extension for it (or hire someone if you are not able to do so).

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by thekrotek » Mon Mar 18, 2019 8:52 pm

Short version: you don't change order ID.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by OSWorX » Mon Mar 18, 2019 11:52 pm

thekrotek wrote:
Mon Mar 18, 2019 8:52 pm
Short version: you don't change order ID.
Shortest: maybe.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria
Who is online

Users browsing this forum: No registered users and 29 guests