Magento: load customer group by name -
how load customer group name in magento? have tried this:
$targetgroup = mage::getmodel('customer/group')->load($groupname, 'name');
but throws sql exception column customer_group.name not exist.
$targetgroup = mage::getmodel('customer/group'); $targetgroup->load($groupname, 'customer_group_code'); ref. customer_group table.
Comments
Post a Comment