on 08-17-2015 3:04 PM
Hi there,
I had the following configuration. 2 numberseries one for the cnd one for the order:
<bean id="orderCodeGenerator" class="de.hybris.platform.servicelayer.keygenerator.impl.PersistentKeyGenerator">
<property name="key" value="${keygen.order.code.name}" />
<property name="digits" value="10" />
<property name="start" value="420000000" />
<property name="numeric" value="true" />
<property name="template" value="$" />
</bean>
<bean id="cartCodeGenerator" class="de.hybris.platform.servicelayer.keygenerator.impl.PersistentKeyGenerator">
<property name="key" value="cart_code" />
<property name="digits" value="10" />
<property name="start" value="420000000" />
<property name="numeric" value="true" />
<property name="template" value="cart_$" />
</bean>
<bean id="commerceCartFactory" class="de.hybris.platform.commerceservices.order.impl.CommerceCartFactory">
<property name="netGrossStrategy" ref="netGrossStrategy"/>
<property name="keyGenerator" ref="cartCodeGenerator"/>
<property name="modelService" ref="modelService"/>
<property name="userService" ref="userService"/>
<property name="commonI18NService" ref="commonI18NService"/>
<property name="baseSiteService" ref="baseSiteService"/>
<property name="baseStoreService" ref="baseStoreService"/>
<property name="guidKeyGenerator" ref="guidKeyGenerator"/>
</bean>
And cache size is set to 1: numberseries.cache.size.luckynumberseries=1
Unfortunately my configuration isn't working correctly, The order number will be always increased by two instead one. The cartcodegenerator on the other hand is working correctly... Does anybody know what I'm doing wrong?
Greetz
Did you check all uses of the orderCodeGenerator in the spring definitions? A quick search shows several places, that might retrieve numbers from it.
Are you using the subscriptions module? It uses several carts/orders to manage different price types and might consume two order number at once.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dominik,
You can try instead of luckynumberseries in the property to the value of key mentioned in orderCodeGenerator as numberseries.cache.size.order_code=1
For example if the value mentioned in the property then numberseries.cache.size.order_code=1 should be used. You can find more information on below link as well. I hope this solves your issue.
https://wiki.hybris.com/display/forum/Scaling+like+Hulk+with+numberseries
Thanks,
Jayahar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.