0

I'm using core/session for storing values, I'm use the following code to store the value:

Mage::getSingleton('core/session')->setMyWishlist( $newmywishlist );

On category and product pages but also on cms pages I can read the value by using:

$mywishlist = Mage::getSingleton('core/session')->getMyWishlist();

But on pages from my custom modules, not a cms page, I can't get the value.

When I debug core/session I also noticed that the session_id is different on the custom module page.

1 Answer 1

1

Is your custom module working in the admin or frontend area? There are different session scopes at hand in this case that might cause your problem.

Have a look at Alan Storm's post on cross area sessions: http://alanstorm.com/magento_cross_area_sessions

3
  • Both sessions are frontend sessions. I took al look at the cross area session. You never know when you don't try ;) . I have installed the module and trying to access the sessions with the code from the readme but I get an error PHP Fatal error: Call to a member function getSessionData() on a non-object in Aug 25, 2015 at 7:44
  • It's working :) My FTP client didn't upload the complete directory with all files. When I use $frontend = Mage::getModel('pulsestorm_crossareasession/manager')->getSessionData('frontend'); I also see the MyWishlist value on custom module pages. Note that both pages are on the frontend. Thanx :) Aug 25, 2015 at 8:01
  • Great, I'm glad it's working now.
    – mkerstner
    Aug 25, 2015 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.