Announcement

Collapse
No announcement yet.

Adding custom fields to checkout page, email including invoice PDF?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding custom fields to checkout page, email including invoice PDF?

    How to add the custom fields to checkout page which can also be included/added to customer account & email including invoice & shipping PDF?

  • #2
    Hello!

    First, create a field in the table ‘sales_flat_order’, e.g. ‘comment’.
    Then add the text field into the template
    frontend/base/default/template/checkout/onepage/billing.phtml:

    <input type="textarea" name="comment">

    In controller Mage_Checkout_OnepageController method saveBillingAction() – add the following:

    if ($comment = $this->getRequest()->getParam('comment')) {
    $this->getOnepage()->getQuote()->setData('comment', nl2br(strip_tags($comment)));
    $this->getOnepage()->getQuote()->save();
    }

    In order to display the comments in the admin panel add the following code at the end of this file:
    app\design\adminhtml\default\default\template\sale s\order\view\info.phtml

    <?php $order = $this->getOrder();?>
    <div class="entry-edit">
    <div class="entry-edit-head">
    <h4 class="icon-head"><?php echo $this->__('Comment') ?></h4>
    </div>
    <fieldset>
    <?php echo nl2br($order->getComment()); ?>
    </fieldset>
    </div>

    Comment


    • #3
      I would suggest to use FME Custom Checkout Attributes extension to add custom fields to the checkout page.
      By using this extension, you can not only add custom fields to checkout page but also add them to invoice email and shipping PDFs.

      Some of the key features include:
      • Add custom fields to checkout page
      • Add text fields, checkbox, radio buttons, etc,
      • Add custom fields in PDF
      • Add fields to invoice emails
      • Assign custom checkout fields to selected customer groups


      Read More: http://www.fmeextensions.com/magento...es-fields.html

      Comment


      • #4
        Adding custom fields to checkout or order page requires a lot of coding and more than one file needs to be modified. I have followed the following step by step tutorial which explains the changes need to be made and the coding solution. This tutorial has helped me a great deal and I hope it will help you too.
        Tutorial: How to add custom field to checkout page
        Last edited by HenryRoger; 28-07-16, 12:48 PM.

        Comment


        • #5
          Really nice information you shared.
          http://www.onlinevashikaran.com/blac...pecialist.html

          Comment


          • #6
            Originally posted by pace View Post
            How to add the custom fields to checkout page which can also be included/added to customer account & email including invoice & shipping PDF?
            Magento 2 Checkout Custom Field extension provides exactly as your request. It adds custom fields to the checkout page, include them in the order grid, invoice and email sent to customer.

            Custom fields in checkout page

            Custom fields in checkout page*
            Custom fields in invoice

            Custom fields in invoice*
            Custom fields in email

            Custom fields in email *

            Comment


            • #7


              You can check Magento 2 Custom Checkout Fields extension by FME. This module allows you to create additional custom fields on your checkout page in order to collect valuable information from your users. You can choose from 12 different types of fields to collect any type of information

              To check the step the step tutoruial for configuring this extension, visit our blog at:

              Magento 2 Add Custom Field to Checkout

              Comment

              Working...
              X