KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: ada_v on May 07, 2009, 06:50:12 pm

Title: get the name of the person who is loged in
Post by: ada_v on May 07, 2009, 06:50:12 pm
Hy,

I need some help:
   - I need to display the name of the person who is logged in in the page Header, or if there is not already log in then to display nothing
   - I need also to display near the cart the number of items.

Probably there are function in API in KKAppEng but I haven't found yet.
Sorry for this simple question.

Thanks a lot, and thanks in advance.

Ada
Title: Re: get the name of the person who is loged in
Post by: julie on May 07, 2009, 08:33:03 pm

Quote- I need to display the name of the person who is logged in in the page Header, or if there is not already log in then to display nothing


kkAppEng.getCustomerMgr().getCurrentCustomer() -> Negative id if the person isn't logged in

Quote- I need also to display near the cart the number of items.


CustomerIf cust = kkAppEng.getCustomerMgr().getCurrentCustomer();
cust.getBasketItems().length -> cust.getBasketItems() could be null
Title: Re: get the name of the person who is loged in
Post by: anujbatra2788 on November 06, 2012, 06:48:03 am
Hi I am trying the same thing for konakart 6.3. For me the id returned is -10. Can you please advise what can be done for checking if the current user is a guest or logged in user.

Is it appropriate to determine that the user is guest if the ID is not negative for the customer