Php 用于客户登录会话的Magento API
我在Google&StackOverflow上搜索了很多,但仍然没有从另一台服务器获得客户登录创建会话的代码或建议 我使用了此代码,但它不起作用:Php 用于客户登录会话的Magento API,php,magento,session,Php,Magento,Session,我在Google&StackOverflow上搜索了很多,但仍然没有从另一台服务器获得客户登录创建会话的代码或建议 我使用了此代码,但它不起作用: $session = Mage::getSingleton( 'customer/session' ); Mage::app()->getStore()->setWebsiteId(1); try { $session->login( $email, $password ); $customer = $sessio
$session = Mage::getSingleton( 'customer/session' );
Mage::app()->getStore()->setWebsiteId(1);
try {
$session->login( $email, $password );
$customer = $session->getCustomer();
return json_encode(array('status' => 'OK', 'userData' => $this->info($customer->getId())));
}
catch( Exception $e ) {
return json_encode(array('status' => 'error', 'message' => $e->getMessage()));
}
哪一位不工作?嗨,我使用上面的代码从另一台服务器为magento站点创建会话,但它不工作是的,但哪一位不工作?它得到会话单例吗?它是否从捕获返回错误?我们不能用“它不工作”来做太多的事情。它这样响应,但没有创建会话。它给了我以下结果&没有为客户在浏览器上创建会话