当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Sales_Model_Order::load方法代码示例

本文整理汇总了PHP中Mage_Sales_Model_Order::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Order::load方法的具体用法?PHP Mage_Sales_Model_Order::load怎么用?PHP Mage_Sales_Model_Order::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Sales_Model_Order的用法示例。


在下文中一共展示了Mage_Sales_Model_Order::load方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testOrderViewAction

 /**
  * @magentoDataFixture Mage/Sales/_files/order.php
  */
 public function testOrderViewAction()
 {
     $order = new Mage_Sales_Model_Order();
     $order->load('100000001', 'increment_id');
     $this->dispatch('admin/sales_order/view/order_id/' . $order->getId());
     $this->assertContains('Los Angeles', $this->getResponse()->getBody());
 }
开发者ID:NatashaOlut,项目名称:Mage_Test,代码行数:10,代码来源:OrderController.php

示例2: getOrder

 /**
  * Retrieve order model object
  *
  * @return Mage_Sales_Model_Order
  */
 public function getOrder()
 {
     if (is_null($this->_order)) {
         $this->_order = Mage::getModel('sales/order');
         if ($this->getOrderId()) {
             $this->_order->load($this->getOrderId());
         }
     }
     return $this->_order;
 }
开发者ID:HelioFreitas,项目名称:magento-pt_br,代码行数:15,代码来源:Quote.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $order = new Mage_Sales_Model_Order();
     $order->load('100000001', 'increment_id');
     $order->getPayment()->setMethod(Mage_Paypal_Model_Config::METHOD_PAYFLOWLINK);
     $order->save();
     $session = Mage::getSingleton('Mage_Checkout_Model_Session');
     $session->setLastRealOrderId($order->getRealOrderId())->setLastQuoteId($order->getQuoteId());
 }
开发者ID:NatashaOlut,项目名称:Mage_Test,代码行数:10,代码来源:PayflowController.php

示例4: _getOrder

 /**
  * Get Order by quoteId
  *
  * @return Mage_Sales_Model_Order
  */
 protected function _getOrder()
 {
     if (is_null($this->_order)) {
         $this->_order = Mage::getModel('Mage_Sales_Model_Order');
         $this->_order->load($this->getOnepage()->getQuote()->getId(), 'quote_id');
         if (!$this->_order->getId()) {
             throw new Mage_Payment_Model_Info_Exception(Mage::helper('Mage_Core_Helper_Data')->__("Can not create invoice. Order was not found."));
         }
     }
     return $this->_order;
 }
开发者ID:natxetee,项目名称:magento2,代码行数:16,代码来源:OnepageController.php

示例5: testRedirectActionIsContentGenerated

 public function testRedirectActionIsContentGenerated()
 {
     $order = new Mage_Sales_Model_Order();
     $order->load('100000001', 'increment_id');
     $order->getPayment()->setMethod(Mage_Paypal_Model_Config::METHOD_WPS);
     $order->save();
     $session = Mage::getSingleton('Mage_Checkout_Model_Session');
     $session->setLastRealOrderId($order->getRealOrderId())->setLastQuoteId($order->getQuoteId());
     $this->dispatch('paypal/standard/redirect');
     $this->assertContains('<form action="https://www.paypal.com/webscr" id="paypal_standard_checkout"' . ' name="paypal_standard_checkout" method="POST">', $this->getResponse()->getBody());
 }
开发者ID:NatashaOlut,项目名称:Mage_Test,代码行数:11,代码来源:StandardController.php

示例6: testCancelActionIsContentGenerated

 public function testCancelActionIsContentGenerated()
 {
     $order = new Mage_Sales_Model_Order();
     $order->load('100000001', 'increment_id');
     $order->getPayment()->setMethod(Mage_Paypal_Model_Config::METHOD_HOSTEDPRO);
     $order->save();
     $session = Mage::getSingleton('Mage_Checkout_Model_Session');
     $session->setLastRealOrderId($order->getRealOrderId())->setLastQuoteId($order->getQuoteId());
     $this->dispatch('paypal/hostedpro/cancel');
     $this->assertContains('window.top.checkout.gotoSection("payment");', $this->getResponse()->getBody());
     $this->assertContains('window.top.document.getElementById(\'checkout-review-submit\').show();', $this->getResponse()->getBody());
     $this->assertContains('window.top.document.getElementById(\'iframe-warning\').hide();', $this->getResponse()->getBody());
 }
开发者ID:NatashaOlut,项目名称:Mage_Test,代码行数:13,代码来源:HostedproController.php

示例7: load

 public function load($id, $field = null)
 {
     parent::load($id, $field);
     if (!$this->getId()) {
         if (is_null($field)) {
             $field = $this->getResource()->getIdFieldName();
         }
         $mongoOrder = $this->_getMongo()->loadOrder($id, $field);
         if ($mongoOrder->getId()) {
             $this->setData($mongoOrder->getOrder());
         }
     }
     return $this;
 }
开发者ID:eniuz,项目名称:MongoDB-OrderTransactions,代码行数:14,代码来源:Order.php

示例8: saveOrderPrescriptionExemption

 public function saveOrderPrescriptionExemption(Varien_Event_Observer $observer)
 {
     $exemption = Mage::getSingleton("core/session")->getPrescriptionExemptionCheck();
     if ($exemption > 0) {
         $exemptions = Mage::getResourceModel('prescriptioncheckout/prescription_collection');
         foreach ($exemptions as $ex) {
             if ($ex->getID() == $exemption) {
                 $exemptionText = '<b>' . $ex->getTitle() . '</b>: ' . $ex->getDescriptions();
             }
         }
         $orderIds = $observer->getData('order_ids');
         foreach ($orderIds as $orderId) {
             $order = new Mage_Sales_Model_Order();
             $order->load($orderId);
             $order->setData('prescription_exemption', $exemptionText);
             $order->save();
         }
         Mage::getSingleton('core/session')->getPrescriptionExemptionCheck('');
     }
 }
开发者ID:newedge-media,项目名称:iwantmymeds,代码行数:20,代码来源:Observer.php

示例9: getLastSessionOrder

 public function getLastSessionOrder()
 {
     $order = new Mage_Sales_Model_Order();
     $orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
     return $order->load($orderId);
 }
开发者ID:invipay,项目名称:invipay-magento,代码行数:6,代码来源:Data.php

示例10: testProcessIpnRequestRecurringCurrency

 /**
  * Test processIpnRequest() currency check for recurring profile
  *
  * @param string $currencyCode
  * @dataProvider currencyProvider
  * @magentoDataFixture Mage/Paypal/_files/recurring_profile.php
  * @magentoConfigFixture current_store payment/paypal_direct/active 1
  * @magentoConfigFixture current_store payment/paypal_express/active 1
  * @magentoConfigFixture current_store paypal/general/merchant_country US
  * @magentoConfigFixture current_store sales_email/order/enabled 0
  */
 public function testProcessIpnRequestRecurringCurrency($currencyCode)
 {
     $ipnData = (require __DIR__ . '/../_files/ipn_recurring_profile.php');
     $ipnData['mc_currency'] = $currencyCode;
     $this->_model->processIpnRequest($ipnData, $this->_createMockedHttpAdapter());
     $recurringProfile = new Mage_Sales_Model_Recurring_Profile();
     $recurringProfile->loadByInternalReferenceId('5-33949e201adc4b03fbbceafccba893ce');
     $orderIds = $recurringProfile->getChildOrderIds();
     $this->assertEquals(1, count($orderIds));
     $order = new Mage_Sales_Model_Order();
     $order->load($orderIds[0]);
     $this->_assertOrder($order, $currencyCode);
 }
开发者ID:nemphys,项目名称:magento2,代码行数:24,代码来源:IpnTest.php


注:本文中的Mage_Sales_Model_Order::load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。