Using the code below in the index.php file of a WP template:
require_once '/Users/xxx/Documents/Projects/honora/trunk/app/Mage.php';
umask(0);
Mage::app('default');
Mage::getSingleton('core/session', array('name' => 'frontend'));
Mage::log(Mage::helper('checkout/cart')->getCart()->getItemsCount());
should in theory give me the number of items in my cart in a Wordpress blog in the Mage log. After adding an item to my cart in one version of Magento I have, the log of when I arrive at my blog shows that I correctly have 1 item. However, in a completely different version of Magento, this isn't the case, and instead logs 0.
Now I know that this is a pretty vague question, but can anyone throw out some possible solutions or ways to check into what's going on? I don't believe it's necessarily an issue with WP, instead believing it's something that's happening between Mage::app() and the call to the session model.
Any help would be appreciated.