I need to get

  • Address Line 1
  • Address Line 2
  • Each Product Order Quantity
  • MRP(Manufacturer's Suggested Retail Price)

code inside


$lid = $this->getOrderId();
echo  "Order ID:".$lid."<br/>";

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('Magento\Sales\Model\Order')->load($lid);

$totall = $order->getGrandTotal();
echo "Order Total:".$totall."<br/>";

$shippingAddress = $order->getShippingAddress();

echo "Telephone No:".$shippingAddress->getTelephone()."<br/>"; 

echo "postcode".$shippingAddress->getPostcode()."<br/>"; 

echo "city".$shippingAddress->getCity()."<br/>"; 

$items = $order->getAllItems();

foreach($items as $i):
   $_productsku = 
   $_productquantity = 
   $_productprice = 

echo "product sku:".$_productsku."<br/>";
echo "product quantity:".$_productname."<br/>";
echo "product Rate:".$_productprice."<br/>";
  • Specify the problem which you face using above code. Nov 11, 2017 at 7:00
  • no problems no errors. need to know, how can i get MRP, address1, address2, product order quantity for display purpose Nov 11, 2017 at 7:45

1 Answer 1


In your code in for each loop you are calling product obj for get qty order , it is not need just call from I object

  • ok how can i add it? Nov 11, 2017 at 7:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.