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 multiple currency codes (global, base, store, quote) and their exchange rates when working with multi-currency checkout scenarios.

It provides getters and setters for all currency-related data needed to calculate prices in different currencies throughout the quote process.

Public Methods

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