Hi Ryan,
As I stated in my first post in this thread, this problem affects many actions.
The main problem now in the ShowCartItemsAction.
createTempOrder(kkAppEng, custId, items, ecf); throws NullPointerException because of
kkAppEng.getEng().createOrderWithOptions(sessionId, items, options,
kkAppEng.getLangId());
which suppress this exception.
then the same action throws the same exception at
for (int j = 0; j < b.getOpts().length; j++)
{
optNameArray[j] = b.getOpts()[j].getName() + " "
+ b.getOpts()[j].getValue();
}
item.setOptNameArray(optNameArray);
because b.getOpts()[j] returns null.
I've added these lines as a work around
for (int j = 0; j < b.getOpts().length; j++)
{
if(b.getOpts()[j]==null)
{
kkAppEng.getBasketMgr().removeFromBasket(b, /* refresh */true);
continue loop;
}
optNameArray[j] = b.getOpts()[j].getName() + " "
+ b.getOpts()[j].getValue();
}
This fixed the problem of ShowCartItemsAction, while the problem is deeper in RepeatOrderAction, because it uses the engine repeat order method which throws null pointer exception.
I think we can make a dirty work around in the RepeatOrderAction, to handle this repeat manually, instead of using the Engine itself.
Do you think this is applied, or should I find another path?!
Best Regards
Hatem Salem