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

Go to the source code of this file.

Variables

 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
 
 $productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class)
 
 $sampleProduct = $productRepository->get('simple')
 
 $secondSampleProduct = $productRepository->get('custom-design-simple-product')
 
 $product = $objectManager->create(\Magento\Catalog\Model\Product::class)
 
 $addressData = include __DIR__ . '/../../../Magento/Sales/_files/address_data.php'
 
 $billingAddress = $objectManager->create(\Magento\Sales\Model\Order\Address::class, ['data' => $addressData])
 
 $shippingAddress = clone $billingAddress
 
 $payment = $objectManager->create(\Magento\Sales\Model\Order\Payment::class)
 
 $typeInstance = $product->getTypeInstance()
 
 $optionCollection = $typeInstance->getOptionsCollection($product)
 
 $bundleOptions = []
 
 $bundleOptionsQty = []
 
 $optionsData = []
 
foreach($optionCollection as $option) $requestInfo
 
 $orderItems = []
 
 $orderItem = $objectManager->create(\Magento\Sales\Model\Order\Item::class)
 
 $orderItems [] = $orderItem
 
 $order = $objectManager->create(\Magento\Sales\Model\Order::class)
 

Variable Documentation

◆ $addressData

$addressData = include __DIR__ . '/../../../Magento/Sales/_files/address_data.php'

Definition at line 109 of file order_with_bundle_shipped_separately.php.

◆ $billingAddress

$billingAddress = $objectManager->create(\Magento\Sales\Model\Order\Address::class, ['data' => $addressData])

Definition at line 111 of file order_with_bundle_shipped_separately.php.

◆ $bundleOptions

$bundleOptions = []

Definition at line 129 of file order_with_bundle_shipped_separately.php.

◆ $bundleOptionsQty

$bundleOptionsQty = []

Definition at line 130 of file order_with_bundle_shipped_separately.php.

◆ $objectManager

Definition at line 10 of file order_with_bundle_shipped_separately.php.

◆ $optionCollection

$optionCollection = $typeInstance->getOptionsCollection($product)

Definition at line 127 of file order_with_bundle_shipped_separately.php.

◆ $optionsData

$optionsData = []

Definition at line 131 of file order_with_bundle_shipped_separately.php.

◆ $order

$order = $objectManager->create(\Magento\Sales\Model\Order::class)

Definition at line 183 of file order_with_bundle_shipped_separately.php.

◆ $orderItem

$orderItem = $objectManager->create(\Magento\Sales\Model\Order\Item::class)

Definition at line 154 of file order_with_bundle_shipped_separately.php.

◆ $orderItems [1/2]

$orderItems = []

Definition at line 152 of file order_with_bundle_shipped_separately.php.

◆ $orderItems [2/2]

$orderItems[] = $orderItem

Definition at line 163 of file order_with_bundle_shipped_separately.php.

◆ $payment

$payment = $objectManager->create(\Magento\Sales\Model\Order\Payment::class)

Definition at line 117 of file order_with_bundle_shipped_separately.php.

◆ $product

$product = $objectManager->create(\Magento\Catalog\Model\Product::class)

Definition at line 17 of file order_with_bundle_shipped_separately.php.

◆ $productRepository

$productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class)

Definition at line 12 of file order_with_bundle_shipped_separately.php.

◆ $requestInfo

foreach ( $optionCollection as $option) $requestInfo
Initial value:
= [
'product' => $product->getId(),
'bundle_option' => $bundleOptions,
'bundle_option_qty' => $bundleOptionsQty,
'qty' => 1,
]

Definition at line 145 of file order_with_bundle_shipped_separately.php.

◆ $sampleProduct

$sampleProduct = $productRepository->get('simple')

Definition at line 13 of file order_with_bundle_shipped_separately.php.

◆ $secondSampleProduct

$secondSampleProduct = $productRepository->get('custom-design-simple-product')

Definition at line 14 of file order_with_bundle_shipped_separately.php.

◆ $shippingAddress

$shippingAddress = clone $billingAddress

Definition at line 114 of file order_with_bundle_shipped_separately.php.

◆ $typeInstance

$typeInstance = $product->getTypeInstance()

Definition at line 125 of file order_with_bundle_shipped_separately.php.