KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: Kim on September 21, 2011, 08:13:20 am

Title: How to get product options
Post by: Kim on September 21, 2011, 08:13:20 am
Hi friends,

How can i get the product options, now I'm using:

ProductIf product = (ProductIf)request.getAttribute("product");
OptionIf []opts = product.getOpts();
for(OptionIf opt : opts){
System.out.println(opt.getValue());
System.out.println(opt.getName());
}

It seems not very good, because I just get the product option name & value list. can't get option value by name and can't get formattedValueIncTax & formattedValueExTax.

I check konakart demo code, find out that prodOptionContainer also can get the product option, how can i use it?

Thanks.
Title: Re: How to get product options
Post by: vijapandey on October 11, 2011, 03:26:17 am
hi

you can use product options
            String prodId = request.getParameter("prodId");
             prodIdInt = new Integer(prodId).intValue();

            ProductIf selectedProd = kkAppEng.getProductMgr().getSelectedProduct();

            kkAppEng.getProductMgr().fetchSelectedProduct(prodIdInt);


Enjoy

Vijay Pandey