0

I have tried the steps mentioned in this link:

Magento 2 Get order total on success page?.

In one of the answer, it is saying that to update the block

"Magento\Checkout\Block\Success"

to

"Magento\Checkout\Block\Onepage\Success".

Can anyone help me for this? I tried from my end but it gives me a blank page.

As a frontend developer, I am not that much good in Magento2 coding.

  • what you have tried from your side, please share your code. – Rakesh Jesadiya May 9 '17 at 6:27
2

Please used Bss OrderDetails extension which is available for free to display order details on order success page in magento 2.

Please follow link Click Here

enter image description here

| improve this answer | |
-1

That's true if you are using "Magento\Checkout\Block\Success" ,it should be "Magento\Checkout\Block\Onepage\Success".As the success page corresponds to this block. And after overriding that block you can get order from,

$order = $this->_checkoutSession->getLastRealOrder();

and finally ,you can load $order->getEntityId() to Magento/Sales/Model/Order and you will get complete order details where you can find order sub_total.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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