How can I get customer information on success page (template I think is "success.phtml"). I want to set it to something link "Dear Mr. Hans Mustermann …"
in success.phtml I found this code
$block->getOrderId()
I have tried $block->getCustomerName()
or $block->getCustomerGender()
but it does not work.
Best Answer
You can use below code to get ordered customer details.
Hope this will be helpful.