Vikas,

I will let you decide. I don't know what the motivation was for making the change.

Freemarker knows the user's locale, so numbers should be formatted correctly. If you want a number formatted as currency, then you use the ?string.currency built-in. The result should be currency formatted according to the user's locale.

I don't know if the ofbizAmount transform does something in addition to that.

Try it out and see.

-Adrian

Vikas Mayur wrote:
Hi Adrian,

Thanks for the pointer. Do you think we should also change similar pattern followed in editorderitems.ftl as there are examples for both?

Vikas

On May 27, 2009, at 9:57 PM, Adrian Crum wrote:

A simpler way to do this would be to use:

<input size="6" type="text" name="price_${cartLineIndex}" value="${price?string.currency}"/>

-Adrian

[email protected] wrote:
Author: mor
Date: Wed May 27 16:06:48 2009
New Revision: 779221
URL: http://svn.apache.org/viewvc?rev=779221&view=rev
Log:
Localized Unit Price input field in showcartitems.ftl. Patch from Mridul Pathak, part of OFBIZ-2530 (https://issues.apache.org/jira/browse/OFBIZ-2530)
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl?rev=779221&r1=779220&r2=779221&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl Wed May 27 16:06:48 2009
@@ -250,7 +250,7 @@
                    <#else>
                        <#assign price = cartLine.getBasePrice()>
                    </#if>
- <input size="6" type="text" name="price_${cartLineIndex}" value="${price}"/> + <input size="8" type="text" name="price_${cartLineIndex}" value="<@ofbizAmount amount=price/>"/>
                </#if>
              </div>
            </td>

Reply via email to