Currency SFO

The Currency object differs from the CartCurrency object. The cart currency is a simple object that is mainly supplied as a list of possible currencies so a select box can be created which allows the customer to change the currency. The Currency object has additional methods that help with conversion rates, etc. The Currency object is used on Catalog pages, and the CartCurrency object is found within Checkout pages.

 

 

Properties

Field

Type

Comment/Sample

Methods

 

Method

Signature

Comments/Sample

add

Currency add(Currency val)

 

compareTo

integer compareTo(Currency val)

 

getConversionRate

BigDecimal getConversionRate(string fromCurrency, string toCurrency)

 

getInUOM

Currency getInUOM(string uom)

 

getUom

string getUom()

 

getValue

BigDecimal getValue()

 

getValueInUOM

BigDecimal getValueInUOM(string uom)

 

isNonZero

boolean isNonZero()

 

isZero

boolean isZero()

 

multiply

Currency multiply(integer val)

 

multiply

Currency multiply(BigDecimal val)

 

subtract

Currency subtract(Currency val)

 

See Also