Skip to main content
added 192 characters in body
Source Link
Jeeva Chezhiyan
  • 1.5k
  • 3
  • 20
  • 39

Try this,

    $customerGroupsCollection = $objectManager->create('\Magento\Customer\Model\ResourceModel\Group\Collection');
    
    $customerGroupsCollection->addFieldToFilter('group_link',['eq'=>'thisisfreshgroup']);
print_r(
    $collection = $customerGroupsCollection->getData()); 
 exit;   
    foreach ($collection as $value) {
       $customer_group_id[] = $value['customer_group_id'];
     }
    print_r($customer_group_id);

Try this,

$customerGroupsCollection = $objectManager->create('\Magento\Customer\Model\ResourceModel\Group\Collection');

$customerGroupsCollection->addFieldToFilter('group_link',['eq'=>'thisisfreshgroup']);
print_r($customerGroupsCollection->getData()); exit;

Try this,

    $customerGroupsCollection = $objectManager->create('\Magento\Customer\Model\ResourceModel\Group\Collection');
    
    $customerGroupsCollection->addFieldToFilter('group_link',['eq'=>'thisisfreshgroup']);

    $collection = $customerGroupsCollection->getData(); 
    
    foreach ($collection as $value) {
       $customer_group_id[] = $value['customer_group_id'];
     }
    print_r($customer_group_id);

Try this,

$customerGroupsCollection = $objectManager->create('\Magento\Customer\Model\ResourceModel\Group\Collection');

$customerGroupsCollection->addAttributeToSelect('*')->addFieldToFilter('group_link',['eq'=>'thisisfreshgroup']);
print_r($customerGroupsCollection->getData()); exit;

Try this,

$customerGroupsCollection = $objectManager->create('\Magento\Customer\Model\ResourceModel\Group\Collection');

$customerGroupsCollection->addAttributeToSelect('*')->addFieldToFilter('group_link',['eq'=>'thisisfreshgroup']);
print_r($customerGroupsCollection->getData()); exit;

Try this,

$customerGroupsCollection = $objectManager->create('\Magento\Customer\Model\ResourceModel\Group\Collection');

$customerGroupsCollection->addFieldToFilter('group_link',['eq'=>'thisisfreshgroup']);
print_r($customerGroupsCollection->getData()); exit;
Source Link
Jeeva Chezhiyan
  • 1.5k
  • 3
  • 20
  • 39

Try this,

$customerGroupsCollection = $objectManager->create('\Magento\Customer\Model\ResourceModel\Group\Collection');

$customerGroupsCollection->addAttributeToSelect('*')->addFieldToFilter('group_link',['eq'=>'thisisfreshgroup']);
print_r($customerGroupsCollection->getData()); exit;