我想通过电子邮件 ID 获取客户信息,所以我在控制器中创建了一个包含内容的方法:
public function showAction(){
$customer_email = "abc@mail.com";
$customer = Mage::getModel("customer/customer");
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$customer->loadByEmail($customer_email);
echo $customer->getId();
echo $customer->getFirstName();
echo $customer->getEmail();
}
但是当运行它返回空值时,我不知道为什么?请帮我