Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Variables
order_express_with_invoice_and_shipping.php File Reference

Go to the source code of this file.

Variables

 $objectManager = Bootstrap::getObjectManager()
 
 $addressData = include __DIR__ . '/address_data.php'
 
 $billingAddress
 
 $shippingAddress = clone $billingAddress
 
 $payment = $objectManager->create(Payment::class)
 
 $orderItem = $objectManager->create(Item::class)
 
 $itemsAmount = $product->getPrice()
 
 $shippingAmount = 20
 
 $totalAmount = $itemsAmount + $shippingAmount
 
 $order = $objectManager->create(Order::class)
 
 $orderRepository = $objectManager->get(OrderRepositoryInterface::class)
 
 $invoiceService = $objectManager->create(InvoiceManagementInterface::class)
 
 $transaction = $objectManager->create(Transaction::class)
 
 $invoice = $invoiceService->prepareInvoice($order, [$orderItem->getId() => 1])
 

Variable Documentation

◆ $addressData

$addressData = include __DIR__ . '/address_data.php'

Definition at line 22 of file order_express_with_invoice_and_shipping.php.

◆ $billingAddress

$billingAddress
Initial value:

Definition at line 23 of file order_express_with_invoice_and_shipping.php.

◆ $invoice

$invoice = $invoiceService->prepareInvoice($order, [$orderItem->getId() => 1])

Definition at line 84 of file order_express_with_invoice_and_shipping.php.

◆ $invoiceService

$invoiceService = $objectManager->create(InvoiceManagementInterface::class)

Definition at line 79 of file order_express_with_invoice_and_shipping.php.

◆ $itemsAmount

$itemsAmount = $product->getPrice()

Definition at line 46 of file order_express_with_invoice_and_shipping.php.

◆ $objectManager

$objectManager = Bootstrap::getObjectManager()

Definition at line 20 of file order_express_with_invoice_and_shipping.php.

◆ $order

$order = $objectManager->create(Order::class)

Definition at line 51 of file order_express_with_invoice_and_shipping.php.

◆ $orderItem

$orderItem = $objectManager->create(Item::class)

Definition at line 35 of file order_express_with_invoice_and_shipping.php.

◆ $orderRepository

$orderRepository = $objectManager->get(OrderRepositoryInterface::class)

Definition at line 75 of file order_express_with_invoice_and_shipping.php.

◆ $payment

$payment = $objectManager->create(Payment::class)

Definition at line 31 of file order_express_with_invoice_and_shipping.php.

◆ $shippingAddress

$shippingAddress = clone $billingAddress

Definition at line 28 of file order_express_with_invoice_and_shipping.php.

◆ $shippingAmount

$shippingAmount = 20

Definition at line 47 of file order_express_with_invoice_and_shipping.php.

◆ $totalAmount

$totalAmount = $itemsAmount + $shippingAmount

Definition at line 48 of file order_express_with_invoice_and_shipping.php.

◆ $transaction

$transaction = $objectManager->create(Transaction::class)

Definition at line 82 of file order_express_with_invoice_and_shipping.php.