There is no doubt the ISO code needs to be set up prior to the set element. That is why I suggested using existing implementations as a guide.

-Adrian

Abdullah Shaikh wrote:
Adrian, you missed the ${} around isoCode, but even that doesn't work, it
displays the $ symbol, probably the isoCode is not getting updated.


On Fri, Sep 25, 2009 at 8:27 PM, Adrian Crum <[email protected]> wrote:

Oops, that example should be:

<set field="shippingDesc" value="${carrierShipmentMethod.partyId}
${carrierShipmentMethod.description} - ${shippingEst?currency(isoCode)}"/>

-Adrian


Adrian Crum wrote:

Simon,

You will need to use the ?currency(String IsoCode) string expansion
modifier in the set element:

<set field="shippingDesc" value="${carrierShipmentMethod.partyId}
${carrierShipmentMethod.description} - ${shippingEst?currency(String
IsoCode)}"/>

Search the existing XML files for "?currency(" and you will see how it is
used.

Once you have the problem corrected, supply a patch to Jira and we will
see to it that it is included in the project.

-Adrian


Simon Hutchinson wrote:

Hi,

In check-out process for eCommerce the descriptions of the shipment
options include a price, however this always displayed as $ despite the uom
for the shipment estimate being set to GBP.

I have looked at getShipOptions in CustomerEvents.xml and it appears that
the currency symbol is hard-coded at the moment - notice the extra $ before
$${shippingEst}

<set field="shippingDesc" value="${carrierShipmentMethod.partyId}
${carrierShipmentMethod.description} - $${shippingEst}"/>

I am happy to fix this but was hoping that someone could please point me
in the right direction for getting the correct currency symbol.

I have seen the @ofbizCurrency tag used in freemarker templats however I
would need something equivalent from Minilang to solve here as the result of
getShipOptions is simply returned as json to a javascript function in
checkoutProcess.js

Note: The getShipOptions simple method uses this
<call-object-method obj-field="shoppingCart" method-name="getCurrency"
ret-field="currency"/>

which returns the ISO value, in my case GBP - Can I call something to get
the £ symbol for this ISO code perhaps?

Regards

Simon



Reply via email to