I would like to get category IDs and name of products in shopping cart.
$product = $this->_session->getQuote()->getAllVisibleItems()->getProduct();
$category = $this->_category->getCategoryIds($product);
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community