hi,
I am getting description field value null for all the products "PRODUCTS" table. Here is the sample code. Please let me know ASAP whats wrong with this code?
ProductsIf kkProducts = null;
CategoryIf[] categories = eng.getCategoryTree(DEFAULT_LANGUAGE, true);
for(int catNum = 0 ; catNum < categories.length ; catNum++)
{
if(categories[catNum].getName().equalsIgnoreCase("services"))
{
CategoryIf[] subCategories = categories[catNum].getChildren();
for(int subCatNum=0;subCatNum<subCategories.length;subCatNum++)
{
if(subCategories[subCatNum].getName().equalsIgnoreCase("new"))
{
CategoryIf[] subSubCategories = subCategories[subCatNum].getChildren();
//The following loop will parse through all the Master products under new
for(int subSubCatNum = 0; subSubCatNum<subSubCategories.length; subSubCatNum++)
{
System.out.println(subSubCategories[subSubCatNum].getName());
System.out.println(subSubCategories[subSubCatNum].getNumberOfProducts());
kkProducts = eng.getProductsPerCategory(sessionId, dataDesc, subSubCategories[subSubCatNum].getId(), true, DEFAULT_LANGUAGE);
}
}
}
}
}
ProductIf[] products = kkProducts.getProductArray();
for(ProductIf prd : products){
System.out.println("Description = " + prd.getDescription());
}
It gives "Description = null" for all products, why? Anybody, let me know quick. Thanks.
I am getting description field value null for all the products "PRODUCTS" table. Here is the sample code. Please let me know ASAP whats wrong with this code?
ProductsIf kkProducts = null;
CategoryIf[] categories = eng.getCategoryTree(DEFAULT_LANGUAGE, true);
for(int catNum = 0 ; catNum < categories.length ; catNum++)
{
if(categories[catNum].getName().equalsIgnoreCase("services"))
{
CategoryIf[] subCategories = categories[catNum].getChildren();
for(int subCatNum=0;subCatNum<subCategories.length;subCatNum++)
{
if(subCategories[subCatNum].getName().equalsIgnoreCase("new"))
{
CategoryIf[] subSubCategories = subCategories[subCatNum].getChildren();
//The following loop will parse through all the Master products under new
for(int subSubCatNum = 0; subSubCatNum<subSubCategories.length; subSubCatNum++)
{
System.out.println(subSubCategories[subSubCatNum].getName());
System.out.println(subSubCategories[subSubCatNum].getNumberOfProducts());
kkProducts = eng.getProductsPerCategory(sessionId, dataDesc, subSubCategories[subSubCatNum].getId(), true, DEFAULT_LANGUAGE);
}
}
}
}
}
ProductIf[] products = kkProducts.getProductArray();
for(ProductIf prd : products){
System.out.println("Description = " + prd.getDescription());
}
It gives "Description = null" for all products, why? Anybody, let me know quick. Thanks.