uStoreProvider services culture - XMPieLab/uStore-NG GitHub Wiki

Classes

Culture

Represents the culture logic in the system

Typedefs

GUID : string

globally unique identifier

CurrencyModel : Object

Provides information about a currency.

ProductPriceModel : Object

Provides information about a product's price and tax.

PriceModel : Object

Culture

Represents the culture logic in the system

Kind: global class

culture.setCurrentCurrency(currentCurrency)

Set state.currentCurrency with the requested currency model as CurrencyModel

Kind: instance method of Culture

Param Type Description
currentCurrency CurrencyModel the requested currency to set as the current currency

culture.setCurrentCultureByLanguage(languageCode)

Set state.currentCurrency according the the language code requested

Kind: instance method of Culture

Param Type Description
languageCode string the requested language code

culture.getConvertedPrices(priceModel) ⇒ PriceModel

Get the converted price according to the current currency in the state

Kind: instance method of Culture
Returns: PriceModel - - price, tax and priceIncludingTax that are converted by the current currency

Param Type Description
priceModel ProductPriceModel the price model to be converted

GUID : string

globally unique identifier

Kind: global typedef

CurrencyModel : Object

Provides information about a currency.

Kind: global typedef
Properties

Name Type Description
ID GUID The unique ID of the currency.
FriendlyID number The friendly ID of the currency.
Name string The name of the currency.
Symbol string The symbol of the currency.
Code string The currency code according to the ISO 4217 standard (e.g. "USD").
ConversionRate number The conversion rate from the store's primary currency to this currency. E.g. If the primary currency is USD, this currency is EUR and the conversion rate is 0.886285, then 1 USD = 0.886285 EUR.

ProductPriceModel : Object

Provides information about a product's price and tax.

Kind: global typedef
Properties

Name Type Description
Price number The price of the product excluding tax, in the store's primary currency.
Tax number The tax of the product, in the store's primary currency.

PriceModel : Object

Kind: global typedef
Properties

Name Type Description
price number Price
tax number Tax
priceIncludingTax number priceIncludingTax that are converted by the current currency
⚠️ **GitHub.com Fallback** ⚠️