views:

77

answers:

2

I have not been able to figure this out for the life of me. I wanted to show the order review step(final step before processing the order) right away on the one page checkout in Magento. Any suggestions? Thanks all.

A: 

If you look at the bottom of onepage.phtml, you will see

<?php if($this->getActiveStep()): ?>
   accordion.openSection('opc-<?php echo $this->getActiveStep() ?>');
<?php endif; ?>

which calls Mage_Checkout_Block_Onepage::getActiveStep() to determine which step to show first. You can override this by creating your own onepage.phtml in your theme and changing the block above to be:

   accordion.openSection('opc-review');

However, the openSection function only executes if the target element ('opc-review') in this case, has a class of "allow" which is set by Magento's AJAX once the previous checkout steps are completed. You could manually add the "allow" class using prototype, but once you get the step to display, you'll see that it is empty, since the AJAX hasn't populated the content based on the previous steps as the previous steps haven't happened yet!

So... You could create a new block based on Cart.php and insert that into onepage.phtml using $this->getChildHtml('block-id') and the layout xml. You would need to insert it inside the ol#checkoutSteps as an li#opc-summary.section allow or something like that, and make the js change above to be accordion.openSection('opc-summary');

That's the best I can do at the moment for you. HTH, JD

Jonathan Day
This was a huge help, got me going in the right direction. Thanks Jonathan.
Yock
Pleased that it helped. I've often thought that it would be a helpful thing to have, as long as it doesn't distract customers from completing the checkout!
Jonathan Day
A: 

Your aim is to have the markup in place before being called by AJAX. Although not cheap the one step checkout extension sort of works like this.

clockworkgeek