本文整理汇总了PHP中Mage_Sales_Model_Quote::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Quote::load方法的具体用法?PHP Mage_Sales_Model_Quote::load怎么用?PHP Mage_Sales_Model_Quote::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Sales_Model_Quote
的用法示例。
在下文中一共展示了Mage_Sales_Model_Quote::load方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
protected function setUp()
{
parent::setUp();
$quote = new Mage_Sales_Model_Quote();
$quote->load('test01', 'reserved_order_id');
Mage::getSingleton('Mage_Checkout_Model_Session')->setQuoteId($quote->getId());
}
示例2: testReviewAction
/**
* @magentoDataFixture Mage/Sales/_files/quote.php
* @magentoDataFixture Mage/Paypal/_files/quote_payment.php
*/
public function testReviewAction()
{
$quote = new Mage_Sales_Model_Quote();
$quote->load('test01', 'reserved_order_id');
Mage::getSingleton('Mage_Checkout_Model_Session')->setQuoteId($quote->getId());
$this->dispatch('paypal/express/review');
$html = $this->getResponse()->getBody();
$this->assertContains('Simple Product', $html);
$this->assertContains('Review', $html);
$this->assertContains('/paypal/express/placeOrder/', $html);
}
示例3: testOverviewAction
/**
* Covers app/code/core/Mage/Checkout/Block/Multishipping/Payment/Info.php
* and app/code/core/Mage/Checkout/Block/Multishipping/Overview.php
*
* @magentoDataFixture Mage/Sales/_files/quote.php
* @magentoDataFixture Mage/Customer/_files/customer.php
*/
public function testOverviewAction()
{
$quote = new Mage_Sales_Model_Quote();
$quote->load('test01', 'reserved_order_id');
Mage::getSingleton('Mage_Checkout_Model_Session')->setQuoteId($quote->getId());
$session = new Mage_Customer_Model_Session();
$session->login('customer@example.com', 'password');
$this->getRequest()->setPost('payment', array('method' => 'checkmo'));
$this->dispatch('checkout/multishipping/overview');
$html = $this->getResponse()->getBody();
$this->assertContains('<p>' . $quote->getPayment()->getMethodInstance()->getTitle() . '</p>', $html);
$this->assertContains('<span class="price">$10.00</span>', $html);
}
示例4: testCollectTotalsWithVirtual
/**
* @magentoDataFixture Mage/Catalog/_files/product_virtual.php
* @magentoDataFixture Mage/Sales/_files/quote.php
*/
public function testCollectTotalsWithVirtual()
{
$quote = new Mage_Sales_Model_Quote();
$quote->load('test01', 'reserved_order_id');
$product = new Mage_Catalog_Model_Product();
$product->load(21);
$quote->addProduct($product);
$quote->collectTotals();
$this->assertEquals(2, $quote->getItemsQty());
$this->assertEquals(1, $quote->getVirtualItemsQty());
$this->assertEquals(20, $quote->getGrandTotal());
$this->assertEquals(20, $quote->getBaseGrandTotal());
}
示例5:
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Magento
* @package Mage_Paypal
* @subpackage integration_tests
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
$quote = new Mage_Sales_Model_Quote();
$quote->load('test01', 'reserved_order_id');
$payment = $quote->getPayment();
$payment->setMethod(Mage_Paypal_Model_Config::METHOD_WPP_EXPRESS);
$payment->setAdditionalInformation(Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_TRANSPORT_PAYER_ID, 123);
$quote->collectTotals()->save();