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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -