0

I want to add custom page which will have a form with some questions.

Customer needs to fill out that form and then go to checkout. This form will be related to order and admin can see that filled form in order view.

Per order there will one questionnaires form.

Custom questionnaire page between cart and checkout page.

How do I achieve this?

Thanks.

3

Please create one module in the name of Demo_Intermediate using silk software

Note: install and do the steps in default magento i have consider and did the same thing in magento 1.9.2.4

Step 1 : app/design/frontend/base/default/template/checkout/onepage/link.phtml

<?php if ($this->isPossibleOnepageCheckout()):?>
<button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Proceed to Checkout')) ?>" class="button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> 
onclick="window.location='<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'intermediate/' ?>';"><span><span><?php echo $this->__('Proceed to Checkout') ?></span></span></button>

Step2 : app/design/frontend/rwd/default/template/intermediate/index.phtml

<form action= "<?php echo Mage::getBaseUrl().'intermediate/index/intermediate' ?>"  method="post" id="product_addtocart_form" enctype="multipart/form-data">
<p><label for="fristname">FirstName</label>
<input type="text" name="fristname"><br>
<br>
<label for="secondname">SecondName</label>
<input type="text" name="secondname">
<br>
</p>
<button type="submit"><?php echo $this->__('Proceed to Checkout') ?></button>
</form>

Screenshot: enter image description here Step 3: /app/code/local/Demo/Intermediate/controllers/IndexController.php

<?php
class Demo_Intermediate_IndexController extends    Mage_Core_Controller_Front_Action{
public function IndexAction() {

  $this->loadLayout();   
  $this->getLayout()->getBlock("head")->setTitle($this->__("Titlename"));
        $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
  $breadcrumbs->addCrumb("home", array(
            "label" => $this->__("Home Page"),
            "title" => $this->__("Home Page"),
            "link"  => Mage::getBaseUrl()
       ));

  $breadcrumbs->addCrumb("titlename", array(
            "label" => $this->__("Titlename"),
            "title" => $this->__("Titlename")
       ));

  $this->renderLayout(); 

}
    // My custom Action 
    public function intermediateAction()
    {

     $getDetails=$this->getRequest()->getPost();

      //customize u r code here 

      $this->_redirect('checkout');


    }
}

Note: Here I am guiding u how to redirect from cart to checkout through intermediate page. happy coding

  • Thanks for your response but i need more details with saving at least one field to order, its better for me if you provide more details about it. – Utsav IIHGlobal Mar 9 '17 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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