Are there any extensions, open-source Magento modules, or tutorials that make adding a step to the one page checkout any easier? I've poked at the core code for this a few times and it seems like there's a lot of hard coded step information.

  • 5
    Unfortunately the Checkout code doesn't seem to be very flexible, a lot of the information is hardcoded from templates to the javascript accordion files. Apr 4, 2014 at 0:42
  • 1
    I've followed this tutorial and was able to add a new step in onepage checkout. Anyway lots of core files need to be override to achieve this step. Hope this will helpful excellencemagentoblog.com/magento-onestep-checkout-add-step
    – Sukeshini
    Apr 4, 2014 at 9:49

3 Answers 3


The short answer to this question ended up being "No". From a high level, adding a new checkout step meant

  1. Adding a new Block to the one step checkout page

  2. Having that block register itself as a step

  3. Connect that block with a prototype object that handled all interactions

  4. Rewriting several core Magento methods to insert the block as a step

  5. Some ajax trickery to get the progress stuff working.

Covering this in total is beyond the scope of a single Stack Overflow question. The tutorial linked in another question has a lot of what you'll need, and I also created a new commercial extension to make all this easier.


By default magento gives some checkout steps. But Sometime you need to add extra information from the customer for future reference. A common requested customization is to add the Custom Form in default checkout process. This is not good practice to touch core files. You can do this via overriding Modules. In this example Comapnyname is Ipragmatech and Module name is Checkoutstep.

Step1: Add Custom step in the checkout process

Open the Ipragmatech > Checkoutstep > Block > Onepage> Checkoutstep.php file and write the following code

    class Ipragmatech_Checkoutstep_Block_Onepage_Checkoutstep extends Mage_Checkout_Block_Onepage_Abstract
       protected function _construct()
          $this->getCheckout()->setStepData('checkoutstep', array(
          'label'     => Mage::helper('checkout')->__('Invitation to participation'),
          'is_show'   => true

Step2: Add steps which and where you want in the checkout process

Open the Ipragmatech > Checkoutstep > Block > Onepage> Checkoutstep.php file and write the following code

    class Ipragmatech_Checkoutstep_Block_Onepage extends Mage_Checkout_Block_Onepage
      public function getSteps()
             $steps = array();

             if (!$this->isCustomerLoggedIn()) {
                $steps['login'] = $this->getCheckout()->getStepData('login');

            $stepCodes = array('billing', 'shipping', 'shipping_method', 'payment', 'checkoutstep', 'review');
         foreach ($stepCodes as $step) {
             $steps[$step] = $this->getCheckout()->getStepData($step);

    return $steps;

Step3: Grab the submitted value of custom form and set the values of Custom form

Open the ipragmatech > Checkoutstep > controllers > OnepageController.php and write the following fucntion

    public function saveCheckoutstepAction()
      if ($this->getRequest()->isPost()) {

     //Grab the submited value 
     $_entrant_name = $this->getRequest()->getPost('entrant_name',"");
     $_entrant_phone = $this->getRequest()->getPost('entrant_phone',"");
     $_entrant_email = $this->getRequest()->getPost('entrant_email',"");
     $_permanent_address = $this->getRequest() ->getPost('permanent_address',"");
     $_address = $this->getRequest()->getPost('local_address',"");

     Mage::getSingleton('core/session') ->setIpragmatechCheckoutstep(serialize(array(
    'entrant_name' =>$_entrant_name,
    'entrant_phone' =>$_entrant_phone,
    'entrant_email' =>$_entrant_email,
    'permanent_address' =>$_permanent_address,
    'address' =>$_address

    $result = array();
    $redirectUrl = $this->getOnePage()->getQuote()->getPayment() ->getCheckoutRedirectUrl();
        if (!$redirectUrl) {
            $result['goto_section'] = 'review';
            $result['update_section'] = array(
                'name' => 'review',
                'html' => $this->_getReviewHtml()


        if ($redirectUrl) {
            $result['redirect'] = $redirectUrl;


Step4: Save Custom Form information

When checkout_onepage_controller_success_action event hook is called. Open the Ipragmatech > Checkoutstep > Model >Observer.php and write the following

    class Ipragmatech_Checkoutstep_Model_Observer {
      const ORDER_ATTRIBUTE_FHC_ID = 'checkoutstep';
      public function hookToOrderSaveEvent() {
      if (Mage::helper('checkoutstep')->isEnabled()) {
         $order = new Mage_Sales_Model_Order ();
         $incrementId = Mage::getSingleton ( 'checkout/session' )->getLastRealOrderId ();
         $order->loadByIncrementId ( $incrementId );

       // Fetch the data 
       $_checkoutstep_data = null;
       $_checkoutstep_data = Mage::getSingleton ( 'core/session' )->getIpragmatechCheckoutstep ();
       $model = Mage::getModel ( 'checkoutstep/customerdata' )->setData ( unserialize ( $_checkoutstep_data ) );
       $model->setData ( "order_id",$order["entity_id"] );
       try {
           $insertId = $model->save ()->getId ();
             Mage::log ( "Data successfully inserted. Insert ID: " . $insertId, null, 'mylog.log');
        } catch ( Exception $e ) {
            Mage::log ( "EXCEPTION " . $e->getMessage (), null, 'mylog.log' );


Magento – Add Custom Form in Checkout Extension is a complete solution to add extra step in Checkout process for your ecommerce website. It allow admin to export data from custom table in CSV format.

Visit the link to get this free extension http://www.magentocommerce.com/magento-connect/custom-form-in-checkout.html


yes there is a good tutorial about this here "http://excellencemagentoblog.com/magento-onestep-checkout-add-step"

  • 4
    You should explain a little what is found at the end of that url. Single link answers are not the best answers.
    – Marius
    Jun 3, 2014 at 7:15
  • the url itself says magento-onestep-checkout-add-step and this is what the question is asking for. Jun 3, 2014 at 7:47
  • 5
    I agree with you, the explanation in the link is wonderful, but take a look at how the answers should be on SO websites: meta.stackexchange.com/a/8259/224252 and this: magento.stackexchange.com/help/how-to-answer
    – Marius
    Jun 3, 2014 at 7:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.