What is a “Success Page”?

Checkout Success page is a page you see when you click "Order Now" in checkout and system successfully applies your order for further processing. In this case you see a message that a checkout was implemented successfully.

Problem:

When you modify any information on this page (HTML, CSS, JavaScript, PHP), you will want to preview what the results look like. But once you place an order, and get to the success-page, refreshing will clean the session and redirect you back to an empty shopping cart page. In other words, every time you make a change to the magento success page template, you would need to create a new order to preview the result. Which is not comfy and really timetaking.

In this article I will explain you how to come out of this situation.

How and where do I edit Magento success page?

1. In the checkout.xml you can change the layout of the page and add CMS custom blocks.

2. File templates located here:

app/design/frontend/package/yourcustomtheme/template/checkout/success.phtml

If files are not there then add them from base package.

3. Now you are ready to start designing your success page. But here is a problem: when you click "Refresh" button on the success page get you automatically redirected to an empty cart. Under these conditions designing can be really difficult.

Solution: Temporarily comment cleaning session. Find the file app/code/core/Mage/Checkout/ controllers/OnepageController.php and comment the next line in public function successAction.

//$session->clear();

4. Do your HTML and CSS magic. Check for compatibility with different browsers.

5. Important: uncomment the code, otherwise the website will not work correctly.