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

Change Customer Details

Started by David, October 03, 2007, 09:14:50 am

Previous topic - Next topic

David

Hi,

I have a little problem with customers details. I used the configuration on KonaKart Admin to uncheck all the values of gender, date of birth, state...

Now I need to add a new customer to KonaKart using SOAP, I use the function public int registerCustomer(java.lang.String in0, com.imatia.elastic.cliente.tienda.webServices.AdminCustomerRegistration in1) throws java.rmi.RemoteException; but I've got this error:

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.rmi.RemoteException: Exception caught in registerCustomer(); nested exception is:
java.lang.Exception: com.konakartadmin.app.KKAdminException: The Date parameter called birthDate must be given a value. It cannot be set to null.


Maybe I need to change this options in other place to use them with soap, or maybe I have to use another funcion, I'm not sure ¿¿some help??

Thanks

david

Brian

Hello David,

QuoteI used the configuration on KonaKart Admin to uncheck all the values of gender, date of birth, state...


Yes, these control what is shown and not shown on the UI.

As you have seen from the exception, we do however require a valid birth date at registration.

You can just add some kind of default date to your calling data to solve this.


How are you getting on with your KonaKart site?  Can you let us know what you're doing?

Regards,
Brian

David

Hi Brian

thanks for your help,

as you say, I can add a default date, or a default gender, but if there is a way to register a customer without wrong data I prefer doing that.

QuoteHow are you getting on with your KonaKart site?  Can you let us know what you're doing?


I'm conecting KK from other computer with SOAP, something like this:

        KKWSAdminIf port = new KKWSAdminIfServiceLocator().getKKWSAdmin();
        String sesion = port.login("root", "root");
       
        AdminCustomerRegistration cliente = new AdminCustomerRegistration();
        //cliente.setId( ((Number) res.get("ID_CLIENTE")).intValue() );
        cliente.setFirstName((String) res.get("NOMBRE_COMERCIAL"));//PUFADA
        cliente.setLastName((String) res.get("RAZON_SOCIAL"));//PUFADA
        cliente.setEmailAddr((String) res.get("EMAIL"));
        cliente.setPassword("prueba");//PUFADA
        cliente.setTelephoneNumber("987654321");//En otra tabla
        cliente.setStreetAddress((String) res.get("DIRECCION"));
        cliente.setPostcode((String) res.get("CPOSTAL"));
        cliente.setCity((String) res.get("LOCALIDAD"));
        cliente.setCompany((String) res.get("RAZON_SOCIAL"));
        cliente.setNewsletter("0");

        cliente.setSuburb("suburb");
        cliente.setState("porriño");
        cliente.setGender("m");
        cliente.setBirthDate(java.util.Calendar.getInstance());

If there is no way to not include this fields, no problem. I only ask because I saw the option in KonaKart admin

Thanks for your help  ;D

David

ouch

this line is missing in that code

        port.registerCustomer(sesion, cliente);

Brian

Hi David,

Our restriction on this one is due to maintaining database-compatibility with osCommerce who declare almost all of the customer columns as non-null in the database.

We choose to return exceptions when the data provided is null rather than adding our own default data because we feel this is worse than having the caller declare it.

I understand your concern but as you have control over the use of that data, the easiest solution for now is simply to add default values.  (I'm not sure if you can choose a perfect default gender however  ???)

In the future we may change the database definitions to allow null values in many of these customer columns but it's not currently planned due to our desire to remain compatible with the osCommerce database.


What you're doing there looks good.   Is your integration from another system?  Can you tell us about that?   It might be of interest to others?

Regards,
Brian

David

ok, I understand your point of view, its important to mantain the compatibility with osCommerce to gain new users.

What i'm doing is to integrate KK with an existing ERP, but don't worry about that, if i can contribute with something of this proyect to the comunity, i'll put it on the forum  ;)

Brian

Hi David,

Thanks for the explanation - I am always interested to hear what people are doing which can sometimes be useful to others.

Is that an integration with Elastic Business?  If so, that sounds like a great idea - good luck with that and let us know if you have any further questions.

Regards,
Brian

David

wow, we have a new Sherlock Holmes here, jejeje

yes, I'm going to integrate them, this is a proyect for my technical degree. I have a lot of doubts, but I'll do my best ;)

Brian

Hi David,

"Elementary, My Dear Watson"    :)

I'm very interested in all integrations of KonaKart with other systems, especially ERP systems.   We will soon be providing a module for using KonaKart from OpenCMS.

Since your project is for a degree course, does this mean that you might be able to share the integration with the community?

Regards,
Brian

David

QuoteSince your project is for a degree course, does this mean that you might be able to share the integration with the community?


I don't know yet, but probably not :( . I think I'm not the real owner of the proyect, that is the director proyect (although I'll do almost everything)

In any case what you say of OpenCMS sounds very interesting. ¿Where can I read something more about that?

Regards

david

Brian

Hi David,

About the OpenCMS integration...  we have been in discussions with the OpenCMS people about providing a KonaKart module for making it simple to add KonaKart to an OpenCMS system.   We haven't any more information on this at this stage but keep watching for some news on this over the coming months.

Regards,
Brian