Page 1 of 1

custom order id

Posted: 21 Jan 2018, 15:52
by antonlinderer
How would I go to use custom order id's instead of the standard id for orders which is now AUTO_INCREMENT ?
I was thinking of overriding the aimeos-core file located in lib/mshoplib/src/MShop/Order/Manager/Base/Address/Standard.php
Is that the right approach and how would I do that? Thanks.

Re: custom order id

Posted: 21 Jan 2018, 16:50
by Travin
Hey
I think you can extend it by placing here your custom version. I hope so, i'm not sure :roll:
\ext\your-ext\lib\custom\src\MShop\Order\Manager\Base\Address\Standard.php

Re: custom order id

Posted: 21 Jan 2018, 19:54
by aimeos
@anton: What do you want to achieve? Can you post your alternative table structure?

Re: custom order id

Posted: 21 Jan 2018, 22:17
by antonlinderer
I would like to have my order id's as unix timestamps instead of AUTO_INCREMENT integers.

Re: custom order id

Posted: 22 Jan 2018, 15:56
by aimeos
We wouldn't recommend that. What if you have two orders in the same second?

Re: custom order id

Posted: 22 Jan 2018, 19:20
by antonlinderer
Excellent point!
I should forget about this.
Thanks for the feedback.