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

problem getting the Manufacturer

Started by virtueed, November 23, 2007, 08:30:51 am

Previous topic - Next topic

virtueed

Hi,
I'm getting a problem while trying to get the Manufacturer object of a product. Here is the code that I'm using:
Quote
KKEngIf engine = kkEng.getEng();
prod = engine.getProduct(kkEng.getSessionId(), prodId1, kkEng.getLangId());
ManufacturerIf manu1 = prod.getManufacturer();


Manu1 is null (no matter which is the product)!!! But if I use this code:

Quote
int manuId1 = prod.getManufacturerId();

I get a regular id value, corresponding to the right manufacturer.

The code is inserted in a jsp (is not an action). Can you please help me? I'm sure I'm doing something stupid but I cannot get rid of this problem myself.

thank you and best regards,
Mirko.

julie

Hi Mirko,

For performance reasons, the getProduct() call doesn't instantiate a manufacturer object. You can get it using the getManufacturer() call with parameter prod.getManufacturerId() .

Regards,

Julie

virtueed