You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by sanjeev <su...@sanjeevg.com> on 2012/04/08 18:01:47 UTC

BUG: Trunk release not work with India Rupee (INR)

So I spent another day trying to nail down the issue and I did :-) 

It seems like the trunk release has some issues with working with INR (I'm
not sure if that's the case with other currencies though). 

I created a custom XML to populate data in after installing the seed data
with default currency and product prices mentioned in INR. the same was
working fine as long as i was working with release 11.04, however when I
tested the latest trunk release - I could no longer add products to shopping
cart. Got the error messages mentioned in this discussion chain. 

I now have two separate instances on ofbiz running the trunk releases from
today; with the same XML data import (one with currency as INR & the other
with USD). All is working well with USD while with INR as the currency I'm
unable to add products to the shopping cart. 

Hope the dev team can take a look at this and resolve the bug. I'd be happy
to provide any data that can help you guys reproduce the issue. 

-----
Rgds
Sanjeev
--
View this message in context: http://ofbiz.135035.n4.nabble.com/Could-not-find-a-valid-price-for-the-product-with-ID-when-using-the-trunk-release-tp4534702p4541149.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: BUG: Trunk release not work with India Rupee (INR)

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks for report Chetan,

Please see updated https://issues.apache.org/jira/browse/OFBIZ-4796

Jacques

chetan.ofbiz wrote:
> Sanjeev Gupta wrote
>> Hi Jacques :  have created the Jira and attached the XML
> 
> Hi, I see that the Jira is still open. I also encountered the same issue
> with AUD currency and found the defect.
> 
> Line# 1157 of ShoppingCartItem.java  (ofbiz stable release 12.04.02)
> 
> priceContext.put("currencyUomId", cart.getCurrency());
> 
> should be outside the "if" condition for PriceServices to get the cart
> currencyUomId
> 
> Hope that helps.
> 
> Best regards,
> Chetan

Re: BUG: Trunk release not work with India Rupee (INR)

Posted by "chetan.ofbiz" <ch...@gmail.com>.
Sanjeev Gupta wrote
> Hi Jacques :  have created the Jira and attached the XML

Hi, I see that the Jira is still open. I also encountered the same issue
with AUD currency and found the defect. 

Line# 1157 of ShoppingCartItem.java  (ofbiz stable release 12.04.02)

priceContext.put("currencyUomId", cart.getCurrency()); 

should be outside the "if" condition for PriceServices to get the cart
currencyUomId

Hope that helps.

Best regards,
Chetan





--
View this message in context: http://ofbiz.135035.n4.nabble.com/Could-not-find-a-valid-price-for-the-product-with-ID-when-using-the-trunk-release-tp4534702p4644162.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: BUG: Trunk release not work with India Rupee (INR)

Posted by sanjeev <su...@sanjeevg.com>.
Hi Jacques :  have created the Jira and attached the XML

-----
Rgds
Sanjeev
--
View this message in context: http://ofbiz.135035.n4.nabble.com/Could-not-find-a-valid-price-for-the-product-with-ID-when-using-the-trunk-release-tp4534702p4542380.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: BUG: Trunk release not work with India Rupee (INR)

Posted by Jacques Le Roux <ja...@les7arts.com>.
This sounds like a bug indeed. To check that you could create a Jira and attach there your data, we could then try to see locally...

Jacques

From: "sanjeev" <su...@sanjeevg.com>
>I was earlier using en_IN, along with INR however that wasn't working. So
> while working various permutations I changed it back to en_US. Moreover it
> would give me US English as my locale so that's not quite different from
> en_IN.
>
> The reason I think this is a bug cause, while working with 11.04, all I had
> to do was change the defaultCurrencyUomId from USD to INR and I could start
> using INR on the store. But with the current trunk, Ofbiz is just not
> working with INR - I'm unable to add products to the shopping cart. So I
> think that the internationalization support has somehow broken down between
> 11.04 and the current trunk; and should be fixed.
>
>
> -----
> Rgds
> Sanjeev
> --
> View this message in context: 
> http://ofbiz.135035.n4.nabble.com/Could-not-find-a-valid-price-for-the-product-with-ID-when-using-the-trunk-release-tp4534702p4541336.html
> Sent from the OFBiz - User mailing list archive at Nabble.com. 

Re: BUG: Trunk release not work with India Rupee (INR)

Posted by sanjeev <su...@sanjeevg.com>.
I was earlier using en_IN, along with INR however that wasn't working. So
while working various permutations I changed it back to en_US. Moreover it
would give me US English as my locale so that's not quite different from
en_IN. 

The reason I think this is a bug cause, while working with 11.04, all I had
to do was change the defaultCurrencyUomId from USD to INR and I could start
using INR on the store. But with the current trunk, Ofbiz is just not
working with INR - I'm unable to add products to the shopping cart. So I
think that the internationalization support has somehow broken down between
11.04 and the current trunk; and should be fixed. 


-----
Rgds
Sanjeev
--
View this message in context: http://ofbiz.135035.n4.nabble.com/Could-not-find-a-valid-price-for-the-product-with-ID-when-using-the-trunk-release-tp4534702p4541336.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: BUG: Trunk release not work with India Rupee (INR)

Posted by Jacques Le Roux <ja...@les7arts.com>.
I'm not sure it's an issue but why using defaultLocaleString="en_US" ?

Jacques

From: "sanjeev" <su...@sanjeevg.com>
> Hi Adrian
>
> I'm setting the default currency using the XML below:
> <*ProductStore* productStoreId=.....................
>        defaultLocaleString="en_US" *defaultCurrencyUomId="INR"*
> ................./>
>
> I don't have the UomConversionDated set up but given that I'm only using
> INR, is there a relevance of having INR to USD conversion setup ?
>
>
>
> -----
> Rgds
> Sanjeev
> --
> View this message in context: 
> http://ofbiz.135035.n4.nabble.com/Could-not-find-a-valid-price-for-the-product-with-ID-when-using-the-trunk-release-tp4534702p4541203.html
> Sent from the OFBiz - User mailing list archive at Nabble.com. 

Re: BUG: Trunk release not work with India Rupee (INR)

Posted by sanjeev <su...@sanjeevg.com>.
Hi Adrian

I'm setting the default currency using the XML below: 
<*ProductStore* productStoreId=.....................
        defaultLocaleString="en_US" *defaultCurrencyUomId="INR"*
................./>

I don't have the UomConversionDated set up but given that I'm only using
INR, is there a relevance of having INR to USD conversion setup ?  



-----
Rgds
Sanjeev
--
View this message in context: http://ofbiz.135035.n4.nabble.com/Could-not-find-a-valid-price-for-the-product-with-ID-when-using-the-trunk-release-tp4534702p4541203.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: BUG: Trunk release not work with India Rupee (INR)

Posted by Adrian Crum <ad...@sandglass-software.com>.
Make sure you have valid currency UOM conversion values set up in the 
database (UomConversionDated entity).

-Adrian

On 4/8/2012 5:01 PM, sanjeev wrote:
> So I spent another day trying to nail down the issue and I did :-)
>
> It seems like the trunk release has some issues with working with INR (I'm
> not sure if that's the case with other currencies though).
>
> I created a custom XML to populate data in after installing the seed data
> with default currency and product prices mentioned in INR. the same was
> working fine as long as i was working with release 11.04, however when I
> tested the latest trunk release - I could no longer add products to shopping
> cart. Got the error messages mentioned in this discussion chain.
>
> I now have two separate instances on ofbiz running the trunk releases from
> today; with the same XML data import (one with currency as INR&  the other
> with USD). All is working well with USD while with INR as the currency I'm
> unable to add products to the shopping cart.
>
> Hope the dev team can take a look at this and resolve the bug. I'd be happy
> to provide any data that can help you guys reproduce the issue.
>
> -----
> Rgds
> Sanjeev
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Could-not-find-a-valid-price-for-the-product-with-ID-when-using-the-trunk-release-tp4534702p4541149.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.