如何在wordpress中访问magento会话?
我读过很多类似的问题 但是没有找到答案 我必须在wordpress博客中显示客户名称和购物车项目 我已经安装了Mage Enabler。但它总是显示无效的Url。 什么是本地pc的有效url 所以我也做过类似的事情如何在wordpress中访问magento会话?,wordpress,session,magento,integration,Wordpress,Session,Magento,Integration,我读过很多类似的问题 但是没有找到答案 我必须在wordpress博客中显示客户名称和购物车项目 我已经安装了Mage Enabler。但它总是显示无效的Url。 什么是本地pc的有效url 所以我也做过类似的事情 require_once ("../app/Mage.php"); umask(0); Mage::app(); Mage::getSingleton("core/session", array('name' => 'frontend')); $session
require_once ("../app/Mage.php");
umask(0);
Mage::app();
Mage::getSingleton("core/session", array('name' => 'frontend'));
$session = Mage::getSingleton("customer/session");
if($session->isLoggedIn())
{echo "YES";}
else {echo "NO";}
我总是得到“不”(
有人能帮助我如何在wordpress中访问magento会话,而不是:
$session = Mage::getSingleton("customer/session");
尝试:
祝你好运
$session=Mage::getSingleton('customer/session', array('name'=>'frontend') );