Grocery, flowers, furniture, gifts: many stores need customers to choose when an order arrives. Magento 2 has no delivery date at checkout out of the box. Adding one is a common request, and doing it properly touches more places than the date picker.

What a complete delivery date feature needs

  1. Somewhere to store it: a column on the quote table while the customer is checking out, and on sales_order once the order is placed. Declare both in your module’s db_schema.xml.
  2. A field at checkout: a UI component added to the shipping step through checkout_index_index.xml, usually a date picker plus an optional time slot.
  3. Saving it with the shipping information: add it as an extension attribute of the shipping address information, send it with the shipping information request, and save it to the quote with a plugin on Magento\Checkout\Model\ShippingInformationManagement::saveAddressInformation.
  4. Copying it to the order: an observer on sales_model_service_quote_submit_before copies the value from the quote to the order.
  5. Showing it where your team works: the admin order view, the order grid if you filter by delivery day, and the packing or shipment documents.
  6. Showing it to the customer: in the order confirmation email and in My Account order details.

Rules you will need

  • Earliest date: today, tomorrow or a number of days ahead, so the warehouse has time to prepare.
  • Latest date: how far ahead customers can book.
  • Closed days: weekly days off and public holidays.
  • Time slots: optional or required, with your own labels.
  • Cut-off time: after a certain hour, the earliest date moves forward by a day.

Details that are easy to miss

  • Validate on the server. A date picker only limits what the browser offers. Check the date and slot again on the server when the order is placed, or a modified request can book a closed day.
  • Time zones. Calculate “today” and the cut-off in the store’s time zone, not the server’s or UTC.
  • Store views. Different store views may deliver on different days, or use different languages for the slot labels.
  • Payment redirects. If a payment method sends the customer to an external page and back, make sure the date is already saved on the quote before the redirect.
  • Reorders and admin orders. Decide what happens when an order is created from the admin or reordered.

Build it or use a module

Building it is a good exercise in Magento’s checkout architecture, but it touches the database, checkout JavaScript, plugins, observers, admin layouts and email templates, and all of it has to keep working through upgrades. Many stores add it together with a checkout improvement instead. See Magento 2 one page checkout for the options.

A ready-made option

One Page Checkout for Magento 2 arranges Magento’s own checkout on one page: address, delivery and payment together, with the order summary beside them. Because Magento’s components stay underneath, payment and shipping extensions keep working. It includes delivery date and time slots, order comments, an admin-configurable layout and design, and right-to-left support with Arabic. See One Page Checkout for Magento 2.

Related fixes