KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: ramesh on August 19, 2009, 04:07:38 pm

Title: How to get customer password in vm template
Post by: ramesh on August 19, 2009, 04:07:38 pm

Hi Friends,
 
  I am trying to get customer password using customer.getPassword() method to send it as a part of welcome mail. But it always returns "null". Does any one has  tried and  found any solution  to achieve this

Please send me your comments.

Thanks in advance.
Title: Re: How to get customer password in vm template
Post by: trevor on August 19, 2009, 04:13:31 pm
You can't do that. The password is only stored after being hashed. KonaKart doesn't store unencrypted passwords.
Title: Re: How to get customer password in vm template
Post by: ramesh on August 19, 2009, 04:30:02 pm
Hi trevor,
Thanks a lot for your quick help.
But my requirement is to send a email and password entered by customer at the time of registration as a part of welcome email. So that they can reuse it in case they forget their passwords. Is it not possible to retrieve the password set in the bean and send it to the customer??? I'm able to get the email id by accessing customer.getEmailAddr() method where as  customer.getPassword() returns "null"

Could you please suggest me a solution to send customer password as a part of welcome mail.

Thanks a lot for your help.  :)
Title: Re: How to get customer password in vm template
Post by: trevor on August 19, 2009, 04:37:44 pm
Just use the sendWelcomeEmail1() api call where you can pass in name value pairs that can be picked up in the Velocity template.
Title: Re: How to get customer password in vm template
Post by: ramesh on August 19, 2009, 04:53:36 pm
hi trevor,
i'm using konakart version 2.2.6
api i used is senWelcomeEmail(), present in EmailMgr class (konakart.jar)
I've modified EmailMgr class to put customer object into velocity context as
Customer customer=getCustMgr().getCustomerForId(i)
velocitycontext.put("customer",customer) where customer is the object of Customer class.
But when i refer to $customer.getPassword() in vm file it returns "null"

Could u pls tell me what is wrong in this.

Once again thanks a lot for your patience and response  :)
Title: Re: How to get customer password in vm template
Post by: ramesh on August 22, 2009, 10:31:18 am
Where is the code for password encryption?
In which file it is written ?
Is it in jar file?