Impossible to retreive the customer id of the session in an external script
I created an external script test.php of Magento But, i don' t succeed to retreive the customer id of the session.
the script is as follows : "<?php
require_once DIR . '/app/bootstrap.php';
$params = array(
Mage::PARAM_RUN_CODE => '',
Mage::PARAM_RUN_TYPE => 'store',
'entryPoint' => basename(FILE) ,
);
$entryPoint = new Mage_Index_Model_EntryPoint_Indexer(BP, $params); $entryPoint->processRequest();
$customer_id = Mage::getSingleton('Mage_Customer_Model_Session')->getCustomerId() ;
echo " customer_id session : ".$customer_id;
" To test, firstly, i authentificate a user via Magento. Secondly, i launch the script test.php. But the customer id isn' t displayed.
Thanks to explain how to retreive session customer data in an erternal script ? .
Hello. Unfortunately we don't have the capacity to help with programming questions right now. We suggest you use one of the places designed for asking such question, eg http://magento.stackexchange.com/