سؤال

customer_list.phtml

$om = \Magento\Framework\App\ObjectManager::getInstance();
$customerSession = $om->create('Magento\Customer\Model\ResourceModel\Online\Grid\Collection');
$customerData = $customerSession->getData();
echo "<pre/>";
print_r($customerData);
exit;

Result

enter image description here

Expected result

I want to show registered online customer only.

هل كانت مفيدة؟

المحلول

In your collection, You can add filter like email id Or Customer Id is not empty. So it will give you only registered customer.

When Customer log out , Collection will remove that customer.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top