Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Go to the source code of this file.
Variables | |
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() | |
$product = $objectManager->create(\Magento\Catalog\Model\Product::class) | |
$addressData = include __DIR__ . '/address_data.php' | |
$billingAddress = $objectManager->create(\Magento\Quote\Model\Quote\Address::class, ['data' => $addressData]) | |
$shippingAddress = clone $billingAddress | |
$quote = $objectManager->create(\Magento\Quote\Model\Quote::class) | |
$quoteRepository = $objectManager->create(\Magento\Quote\Api\CartRepositoryInterface::class) | |
$cartItemFactory = $objectManager->get(\Magento\Quote\Api\Data\CartItemInterfaceFactory::class) | |
$cartItem = $cartItemFactory->create() | |
$cartItemRepository = $objectManager->get(\Magento\Quote\Api\CartItemRepositoryInterface::class) | |
$quoteManagement = $objectManager->create(\Magento\Quote\Api\CartManagementInterface::class) | |
$order = $quoteManagement->submit($quote, ['increment_id' => '100000001']) | |
$item = $order->getAllItems()[0] | |
$invoiceFactory = $objectManager->get(\Magento\Sales\Api\InvoiceManagementInterface::class) | |
$invoice = $invoiceFactory->prepareInvoice($order, [$item->getId() => 10]) | |
$creditmemoFactory = $objectManager->get(\Magento\Sales\Model\Order\CreditmemoFactory::class) | |
$creditmemo = $creditmemoFactory->createByInvoice($invoice, ['qtys' => [$item->getId() => 5]]) | |
foreach($creditmemo->getAllItems() as $creditmemoItem) | $creditmemoManagement = $objectManager->create(\Magento\Sales\Api\CreditmemoManagementInterface::class) |
$addressData = include __DIR__ . '/address_data.php' |
Definition at line 32 of file order_info.php.
$billingAddress = $objectManager->create(\Magento\Quote\Model\Quote\Address::class, ['data' => $addressData]) |
Definition at line 34 of file order_info.php.
$cartItem = $cartItemFactory->create() |
Definition at line 62 of file order_info.php.
$cartItemFactory = $objectManager->get(\Magento\Quote\Api\Data\CartItemInterfaceFactory::class) |
Definition at line 59 of file order_info.php.
$cartItemRepository = $objectManager->get(\Magento\Quote\Api\CartItemRepositoryInterface::class) |
Definition at line 69 of file order_info.php.
$creditmemo = $creditmemoFactory->createByInvoice($invoice, ['qtys' => [$item->getId() => 5]]) |
Definition at line 94 of file order_info.php.
$creditmemoFactory = $objectManager->get(\Magento\Sales\Model\Order\CreditmemoFactory::class) |
Definition at line 93 of file order_info.php.
foreach ( $creditmemo->getAllItems() as $creditmemoItem) $creditmemoManagement = $objectManager->create(\Magento\Sales\Api\CreditmemoManagementInterface::class) |
Definition at line 101 of file order_info.php.
$invoice = $invoiceFactory->prepareInvoice($order, [$item->getId() => 10]) |
Definition at line 85 of file order_info.php.
$invoiceFactory = $objectManager->get(\Magento\Sales\Api\InvoiceManagementInterface::class) |
Definition at line 82 of file order_info.php.
$item = $order->getAllItems()[0] |
Definition at line 79 of file order_info.php.
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() |
Copyright © Magento, Inc. All rights reserved. See COPYING.txt for license details.
Definition at line 7 of file order_info.php.
$order = $quoteManagement->submit($quote, ['increment_id' => '100000001']) |
Definition at line 76 of file order_info.php.
$product = $objectManager->create(\Magento\Catalog\Model\Product::class) |
Definition at line 14 of file order_info.php.
$quote = $objectManager->create(\Magento\Quote\Model\Quote::class) |
Definition at line 42 of file order_info.php.
$quoteManagement = $objectManager->create(\Magento\Quote\Api\CartManagementInterface::class) |
Definition at line 73 of file order_info.php.
$quoteRepository = $objectManager->create(\Magento\Quote\Api\CartRepositoryInterface::class) |
Definition at line 55 of file order_info.php.
$shippingAddress = clone $billingAddress |
Definition at line 37 of file order_info.php.