Log in
Model

CustomerCartResolver

Magento\Quote\Model\Cart\CustomerCartResolver

What it does

This class retrieves or creates a shopping cart for a logged-in customer and ensures it has a masked ID for security.

Developers use this when they need to get a customer's active cart in APIs or services, especially in GraphQL or REST implementations where the cart needs a secure, non-sequential identifier.

It automatically creates a new cart if the customer doesn't have one and generates a masked quote ID for safe external references.

Public Methods

  • resolve()