make sure that you set the price for this product

I didn't found any error in that code ,are you getting any error or it is
not getting diaplayed

can provide some more information



On 5/10/07, Hans Bakker <[EMAIL PROTECTED]> wrote:

I tried to understand your code.....however writing new is perhaps
easier.....

        List productPrices = delegator.findByAnd(
                "ProductPrice", UtilMisc.toMap("productPriceTypeId",
                        "DEFAULT_PRICE"));

in productPrices there will be the productId

If you want more info from the product you can use the ProductAndPriceView
instead...

please also note that prices have a valid date....

regards,
Hans

On Thursday 10 May 2007 12:44, subhasis wrote:
> I am just trying to find the defaultPrice of every product
> I have written this code
>
>
> delegator = request.getAttribute("delegator");
> List products = delegator.findAll("Product");
> context.put("products",products);
>
>
> List productlist = FastList.newInstance();
>  Iterator catalogsItr = products.iterator();
> while (catalogsItr.hasNext())
> {
> GenericValue catalog = (GenericValue) catalogsItr.next();
>   product = delegator.findByPrimaryKey("Product",
> UtilMisc.toMap("productId",catalog.getString("productId")));
>   priceContext = UtilMisc.toMap("product", product);
>   priceMap = dispatcher.runSync("calculateProductPrice", priceContext);
> }
>
> But it is not working ,Please help ASAP
--

http://Antwebsystems.com: Quality OFBiz support with competitive rates.

Reply via email to