cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the current customer session?

How to get the current customer session?

Hello,

 

How do I get the current customer session? I have used every piece of code I can find online and all I can get is a visitor sessio even though I am logged in.

 

I have tried the following:

 

Mage::getSingleton("core/session", array("name" => "frontend"));
$custSession = Mage::getSingleton("customer/session");

$keepTheJunkFlowing = Mage::getModel('customer/session');

 

Mage::getSingleton('customer/session')->isLoggedIn()

 

This only occurs on the product list page....

 

Any ideas/help would greatly be appreciated.

1 REPLY 1

Re: How to get the current customer session?

I figured this out. I had to set the cookie domain in the back end. What a PIA this one was.....