The other day I needed to make a trivial change in the checkout page in the New iNternationalist ethical shop. I always want to visually test a page before rolling it out live. I know how easy it is to mess up the position of an angle bracket or something! Normally you can only see the checkout success page when you have actually placed an order. Which is reasonable enough. But you hardly want to place an order for every trivial HTML tweak.
As it turns out you can simply comment out a bit of the OnepageController success method. The onepage controller lives at app/code/core/Mage/Checkout/controllers/OnepageController.php
The code that needs commenting out is in the successAction() method. Here is what I do in magento 1.7.x 227 /*if (!$session->getLastSuccessQuoteId()) {
228 $this->_redirect('checkout/cart');
229 return;
230 }
231
232 $lastQuoteId = $session->getLastQuoteId();
233 $lastOrderId = $session->getLastOrderId();
234 $lastRecurringProfiles = $session->getLastRecurringProfileIds();
235 if (!$lastQuoteId || (!$lastOrderId && empty($lastRecurringProfiles))) {
236 $this->_redirect('checkout/cart');
237 return;
238 }
239
240 $session->clear();*/
Now I can work on the checkout success page at app/design/frontend/default/_your_theme_/template/checkout/success.phtml
I use a seperate dev environment, so I simply revert the OnepageController.php code when I am done.