On my site i have several pages which set a core session variable as so:
Mage::getSingleton('core/session')->setSellYourArtCheck(1);
If i want to access this anywhere i can successfully do:
Mage::getSingleton('core/session')->getSellYourArtCheck();
But i now need to access this session variable in my custom module but it is showing as empty/null when i try and access it as above.
My Observer.php code for my module:
<?php
class Custom_RegisterArtist_Model_Observer
{
public function registerArtist(Varien_Event_Observer $observer)
{
// other code....
$is_artist = Mage::getSingleton('core/session')->getSellYourArtCheck();
if($is_artist == 1)
{
$customer->setData('group_id', 4);
}
// other code....
}
}
My $is_artist
variable is always empty/null within my module but is fine on any of my pages