Add Delivery Instructions
Hi,
Thanks for this wonderful extension. Although I have few queries to extend the module. How can I achieve below
- Can we add more than one input area? For example along with order comments, user also needs to add delivery instructions, delivery date&time, etc.? What changes I can do in the module to add more custom fields on checkout page?
- Can we change the location of order comment input area to be displayed after all payment methods and above discount code? Or is there any configuration to change the position of the comments input in the checkout?
- How can we disable comments in the backend on the order grid? It should only appear in order view page
- Do the order comments appear in order confirmation email sent to user?
- How can I change the default text
Do you have any comments regarding the order?
Thanks.
hi @Vikram0811
Thanks for your interest in this module. Since you're asking how to extend the module I'll assume you're a developer.
Can we add more than one input area? You could, but it's going to be a lot of work to do so. This extension wasn't designed with this in mind, so you're going to have to change a large portion of the extension, as you'll also need to add code to save the data.
To display your fields you can override form-content.html To send the entered data to the server you can override model/checkout/order-comment-validator.js To parse your data on the server you're going to have to change every class from Api/ and every class Model/ except the source model. You'll need an setup upgrade script to add your columns in the database. You'll need to change the observer to pass on your data from the quote to the order object. After that you need to add appropriate changes to display them somewhere in the backend.
Can we change the location of order comment input area
the location is defined in the layout file within the before-place-order node. You could change the location to some other node that automatically renders it's children. billing-step > children > payment > children > afterMethods > children might be the node that you want to use. Refer to the magento discount code checkout_index_index.xml. You're also going to have to update the form var in model/checkout/order-comment-validator.js with the new location.
How can we disable comments in the backend on the order grid?
you can toggle the visibility with the columns button on the grid

Do the order comments appear in order confirmation email sent to user? refer to issue #6 to add the comment in the order confirmation mail.
How can I change the default text Do you have any comments regarding the order?
You can change this text by using the translation feature of magento. You should be able to use this to do english to english translations.
Hi,
I have one change to do on this extension.
- How can I add a calendar with order comments, so that customer can select order delivery date and that gets saved with order comment?
Thanks