custom order id

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
antonlinderer
Posts: 42
Joined: 14 Sep 2017, 09:59

custom order id

Post by antonlinderer » 21 Jan 2018, 15:52

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.

Travin
Posts: 70
Joined: 18 Dec 2017, 03:12

Re: custom order id

Post by Travin » 21 Jan 2018, 16:50

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
Laravel 6.18.19 | php 7.4.7 | Xubuntu | Aimeos Laravel 2019.10.5

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: custom order id

Post by aimeos » 21 Jan 2018, 19:54

@anton: What do you want to achieve? Can you post your alternative table structure?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

antonlinderer
Posts: 42
Joined: 14 Sep 2017, 09:59

Re: custom order id

Post by antonlinderer » 21 Jan 2018, 22:17

I would like to have my order id's as unix timestamps instead of AUTO_INCREMENT integers.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: custom order id

Post by aimeos » 22 Jan 2018, 15:56

We wouldn't recommend that. What if you have two orders in the same second?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

antonlinderer
Posts: 42
Joined: 14 Sep 2017, 09:59

Re: custom order id

Post by antonlinderer » 22 Jan 2018, 19:20

Excellent point!
I should forget about this.
Thanks for the feedback.

Post Reply