Log in
Model

Currency

Magento\Quote\Model\Cart\Currency

What it does

This class represents currency information for a shopping cart quote in Magento 2.

Developers use it to access and manage different currency codes (global, base, store, quote) and exchange rates between these currencies when processing quotes.

It's particularly useful when building multi-currency features or when retrieving currency data through the Quote API.

Public Methods

  • getGlobalCurrencyCode()
  • getBaseCurrencyCode()
  • getStoreCurrencyCode()
  • getQuoteCurrencyCode()
  • getStoreToBaseRate()
  • getStoreToQuoteRate()
  • getBaseToGlobalRate()
  • getBaseToQuoteRate()
  • setGlobalCurrencyCode()
  • setBaseCurrencyCode()
  • setStoreCurrencyCode()
  • setQuoteCurrencyCode()
  • setStoreToBaseRate()
  • setStoreToQuoteRate()
  • setBaseToGlobalRate()
  • setBaseToQuoteRate()
  • getExtensionAttributes()
  • setExtensionAttributes()