在加载商店之前,我想获取一些客户数据,然后决定加载哪个商店视图。但它不是这样工作的:
// Option 1
$customer = Mage::getSingleton('customer/session'); // does not work before Framework is loaded
// Option 2
Mage::app();
$customer = Mage::getSingleton('customer/session'); // does work but...
Mage::run($mageRunCode, $mageRunType); // produces here the following error: "Mage registry key "controller" already exists"
那么,如何加载客户数据,然后加载店铺呢?