KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: Kim on September 16, 2011, 08:36:18 am

Title: Get Product By Id
Post by: Kim on September 16, 2011, 08:36:18 am
Hi friends,

Is there any function to get product by its id?

thx!
Title: Re: Get Product By Id
Post by: julie on September 16, 2011, 05:00:59 pm
Yes.


    /**
     * Returns a complete Product object for the given <code>productId</code> and language.
     * <p>
     * Returns null if no product is found. The specialPrice is null if a special offer doesn't
     * exist for the product.
     *
     * @param sessionId
     *            The session id of the logged in user
     * @param productId
     *            The numeric id of the product
     * @param languageId
     *            The id for the language that will be used. Value of -1 selects the default
     *            language.
     * @return A Product object
     * @throws KKException
     */
    public ProductIf getProduct(String sessionId, int productId, int languageId) throws KKException;
Title: Re: Get Product By Id
Post by: Kim on September 19, 2011, 10:01:02 am
Thank you very much!