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

Documentation of KonaKart

Started by David, November 30, 2007, 03:21:06 pm

Previous topic - Next topic

David

Hi,

I was trying to search orders matching with orderStatus = 1, I tried a lot of combination and finally a could get the order I needed. This is what i did:

   bus.setOrderStatusId(1);
   bus.setCustomerId(-1);
   bus.setOrderId(-1);
   bus.setPurchaseDate(null);
   
   res = conKK.getOrders(sesionKK, bus, 0, 100, -1);

is there any place in the api or in the documentation of konakart where says that the correct parameters to do that search are those?

I think it should be in the api of konakart. Maybe you should put this information to do it easier

David

ryan

Hi David,

Good for you for trying a few combinations to try to work it out for yourself :-)   I'm glad to see you got there in the end... and by the way you got it absolutely right.

You're right; we could improve the javadoc.   We have recently dramatically-improved the application javadoc and we are about to do the same for the admin api.

You should see this improved javadoc on the site in the next two weeks.

Until then, if you find you are struggling because you don't know how to use the API, please ask the questions on the forum.   This not only helps you get your work done quicker, but it is also a good way to remind us to complete the javadoc to a higher standard  :)


FYI, we define a constant for "NOT_SET" for values in search objects all over the API.  You may wish to use this constant?


package com.konakartadmin.bl;

/**
* This is where all the constants are defined that are used in the konakartAdmin app
*/
public class KonakartAdminConstants
{
    /**
     * "Not Set" indicator for integers
     */
    public static final int NOT_SET = -1;


Cheers,
Ryan

David

FYI - For your information ....  I had to search that on the wikipedia  ;D

thanks for all your work. I put this because a few months ago I did another search in the products and I used -100 instead -1 or NOT_SET.

   AdminProductSearch prodSearch = new AdminProductSearch();
   prodSearch.setManufacturerId(-100);// -100 == Search all
   prodSearch.setCategoryId(-100);// -100 == Search all
   prodSearch.setWhereToSearch(-100);// -100 == Search all
   prodSearch.setPromotionId(-100);// -100 == Search all
   AdminProducts busqueda = conKK.searchForProducts(sesionKK, dataDesc, prodSearch, -1);

I supose it still works, but it's not too clear using -1 in one place and -100 in other

Cheers,

David