i getting error while i am try to use get Entity Id (getEntityId()) Method in customer/customer model object.
Please check my bellow's code.
I want to use bellow's code. But its showing error.
$customer = Mage::getModel("customer/customer");
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$customer->loadByEmail('[email protected]'); //load customer by email id
While bellow's code is working fine. with getEntityId()
$id=3;
$customer = Mage::getModel('customer/customer')->load($id);
So Please give solution for loadByEmail() method.
The store website code is wrong,
it should be Mage::app()->getStore()->getWebsiteId()
Here modified code is
$customer = Mage::getModel("customer/customer");
$customer->setWebsiteId(Mage::app()->getStore()->getWebsiteId());
$customer->loadByEmail('[email protected]')
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