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

Get BestSellers Per Category

Started by Simon, September 14, 2011, 11:11:38 am

Previous topic - Next topic

Simon

Hi guys,

I wrote below code,  try to get best sellers from per category:

int catId = ParamUtil.getInteger(renderRequest, "kkCategoryId");
System.out.println("catID : " + catId);
ProductMgr pMgr = (ProductMgr) renderRequest.getAttribute("pMgr");
ProductIf[] productIfs = pMgr.getBestSellersPerCategory(catId, true);

but i can't get anything from getBestSellersPerCategory(catId, boolean), before i call this function, I already get catId value,
is there anything wrong in these code i wrote?

Thanks.

julie

Are you sure you have any products that have been sold within the category? Look at the products_ordered attribute of the product table.

Simon

sure, getBestSellers() works fine, can get all of the products sold.

Simon

sorry guys, it works now, my fault. :P