Magento external login will not create session cookie

后端 未结 1 1160
暖寄归人
暖寄归人 2021-01-28 11:07

I am trying to replace a rather clumpsy ajax-login of Magento from an external site. The site uses Magento as a shop. Both the site and the magento-shop has their own logins, th

1条回答
  •  遇见更好的自我
    2021-01-28 11:56

    Magento only initializes the session with your code if the $_SESSION variable isn't set, i.e. session_start() wasn't called before the core session is instantiated.
    Reference Mage_Core_Model_Session_Abstract_Varien::start() for details.

    As a solution, the easiest way would be to start the Magento session during a request before the other session of your site is started.
    Otherwise you will have to duplicate the code that sets the session name to frontend and initializes the Magento session cookie.

    0 讨论(0)
提交回复
热议问题