コード例 #1
0
ファイル: Quote.php プロジェクト: xiaoguizhidao/beut
 /**
  * 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
ファイル: Quote.php プロジェクト: newedge-media/iwantmymeds
 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);
 }
コード例 #3
0
 /**
  * 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
ファイル: Order.php プロジェクト: par-orillonsoft/app
 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');
     }
 }