How to Add the Delivery Date Field on a Checkout Page in Magento

December 13, 2016 Artem Demidov Magento, Tips&Tricks
How to add the Delivery Date field on a checkout page in Magento

To add a new field on a checkout page you need to use the Dependency Injection mechanism. For that let’s add the file di.xml to the frontend configuration of the module. Here is the path to the file:

<VENDOR_NAME>/<MODULE_NAME>/etc/frontend/di.xml

The content of the file di.xml:

Next, we need to add the implementation of LayoutProcessorPlugin into the module by adding the following file:

VENDOR_NAME/MODULE_NAME/Model/Checkout/LayoutProcessorPlugin.php

Here is how the final implementation looks like:



Post a new comment