We have a lot of code in our codebase that was done by a third-party developer. They modified many places in the core and we wanted to figure out exactly what is happening.
They have code like this:
$pidsess = Mage::getSingleton('core/session', array('name'=>'frontend'));
$pidsess->setNA_pid(array("PID" => $pid, "PartInfo" => $return_data['result']));
What this does is store a “globally available variable” that can be called at anytime the Magento Session is alive like this:
$pidsess = Mage::getSingleton('core/session', array('name' => 'frontend'));
$piddata = $pidsess->getNA_pid();
Where can I find the code that is setting this “variable”? I have searched for ‘setNA_’ and found several calls but none of them the actual function call.
Is this a part of Magento’s stupid EAV architecture where you can make up your own functions to set EAV values? If so, where would the values be stored?
Calling something stupid just because you didn’t have time to understand and/or didn’t like it certainly isn’t going to help. However, as with many magento base classes, it probably just sets a variable into the magento session that ends somewhere in the session storage.
I’d start with
Mage::log(print_r($_SESSION,1)to see if there is really an['NA_pid'].And it has nothing to do with EAV.