Author Topic: get the name of the person who is loged in  (Read 950 times)

ada_v

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
get the name of the person who is loged in
« on: May 07, 2009, 12: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

julie

  • Administrator
  • Hero Member
  • *****
  • Posts: 408
    • View Profile
    • KonaKart
Re: get the name of the person who is loged in
« Reply #1 on: May 07, 2009, 02: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