/** * Get quote checkout method * * @return string */ public function getCheckoutMethod() { if ($this->getCustomerSession()->isLoggedIn()) { return self::METHOD_CUSTOMER; } if (!$this->getQuote()->getCheckoutMethod()) { if ($this->_helper->isAllowedGuestCheckout($this->getQuote())) { $this->getQuote()->setCheckoutMethod(self::METHOD_GUEST); } else { $this->getQuote()->setCheckoutMethod(self::METHOD_REGISTER); } } return $this->getQuote()->getCheckoutMethod(); }
/** * return true if a guest is allowed to checkout without registering * @return boolean */ protected function _isGuestAllowedWithoutRegistering($quoteCheckoutMethod, Mage_Sales_Model_Quote $quote) { return (!$quoteCheckoutMethod || $quoteCheckoutMethod != Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER) && !$this->_checkoutHelper->isAllowedGuestCheckout($quote, $quote->getStoreId()); }