Magento: Show the review in one page.

I could not figure it out for the life of me. I wanted to show the step of checking the order (the final step before processing the order) immediately on one page in Magento. Any suggestions? Thanks to everyone.

+4
source share
1 answer

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:

  accordion.openSection('opc-review'); 

However, the openSection function is only executed if the target element ('opc-review') in this case has the class β€œallow”, which is set by Magento AJAX, as soon as the previous verification steps are completed. You can manually add the "allow" class using the prototype, but as soon as you get this step, you will see that it is empty, since AJAX did not fill the content based on the previous steps, since the previous steps haven’t happened yet!

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

This is the best I can do at the moment for you. NTN, JD

+3
source

All Articles