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

How can i list all the products...

Started by sivaprakashcg, November 03, 2007, 06:25:37 am

Previous topic - Next topic

sivaprakashcg

HI,
    i have list all the products available in the cart. How can i achieve it.. is there any API available for this??If so??
Can u tell me... some idea.. any body guide me...

trevor

Hello,

All our Application Server API calls are available from the Javadoc at http://www.konakart.com/javadoc/server/ . You should look at com.konakart.appif.KKEngIf for a description of all of the API calls.

You could use the call getAllProducts to achieve what you want to do.

Regards,

Trevor

sivaprakashcg

Hi,
  i have tried to use the getAllProducts(sessionid,datadesc,languageid)

In which i have got sessionid from kkappIf. But i dont know how to find the datadesc and languageid. Could you help me??

trevor

Have you tried looking at the Javadoc ? Here's a text version of it :-

getAllProducts

ProductsIf getAllProducts(java.lang.String sessionId,
                          DataDescriptorIf dataDesc,
                          int languageId)
                          throws com.konakart.app.KKExceptionReturns all products using the given language.

Only Products with a non zero status and non zero invisible are returned. The description (which can be very long) and the array of options are not set. Also only the first two custom fields are returned (custom1 and custom2). The specialPrice is null if a special offer doesn't exist for the product.

dataDesc may be null. In this case, the number of retrieved products is limited to a default number, the products are ordered by the ProductId and the offset is set to zero. However, by setting the attributes of dataDesc, the following functionality may be controlled :
The maximum number of Product objects returned.
The offset which defaults to zero. This is useful when there are many Product objects, in order to return them using multiple calls to this method.
Whether or not to return invisible products.
Criteria on the custom attributes. If a custom attribute is set then only products with a matching custom attribute value are returned.
The Products may be sorted by :
Price Ascending
Price Descending
Date Added
Manufacturer
Times Viewed

Parameters:
sessionId - The session id of the logged in user
dataDesc - Used to control the data offset, limit the number of items returned and set the sort order
languageId - The id for the language that will be used. Value of -1 selects the default language.
Returns:
Returns a Products object
Throws:
com.konakart.app.KKException