KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: michaelwechner on January 05, 2011, 10:49:44 am

Title: Difference between OrderIf.getId() and Order.getOrderNumber()?
Post by: michaelwechner on January 05, 2011, 10:49:44 am
Hi

It's not really clear to me what's the difference between getId() and getOrderNumber() re

http://www.konakart.com/javadoc/server/com/konakart/appif/OrderIf.html

because when using

myOrder = kkEngine.createOrder(sessionId, items, languageId);

then

myOrder.getId() always returns 0

and

myOrder.getOrderNumber() returns null

althought I have already some existing orders within the table "orders"?

I guess one has to set this explicitely with setId(...) and setOrderNumber(...), right?

Any hint is much appreciated.

Thanks

Michael
Title: Re: Difference between OrderIf.getId() and Order.getOrderNumber()?
Post by: michaelwechner on January 05, 2011, 11:00:48 am
Hi

I just noticed that one has to save the order first with

kkEngine.saveOrder(sessionId, order, languageId);

in order to get an ID. It think it would be nice to mention this within the Javadoc ;-)

Thanks

Michael