Cart
Magento\Checkout\Helper\Cart
What it does
This helper class provides utility methods for working with the shopping cart in Magento 2.
Developers use it to generate URLs for cart operations (add, remove, delete items), retrieve cart information (item counts, quantities), and check cart configuration settings like virtual products or redirect behavior.
It serves as a convenient facade for accessing cart and quote data throughout the application.
Public Methods
- getCart()
- getAddUrl()
- getRemoveUrl()
- getDeletePostJson()
- getCartUrl()
- getQuote()
- getItemsCount()
- getItemsQty()
- getSummaryCount()
- getIsVirtualQuote()
- getShouldRedirectToCart()