The Magento\Checkout\Model\Cart class was marked as deprecated a long time ago (since 2.1 ver.). What should I use instead of it to work with a customers cart?

I know that I can work directly with a Quote model, but maybe exists some interface which replaced the Cart model functional?

PS: I read the answer given here about "Why it is deprecated?", but I need the information about "What should I use instead?".


As far as I know, there is no replacement as of now (Magento 2.2), the class was simply deprecated as an indication that the logic it handles will be refactored in the future. Just continue to use it for now until a proper replacement is implemented.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.