Guest User

Untitled

a guest
Dec 10th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. <?php
  2.  
  3. $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
  4. $cartObj = $objectManager->get(‘\Magento\Checkout\Model\Cart’);
  5. $totalItems = $cartObj->getQuote()->getItemsCount(); //Current cart Item counts
  6. $totalQuantity = $cartObj->getQuote()->getItemsQty(); //Current Cart Items qty’s
Add Comment
Please, Sign In to add comment