• Welcome to KonaKart Community Forum. Please login or sign up.
 

User ID as Email

Started by BruceLee, October 09, 2007, 02:34:54 pm

Previous topic - Next topic

BruceLee

Hi Team,

In KK, the unique ID for an user is the email. However, on our website, it's an Username and the email could be used for several users (e.g. all members in a family).
Is any workaround for this using KK?

Thanks!
-Bruce

trevor

Hi Bruce,

In KonaKart the email address must be unique - although it's not a primary key and can be changed after an account has been opened.

KonaKart uses the email address to send emails to the customer (welcome messages and order information etc).

You could put a group email address in one of the custom fields and send emails to that address rather than the standard email address.  The sending of emails to those addresses would be custom code of yours of course.

With the default (download kit) product you will see that there's a check in the Struts layer that the username is a valid email address (this is defined in WEB-INF/validation.xml) :

<field property="emailAddr" depends="required,email">
   <arg0 key="register.customer.body.email"/>
</field>
      

If you didn't want this to be an email address you could take off this check.   The penalty will be that KonaKart won't be able to send emails to these accounts if you do this.

Internally there is no check for a valid email address format so if you're using the API to register customers, you won't have to change validation.xml.

So, no easy solution to this problem.  Certainly better if you can use a unique email address for the username.   Perhaps it's possible for you to use forwarding groups outside of KonaKart to redirect the unique emails to defined group email addresses?

Regards,

Trevor

BruceLee

Thank Trevor for quick reply.
I don't want to restrict that my users have to have their own email, because some of our users can be children or elder people.
When we evaluate KK, we found this feature is also critical for us.
If we decide to change code for sending email to Custom field, which class should we change or inherit? Any samples?

Thanks!
-Bruce

trevor

Hello Bruce,

KonaKart is not designed to send emails from any field other than the current emailAddr field so if you were to use one of the custom fields for your shared email addresses you would have to write your own code to send emails to those addresses.   You have a hook for such code at the point that order statuses change - see http://www.konakart.com/configurationfaq.php#how_can_i_make_something_happen_when_an

Since you will be creating the users, you will know when to send a welcome email so that's also covered.

Which emails did you want to send to the customer?



A solution that would involve no changes to KonaKart would be one where you manage the email forwarding outside KonaKart.  For this you would have to maintain a forwarding mapping in your mail server between your unique username email addresses and the group email addresses.


We have no immediate plans to change this behaviour in KonaKart but could provide this functionality on a consultancy basis.  (That is, to provide a means of specifying that all emails to a customer are sent to a new alternateEmailAddr instead of his emailAddr).  Write to sales at konakart . com if you're interested in pursuing that route.

Regards,
Trevor

BruceLee

October 10, 2007, 05:03:34 am #4 Last Edit: October 10, 2007, 05:48:22 am by BruceLee
Thank Trevor. Though your email forwarding solution cannot apply to our case because many of our users may even don't have an email. They just want to buy some products from our website, and we cannot force them to register a new email for this purpose.

Quote from: trevor on October 09, 2007, 06:09:17 pm
...  You have a hook for such code at the point that order statuses change - see http://www.konakart.com/configurationfaq.php#how_can_i_make_something_happen_when_an

I looked the link above. It mentions ORDER_INTEGRATION_CLASS. So I need to change "Admin->Configuration>>Stock and Orders>>Order Integration Class" pointing to my class.
Can my class derive from com.konakart.bl.OrderIntegrationMgr, and reuse its saveOrder() method, plus my own logic? Do you have any samples?

I'd strongly suggest that in the later KK version, use Username as unique ID for login, and email as optional. Because in many countries, email is not so penetrated as in UK and US, esp for elder pepple.  I'm in US, but one of our project's big markets is in Asia. I need think again if KK is best for our application.

Please give what your managment thinks. Thank you!
-Bruce

trevor

Bruce,

Users do not have to have email addresses.  They just have to supply a user id that's unique and looks like an email address (unless you modify the Struts validation, in which case it doesn't even have to look like an email address). Obviously, if it isn't a legal email addres they won't receive any emails.

To quote from the link I sent you:

The ORDER_INTEGRATION_CLASS and ADMIN_ORDER_INTEGRATION_CLASS properties can be edited in the Configuration>>Stock and Orders section of the Admin App.

Regards,
Trevor

trevor

Bruce,

The work required to provide the functionality you require is quite small but you don't seem prepared to spend anything to help support the future development of KonaKart?

Are you working on a very small budget for your project?


QuoteCan my class derive from com.konakart.bl.OrderIntegrationMgr, and reuse its saveOrder() method


Yes, you can do that although, at the moment, that saveOrder doesn't do anything except log a comment.

Trevor

BruceLee

Trevor,

Honestly, since we are still in the evaluation stage of a shopping cart, we are probably not ready to pay right now.
We have to make sure the 3rd party software component matches our current needs and our engineers are comfortable with development on it.
After deciding to use it, we usually buy a support contract to make us confident. My job is to choose best quality/price ratio product to our management.

Thank again for reply,
-Bruce