I am new to magento. How to load customer collection to retrieve gender value by passing login email id?
Thanks.
Praksah
Afaik, Magento does not have explicit email id's for customers, only email addresses.
To retrieve the gender for a given email address you could use:
$oCustomer = Mage::getModel('customer/customer')
->setWebsiteId(1)
->loadByEmail('[email protected]');
var_dump($oCustomer->getGender());
The setWebsiteId(1)
part is only neccessary when running with website scope.