cancel
Showing results for 
Search instead for 
Did you mean: 

Session in store/website level

SOLVED
Occasional Contributor

Session in store/website level

Hi All,

We have multi website with same domain cookie.
And Customer registration is global level in project(by default website level).


By using above customisation we are getting issue in sessions. That means if I assign any session value into one website and if I open another website in same browser I am able to get previous website session value into this website.

 

How we can avoid this ? any suggestions.

 

Note: we need domain cookie as same for all websites and customer should be global level. 

 

Thanks

Tags (2)
1 REPLY
Highlighted
Occasional Contributor

Re: Session in store/website level

Hello Guys ,

I have found fix for that session issue. 


Class: Mage_Core_Model_Session_Abstract

old:

public function init($namespace, $sessionName=null)
{
parent::init($namespace, $sessionName);
$this->addHost(true);
return $this;
}

New:
public function init($namespace, $sessionName=null)
{
$sessionName = $sessionName."-".Mage::app()->getStore()->getStoreId();
parent::init($namespace, $sessionName);
$this->addHost(true);
return $this;
}

 

Thanks