Log in
Model

GuestCartResolver

Magento\Quote\Model\GuestCart\GuestCartResolver

What it does

This class creates and manages empty shopping carts for guest (non-logged-in) customers in Magento 2.

Developers use it when they need to programmatically create a new guest cart, optionally with a predefined masked quote ID for cart identification.

The resolve method returns a Quote object that represents the newly created empty guest cart.

Public Methods

  • resolve()