<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $item = $objectManager->create('Magento\Catalog\Model\Product'); $quoteId = $objectManager-> create('Magento\Checkout\Model\Session')->getQuoteId(); $cartData = $objectManager->create('Magento\Quote\Model\QuoteRepository')->get($quoteId)->getAllVisibleItems(); foreach($items as $item) { $item = $item->load($item->getProductId()); if($item->getData('custom_attribute')=='SM100'){ echo 'ID: '.$item->getProductId().'<br />'; echo 'Name: '.$item->getName().'<br />'; echo 'Sku: '.$item->getSku().'<br />'; echo 'Quantity: '.$item->getQty().'<br />'; echo 'Price: '.$item->getPrice().'<br />'; echo "<br />"; } }