/** * the single login session should always have an active * user, the user should match the configuration rules. * * @param Mage_Customer_Model_Session $customerSession * @return boolean */ public function validateAnonymousLoginSession($customerSession) { /** * @var $config Vbw_Punchout_Helper_Config * @var $session Vbw_Punchout_Model_Session */ $config = Mage::helper('vbw_punchout/config'); $groupId = $config->getAnonymousLoginGroup(); if (!empty($groupId)) { if ($customerSession->getCustomerGroupId() != 0) { $customer = $customerSession->getCustomer(); $customer->setGroupId($customerSession->getCustomerGroupId()); $quote = Mage::getSingleton('checkout/session')->getQuote(); $quote->setCustomer($customer); // $customerSession->setCustomerAsLoggedIn($customer); } } }