cancel
Showing results for 
Search instead for 
Did you mean: 

Order number increment issue

Former Member
0 Kudos

I want to use the predefined number series for orders, which is possible by setting local properties keygen.order.code.start=. But the order numbers are getting increment by 2(default behavior of hybris), whenever the order is placed it should get increased by 1. Is there any way to change or control the increment value by 1.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

You should specify : numberseries.cache.size.NUMBERSERIESKEY = 1

Former Member
0 Kudos

Otherwise, you can override CreateOrderFromCartStrategy injected by your customOrderCodeGenerator to use your sequence for the orders created.

Former Member
0 Kudos

Since Cnd Order uses the 'orderCodeGenerator', everytime alternatively Order code is increased by 2. Instead of using the same orderCodeGenerator, you can create a new KeyGenerator injected with configService to read the property of local.properties and incremented by 1000 everytime server restarts. Have to be cautious about getting duplicates using the custom orderCodeGenerator.

christoph_meyer
Active Participant
0 Kudos

That depends on several things, eg. whether you you the same series for carts and orders, what your numberseries cache size is, whether your system is clustered or whether it is rebootet in the meantime, etc.

Search the wiki for "scaling like hulk" (yes, really) for a description on the numberseries.

Former Member
0 Kudos

Something to note if you are trying to change the keygen.order.code.start, you must also change the keygen.order.code.key for the new value to have any effect. Unless you were to re-initialize the system.

This was mentioned on the "scaling like hulk" page as well.