LokiCheckout_DeliveryDate

Jump to User Docs

Shipment
Professional
Standard
PHP 8.2 - 8.5
Magento 2.4.6 - 2.4.9
CSP Yes
Unit Tests 20
Integration Tests 84
PHPStan 1
Magento PHPCS 8
License OSL-3.0
Latest Release 1.0.4

This Magento 2 module is an add-on package to the LokiCheckout.

Installation

Install this package via composer:

composer require loki-checkout/magento2-delivery-date

Next, enable this module:

bin/magento module:enable LokiCheckout_DeliveryDate

We strongly recommend to use the Loki_Flatpickr module for adding a better date selection.

Exclusions and timeslots per region

Exclusions and timeslots can be limited to a country, a region (code or name) and postcodes. Exclusions can also be limited to a store view. The postcode field accepts a comma-separated list of:

  • exact postcodes (3743KJ, spaces and case are ignored);
  • wildcards (37*, 3743??);
  • ranges with bounds of equal length (3000-3999, 3743AA-3743ZZ). Numeric ranges compare the leading digits of a postcode, so 3000-3999 matches 3743 KJ. Entries with bounds of different length (00-950, 12345-6789) are exact postcodes.

Commands

All commands use the prefix loki-checkout:delivery-date:. The holiday import was renamed from loki:delivery-date:import-holidays to loki-checkout:delivery-date:import-holidays:

bin/magento loki-checkout:delivery-date:import-holidays NL 2027
bin/magento loki-checkout:delivery-date:exclusion:create --type=date --date=2027-04-27 --store=1 --postcode=3000-3999

Admin permissions

The admin grids and forms check the ACL resources LokiCheckout_DeliveryDate::exclusions_view, exclusions_save and exclusions_delete (and the same for timeslots_*), also for their AJAX requests. This requires Loki_AdminComponents with support for save_acl_resource and delete_acl_resource.

Upgrading from 1.0.x

The table loki_checkout_delivery_date now has a unique key on quote_id. If older versions created more than one row for the same quote, bin/magento setup:upgrade fails. Remove the duplicates first, keeping the newest row per quote:

DELETE d1 FROM loki_checkout_delivery_date d1
JOIN loki_checkout_delivery_date d2 ON d1.quote_id = d2.quote_id AND d1.entity_id < d2.entity_id;

Current status

pipeline success

Support

For getting support, create an Issue under the following project URL:

https://gitlab.yireo.com/loki-checkout/LokiCheckout_DeliveryDate.git

Configuration Options

The following options of this module can be configured via the Store Configuration:

General Settings > Enable Delivery Date
loki_checkout_delivery_date/general/enabled
General Settings > Date Field Label
loki_checkout_delivery_date/general/date_label
General Settings > Date Display Format
loki_checkout_delivery_date/general/date_format
General Settings > Minimum Days Ahead
loki_checkout_delivery_date/general/min_days_ahead
General Settings > Maximum Days Ahead
loki_checkout_delivery_date/general/max_days_ahead
Timeslot Settings > Enable Timeslot Selection
loki_checkout_delivery_date/timeslot/enabled
Timeslot Settings > Timeslot Field Label
loki_checkout_delivery_date/timeslot/label
Timeslot Settings > Timeslot Options
loki_checkout_delivery_date/timeslot/options
Holiday API Settings > API Provider
loki_checkout_delivery_date/holiday/provider
Holiday API Settings > Holiday API Key
loki_checkout_delivery_date/holiday/api_key
Loki Components

The following LokiComponents are created or references in this module:

loki-checkout-delivery-date.shipping.delivery-date loki-checkout-delivery-date.shipping.delivery-date.date loki-checkout-delivery-date.shipping.delivery-date.timeslot loki-checkout.shipping.address.country_id loki-checkout.shipping.address.postcode loki-checkout.shipping.address.region loki-checkout.shipping.address.select loki_delivery_date_exclusion.form loki_delivery_date_exclusion.grid loki_delivery_date_timeslot.form loki_delivery_date_timeslot.grid
Module Dependencies

The following dependencies are declared in the module its `etc/module.xml` file:

LokiCheckout_Core Loki_AdminComponents Loki_Base Loki_Components Loki_CssUtils Loki_FieldComponents Magento_AdminNotification Magento_Backend Magento_Catalog Magento_CatalogInventory Magento_Checkout Magento_CheckoutAgreements Magento_Cms Magento_Config Magento_Csp Magento_Customer Magento_Directory Magento_Eav Magento_Indexer Magento_MediaGalleryUiApi Magento_Newsletter Magento_Payment Magento_Quote Magento_Rule Magento_Sales Magento_SalesRule Magento_SalesSequence Magento_Shipping Magento_Store Magento_Tax Magento_Theme Magento_Ui Magento_User Magento_Variable Magento_Vault Magento_Widget Yireo_CspUtilities
Composer details
Magento module name
LokiCheckout_DeliveryDate
Composer name
loki-checkout/magento2-delivery-date
Composer version
1.0.4
Default branch
main
Requirements
ext-json: *
ext-pcre: *
loki-checkout/magento2-core: ^2.3
loki/magento2-admin-components: ~0.6
loki/magento2-base: ^1.1
loki/magento2-components: ^2.2
loki/magento2-css-utils: ^1.0
loki/magento2-field-components: ^2.2
magento/framework: ^103.0
magento/module-backend: ^102.0
magento/module-config: ^101.2
magento/module-directory: ^100.4
magento/module-quote: ^101.2
magento/module-sales: ^103.0
magento/module-store: ^101.1
php: >=8.2 <8.6
psr/log: ^1.0 | ^2.0 | ^3.0
symfony/console: ^5.0 | ^6.0 | ^7.0
Releases
1.0.4 11 November 2026
1.0.3 11 November 2026
1.0.2 11 November 2026
1.0.1 11 November 2026
1.0.0 11 November 2026
Changelog

[1.0.4] - 06 November 2026

Added

  • Scope exclusions to store views and match postcode lists, wildcards and ranges
  • Check view, save and delete ACL resources in the exclusion and timeslot grids and forms

Fixed

  • Rename loki:delivery-date:import-holidays to loki-checkout:delivery-date:import-holidays
  • Show unknown weekday values in the exclusion grid
  • Create the default timeslots on install
  • Rewrite timeslot commands for timeslot fields
  • Add timeouts, status checks and duplicate detection to holiday imports
  • Do not break the sidebar when the selected timeslot was deleted
  • Show delivery date and timeslot label on order pages, order emails and order lists
  • Block orders with an unavailable delivery date and only log real linking errors
  • Save the earliest delivery date, reject invalid dates and allow clearing the fields
  • Match exclusions and timeslots on region code or name and cache them per address
  • Store one delivery date row per quote and save single values atomically
  • Calculate excluded dates within the delivery window, including whole date ranges
  • Allow zero minimum days, default to an existing holiday provider and encrypt the Holiday API key
  • Require admin login and ACL for holiday import and timeslot mass delete
  • Add trim() its second argument for PHP 8.6 compatibility

[1.0.3] - 08 August 2026

Fixed

  • Loosen constraint with Loki Admin Components

[1.0.2] - 09 June 2026

Fixed

  • Allow field labels to be read from config (with layout-based fallback)

[1.0.1] - 19 May 2026

Fixed

  • Prevent type error when timeslot is still empty
  • Fix grid settings

[1.0.0] - 15 May 2026

  • Initial release
  • Add proper value validation
  • Make sure all date exclusions are properly dealt with by Flatpickr
  • Make sure to properly instantiate flatpickr options
  • Split up date and timeslot into separate Loki Components
  • Finish importing dates from date provider
  • Add OpenHolidays API
  • Add Dutch translations
Jump to User Docs

Last modified: June 1, 2026