I can't get the current quote in the Product view page. I have 3 items in my cart.
I have used both files.
use Magento\Checkout\Model\Session; use Magento\Checkout\Model\Cart; $quote = $this->_checkoutSession->getQuote(); echo $quote->getId();
But, I can't get it. After that adding new product in view page. I can got it.
How to do that.