5 added 16 characters in body
source | link

I have made a custom module which uses the customer session, but its strange, on live site its not returning customer data.

I have tried following methods:

$sessCustomer = Mage::getSingleton('customer/session', array('name' => 'frontend'));
echo '<pre>';print_r($sessCustomer->getCustomer()->getData()); echo '</pre>';exit;

It returns:

Array
(
    [website_id] => 1
)

If I print the customer session:

Mage::getSingleton('customer/session')->getData();

This returns:

array(
    [_session_validator_data] => Array
        (
            [remote_addr] => <MY IP>
            [http_via] => 
            [http_x_forwarded_for] => <MY IP>
            [http_user_agent] => Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:16.0) Gecko/20100101 Firefox/16.0
        )

    [session_hosts] => Array
            (
                [bestevalue.info] => 1
            )
    [messages] => Mage_Core_Model_Message_Collection Object
            (
                [_messages:protected] => Array
                    (
                    )

                [_lastAddedMessage:protected] => 
            )
    [id] => 
)

I am logged in, can see the customer dashboard with customer info on it but not able to use that session in my custom module.

Please guide me how to fix this.

Update:

I have checked in /app/etc/local.xml that session type is file

<session_save><![CDATA[files]]></session_save>

So is there different method of extracting session info with PHP? What am I doing wrong?

Update 2:

i have used router as well to make pretty url   

public function match(Zend_Controller_Request_Http $request) 

on start of this action i placed   

Mage::getSingleton('core/session', array('name' => 'frontend')); but

but still not working with router without one it is working for example directly accessing the action :   

site.com/module/controller/action 

it works but not with router. any thoughts? thanks,

I have made a custom module which uses the customer session, but its strange, on live site its not returning customer data.

I have tried following methods:

$sessCustomer = Mage::getSingleton('customer/session', array('name' => 'frontend'));
echo '<pre>';print_r($sessCustomer->getCustomer()->getData()); echo '</pre>';exit;

It returns:

Array
(
    [website_id] => 1
)

If I print the customer session:

Mage::getSingleton('customer/session')->getData();

This returns:

array(
    [_session_validator_data] => Array
        (
            [remote_addr] => <MY IP>
            [http_via] => 
            [http_x_forwarded_for] => <MY IP>
            [http_user_agent] => Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:16.0) Gecko/20100101 Firefox/16.0
        )

    [session_hosts] => Array
            (
                [bestevalue.info] => 1
            )
    [messages] => Mage_Core_Model_Message_Collection Object
            (
                [_messages:protected] => Array
                    (
                    )

                [_lastAddedMessage:protected] => 
            )
    [id] => 
)

I am logged in, can see the customer dashboard with customer info on it but not able to use that session in my custom module.

Please guide me how to fix this.

Update:

I have checked in /app/etc/local.xml that session type is file

<session_save><![CDATA[files]]></session_save>

So is there different method of extracting session info with PHP? What am I doing wrong?

Update 2:

i have used router as well to make pretty url  public function match(Zend_Controller_Request_Http $request) on start of this action i placed  Mage::getSingleton('core/session', array('name' => 'frontend')); but still not working with router without one it is working for example directly accessing the action :  site.com/module/controller/action it works but not with router. any thoughts? thanks,

I have made a custom module which uses the customer session, but its strange, on live site its not returning customer data.

I have tried following methods:

$sessCustomer = Mage::getSingleton('customer/session', array('name' => 'frontend'));
echo '<pre>';print_r($sessCustomer->getCustomer()->getData()); echo '</pre>';exit;

It returns:

Array
(
    [website_id] => 1
)

If I print the customer session:

Mage::getSingleton('customer/session')->getData();

This returns:

array(
    [_session_validator_data] => Array
        (
            [remote_addr] => <MY IP>
            [http_via] => 
            [http_x_forwarded_for] => <MY IP>
            [http_user_agent] => Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:16.0) Gecko/20100101 Firefox/16.0
        )

    [session_hosts] => Array
            (
                [bestevalue.info] => 1
            )
    [messages] => Mage_Core_Model_Message_Collection Object
            (
                [_messages:protected] => Array
                    (
                    )

                [_lastAddedMessage:protected] => 
            )
    [id] => 
)

I am logged in, can see the customer dashboard with customer info on it but not able to use that session in my custom module.

Please guide me how to fix this.

Update:

I have checked in /app/etc/local.xml that session type is file

<session_save><![CDATA[files]]></session_save>

So is there different method of extracting session info with PHP? What am I doing wrong?

Update 2:

i have used router as well to make pretty url  

public function match(Zend_Controller_Request_Http $request) 

on start of this action i placed  

Mage::getSingleton('core/session', array('name' => 'frontend'));

but still not working with router without one it is working for example directly accessing the action : 

site.com/module/controller/action 

it works but not with router. any thoughts? thanks,

4 using router explained
source | link

I have made a custom module which uses the customer session, but its strange, on live site its not returning customer data.

I have tried following methods:

$sessCustomer = Mage::getSingleton('customer/session', array('name' => 'frontend'));
echo '<pre>';print_r($sessCustomer->getCustomer()->getData()); echo '</pre>';exit;

It returns:

Array
(
    [website_id] => 1
)

If I print the customer session:

Mage::getSingleton('customer/session')->getData();

This returns:

array(
    [_session_validator_data] => Array
        (
            [remote_addr] => <MY IP>
            [http_via] => 
            [http_x_forwarded_for] => <MY IP>
            [http_user_agent] => Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:16.0) Gecko/20100101 Firefox/16.0
        )

    [session_hosts] => Array
            (
                [bestevalue.info] => 1
            )
    [messages] => Mage_Core_Model_Message_Collection Object
            (
                [_messages:protected] => Array
                    (
                    )

                [_lastAddedMessage:protected] => 
            )
    [id] => 
)

I am logged in, can see the customer dashboard with customer info on it but not able to use that session in my custom module.

Please guide me how to fix this.

Update:

I have checked in /app/etc/local.xml that session type is file

<session_save><![CDATA[files]]></session_save>

So is there different method of extracting session info with PHP? What am I doing wrong?

Update 2:

i have used router as well to make pretty url public function match(Zend_Controller_Request_Http $request) on start of this action i placed Mage::getSingleton('core/session', array('name' => 'frontend')); but still not working with router without one it is working for example directly accessing the action : site.com/module/controller/action it works but not with router. any thoughts? thanks,

I have made a custom module which uses the customer session, but its strange, on live site its not returning customer data.

I have tried following methods:

$sessCustomer = Mage::getSingleton('customer/session', array('name' => 'frontend'));
echo '<pre>';print_r($sessCustomer->getCustomer()->getData()); echo '</pre>';exit;

It returns:

Array
(
    [website_id] => 1
)

If I print the customer session:

Mage::getSingleton('customer/session')->getData();

This returns:

array(
    [_session_validator_data] => Array
        (
            [remote_addr] => <MY IP>
            [http_via] => 
            [http_x_forwarded_for] => <MY IP>
            [http_user_agent] => Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:16.0) Gecko/20100101 Firefox/16.0
        )

    [session_hosts] => Array
            (
                [bestevalue.info] => 1
            )
    [messages] => Mage_Core_Model_Message_Collection Object
            (
                [_messages:protected] => Array
                    (
                    )

                [_lastAddedMessage:protected] => 
            )
    [id] => 
)

I am logged in, can see the customer dashboard with customer info on it but not able to use that session in my custom module.

Please guide me how to fix this.

Update:

I have checked in /app/etc/local.xml that session type is file

<session_save><![CDATA[files]]></session_save>

So is there different method of extracting session info with PHP? What am I doing wrong?

,

I have made a custom module which uses the customer session, but its strange, on live site its not returning customer data.

I have tried following methods:

$sessCustomer = Mage::getSingleton('customer/session', array('name' => 'frontend'));
echo '<pre>';print_r($sessCustomer->getCustomer()->getData()); echo '</pre>';exit;

It returns:

Array
(
    [website_id] => 1
)

If I print the customer session:

Mage::getSingleton('customer/session')->getData();

This returns:

array(
    [_session_validator_data] => Array
        (
            [remote_addr] => <MY IP>
            [http_via] => 
            [http_x_forwarded_for] => <MY IP>
            [http_user_agent] => Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:16.0) Gecko/20100101 Firefox/16.0
        )

    [session_hosts] => Array
            (
                [bestevalue.info] => 1
            )
    [messages] => Mage_Core_Model_Message_Collection Object
            (
                [_messages:protected] => Array
                    (
                    )

                [_lastAddedMessage:protected] => 
            )
    [id] => 
)

I am logged in, can see the customer dashboard with customer info on it but not able to use that session in my custom module.

Please guide me how to fix this.

Update:

I have checked in /app/etc/local.xml that session type is file

<session_save><![CDATA[files]]></session_save>

So is there different method of extracting session info with PHP? What am I doing wrong?

Update 2:

i have used router as well to make pretty url public function match(Zend_Controller_Request_Http $request) on start of this action i placed Mage::getSingleton('core/session', array('name' => 'frontend')); but still not working with router without one it is working for example directly accessing the action : site.com/module/controller/action it works but not with router. any thoughts? thanks,

    Tweeted twitter.com/#!/StackMagento/status/333175407547412480
3 deleted 50 characters in body; edited tags; edited title
source | link

customer session Customer Session is not working in magento custom moduleEmpty In Custom Module

iI have made a custom module which uses the customer session, but its strange, on live site its not returning customer data. i

I have tried following methods:

$sessCustomer = Mage::getSingleton('customer/session', array('name' => 'frontend'));
    echo '<pre>';print_r($sessCustomer->getCustomer()->getData()); echo '</pre>';exit;

itIt returns:

Array
(
    [website_id] => 1
)

if iIf I print the customer session:

Mage::getSingleton('customer/session')->getData();

thisThis returns (exact output):

 array(
    array(
[_session_validator_data] => Array
        (
            [remote_addr] => 58.65.183.10<MY IP>
            [http_via] => 
            [http_x_forwarded_for] => 58.65.183.10<MY IP>
            [http_user_agent] => Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:16.0) Gecko/20100101 Firefox/16.0
        )

    [session_hosts] => Array
            (
                [bestevalue.info] => 1
            )
    [messages] => Mage_Core_Model_Message_Collection Object
            (
                [_messages:protected] => Array
                    (
                    )

                [_lastAddedMessage:protected] => 
            )
    [id] => 
)

i am exhausted here , iI am logged in, can see the customer dashboard with customer info on it but not been able to use that session in my custom module, please.

Please guide me how to fix this.

Update:

iI have checked in /app/etc/local.xml/app/etc/local.xml that session type is file

<session_save><![CDATA[files]]></session_save>

soSo is there different method of extracting session info with php PHP? whatWhat am iI doing wrong?

thanks,

customer session is not working in magento custom module

i have made a custom module which uses customer session, but its strange, on live site its not returning customer data. i have tried following methods:

$sessCustomer = Mage::getSingleton('customer/session', array('name' => 'frontend'));
    echo '<pre>';print_r($sessCustomer->getCustomer()->getData()); echo '</pre>';exit;

it returns:

Array
(
    [website_id] => 1
)

if i print the customer session:

Mage::getSingleton('customer/session')->getData();

this returns (exact output):

     array(
[_session_validator_data] => Array
        (
            [remote_addr] => 58.65.183.10
            [http_via] => 
            [http_x_forwarded_for] => 58.65.183.10
            [http_user_agent] => Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:16.0) Gecko/20100101 Firefox/16.0
        )

    [session_hosts] => Array
            (
                [bestevalue.info] => 1
            )
    [messages] => Mage_Core_Model_Message_Collection Object
            (
                [_messages:protected] => Array
                    (
                    )

                [_lastAddedMessage:protected] => 
            )
    [id] => 
)

i am exhausted here , i am logged in, can see the customer dashboard with customer info on it but not been able to use that session in my custom module, please guide me how to fix this.

Update:

i have checked in /app/etc/local.xml that session type is file

<session_save><![CDATA[files]]></session_save>

so is there different method of extracting session info with php ? what am i doing wrong?

thanks,

Customer Session is Empty In Custom Module

I have made a custom module which uses the customer session, but its strange, on live site its not returning customer data.

I have tried following methods:

$sessCustomer = Mage::getSingleton('customer/session', array('name' => 'frontend'));
echo '<pre>';print_r($sessCustomer->getCustomer()->getData()); echo '</pre>';exit;

It returns:

Array
(
    [website_id] => 1
)

If I print the customer session:

Mage::getSingleton('customer/session')->getData();

This returns:

array(
    [_session_validator_data] => Array
        (
            [remote_addr] => <MY IP>
            [http_via] => 
            [http_x_forwarded_for] => <MY IP>
            [http_user_agent] => Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:16.0) Gecko/20100101 Firefox/16.0
        )

    [session_hosts] => Array
            (
                [bestevalue.info] => 1
            )
    [messages] => Mage_Core_Model_Message_Collection Object
            (
                [_messages:protected] => Array
                    (
                    )

                [_lastAddedMessage:protected] => 
            )
    [id] => 
)

I am logged in, can see the customer dashboard with customer info on it but not able to use that session in my custom module.

Please guide me how to fix this.

Update:

I have checked in /app/etc/local.xml that session type is file

<session_save><![CDATA[files]]></session_save>

So is there different method of extracting session info with PHP? What am I doing wrong?

,

2 updated info related to the problem
source | link
1
source | link