예제 #1
0
 /**
  * Initialize quote objects
  */
 private function initializeQuote()
 {
     $this->quote = Mage::getModel('sales/quote');
     $this->quote->setCheckoutMethod($this->proxyOrder->getCheckoutMethod());
     $this->quote->setStore($this->proxyOrder->getStore());
     $this->quote->save();
 }
예제 #2
0
 private function initializeQuote()
 {
     $this->quote = Mage::getModel('sales/quote');
     $this->quote->setCheckoutMethod($this->proxyOrder->getCheckoutMethod());
     $this->quote->setStore($this->proxyOrder->getStore());
     $this->quote->getStore()->setData('current_currency', $this->quote->getStore()->getBaseCurrency());
     $this->quote->save();
     Mage::getSingleton('checkout/session')->replaceQuote($this->quote);
 }
 /**
  * Get checkout method
  *
  * @return string
  */
 public function getCheckoutMethod()
 {
     if ($this->_getCustomerSession()->isLoggedIn()) {
         return Mage_Checkout_Model_Type_Onepage::METHOD_CUSTOMER;
     }
     if (!$this->_quote->getCheckoutMethod()) {
         if (Mage::helper('checkout')->isAllowedGuestCheckout($this->_quote)) {
             $this->_quote->setCheckoutMethod(Mage_Checkout_Model_Type_Onepage::METHOD_GUEST);
         } else {
             $this->_quote->setCheckoutMethod(Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER);
         }
     }
     return $this->_quote->getCheckoutMethod();
 }
예제 #4
0
 protected function _initQuote($checkoutMode = Ess_M2ePro_Model_Accounts::ORDERS_CUSTOMER_MODE_GUEST)
 {
     $this->_quote = Mage::getModel('sales/quote');
     switch ($checkoutMode) {
         case Ess_M2ePro_Model_Accounts::ORDERS_CUSTOMER_MODE_GUEST:
             $this->_quote->setCheckoutMethod('guest')->save();
             break;
         case Ess_M2ePro_Model_Accounts::ORDERS_CUSTOMER_MODE_NEW:
         case Ess_M2ePro_Model_Accounts::ORDERS_CUSTOMER_MODE_EXIST:
             $this->_quote->setCheckoutMethod('register')->save();
             break;
         default:
             throw new LogicException('Invalid checkout mode');
     }
 }