Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php magento实体值不能为空_Php_Magento_Email - Fatal编程技术网

Php magento实体值不能为空

Php magento实体值不能为空,php,magento,email,Php,Magento,Email,当我写下面的代码时 $email=$recipient['email']; $customer = Mage::getModel('customer/customer') ->setWebsiteId(Mage::app()->getStore()->getWebsiteId()) ->loadByEmail($email); 我得到的错误实体值可以为null为什么我应该在那里写什么 我应该写些什么来让它工作,我已经将ShareCustomer设置为global,但仍然

当我写下面的代码时

$email=$recipient['email'];
$customer = Mage::getModel('customer/customer')
->setWebsiteId(Mage::app()->getStore()->getWebsiteId())
->loadByEmail($email);
我得到的错误实体值可以为null为什么我应该在那里写什么

我应该写些什么来让它工作,我已经将ShareCustomer设置为global,但仍然显示相同的错误消息

$email=$recipient['email'];
$customer = Mage::getModel('customer/customer')
->setWebsiteId(Mage::app()->getStore()->getWebsiteId())
->loadByEmail($email);

你必须使它全球化,然后它才能工作

实际上你想做什么?。