2

I want to add a form in the thank you page (the page that's displayed after the order has been placed which contains the order details), however, I don't the user to resubmit the personal details as it has already been input during the order process. The only fields the user would need to write on were the message itself.

At the moment I've created the form (which required name, email, etc) and added to the thank you page through a template. I'm thinking about capturing the user details with jQuery and resubmit a custom form via ajax, however, I'd prefer to do it natively via PHP. Any suggestions on how?

2 Answers 2

4

You can get any customer data in your template from the order object:

$order = Mage::getModel('sales/order')->load($this->getLastOrderId());
$order->getCustomerEmail();
1

In Success.phtml

$order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());
$order->getCustomerEmail();

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.