How to load customer group by name in magento? I have tried this:
$targetGroup = Mage::getModel('customer/group')->load($groupName, 'name');
but it throws a sql exception that column customer_group.name does not exist.
$targetGroup = Mage::getModel('customer/group');
$targetGroup->load($groupName, 'customer_group_code');
Ref. customer_group
table.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With