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

How to set a border for android Imageview in Longpress? -

java - Cast from Object to List<String>: CastClassException -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -