Log in
Model

Session

Magento\Checkout\Model\Session

What it does

The Checkout Session class manages all session data during the checkout process in Magento 2.

Developers use this class to access and manipulate the shopping cart quote, track checkout steps, manage customer data during checkout, and retrieve the last placed order.

It handles quote lifecycle operations like loading, merging customer quotes, clearing quotes, and restoring quotes after failed orders.

Public Methods

  • _resetState()
  • setCustomerData()
  • hasQuote()
  • setLoadInactive()
  • getQuote()
  • setQuoteId()
  • getQuoteId()
  • loadCustomerQuote()
  • setStepData()
  • getStepData()
  • clearQuote()
  • clearStorage()
  • clearHelperData()
  • resetCheckout()
  • replaceQuote()
  • getLastRealOrder()
  • restoreQuote()