Author Topic: login manditory to create an order?  (Read 1717 times)

sdyck

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
login manditory to create an order?
« on: April 23, 2009, 11:52:30 AM »
So I've been making some good progress, but ran into a strange snag...

I've been modifying the InsertOrder.java and have noticed that I cant seem to create an order using a default / temp user.

I successfully call
eng.addToBasket(sessionId, eng.getTempCustomerId(), item);
Basket[] items = eng.getBasketItemsPerCustomer(sessionId, eng.getTempCustomerId(), DEFAULT_LANGUAGE);

but fails here:

Order order = eng.createOrder(sessionId, items, DEFAULT_LANGUAGE); // passing in null b/c I don't want to have to create a user.

Do I MUST create a customer and login first? or is there any way to create an order without being logged in?

julie

  • Administrator
  • Hero Member
  • *****
  • Posts: 386
    • View Profile
    • KonaKart
Re: login manditory to create an order?
« Reply #1 on: April 26, 2009, 04:05:24 PM »
If you don't want to create a permanent customer using the registerCustomer() API call, you can create a temporary customer using the forceRegisterCustomer() API call. Take a look at the Javadoc for the differences.