I have placed an order
from guest account and the end of order I have given an option to create an Account
, when I created the account and navigate to order sections i see no others.
So i expplored a bit but still i am not able to understand.
Right now my code loads the order information via this code
public function getOrderInformation($orderid)
{
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('Magento\Sales\Api\Data\OrderInterface')->load($orderid);
return $order;
}
$shippingAddressObj = $orderInfo->getShippingAddress();
$shippingAddressArray = $shippingAddressObj->getData();
$paymentObj = $orderInfo->getPayment();
$paymentArray = $paymentObj->getData();
also for order related information like name, quantity, size I use this
<?php foreach ($orderInfo->getAllVisibleItems() as $item): ?>
<?php endforeach; ?>
How can I achieve the same for guest user order, as I will be using the same phtml
for my account(guest
or registered user
).