Skip to content

Magento 2 Delivery Date Manual

Delivery Date Cover

Introduction

Magento 2 Delivery Date lets you optimize your delivery mechanisms by smart distribution of your delivery resources. With the extension, you can let customer choose the desired delivery date and time intervals. Also, you can set limits to eliminate the possibility of the shipments overbooking on the chosen day. It allows to define the correct and appropriate orders delivery schedule and exclude some special days (like holidays, days off etc).

Requirements and Installation

Delivery Date extension supports both Community and Enterprise edition of Magento starting from version 2.2. The current version of Magento installed on your website can be found in the lower right corner of any backend page.

Magento 2 Version

Delivery Date extension has 3 separate ways of installation: via local Composer, by copying the code or using our repository.

Installation Via Composer

  1. Create a folder anywhere on your server (preferably not in the Magento installation directory). Put the zip archive into this folder.

  2. Use any SSH client to connect to your server. Navigate to the root Magento folder. Bear in mind that the user should write permissions to this folder and its subfolders.

  3. Add the folder with the extension's archive as a repository. For this, run the Composer command:

    composer config repositories.mageworx artifact {/ABSOLUTE/PATH/TO/FOLDER}
    

    like

    composer config repositories.mageworx artifact /mageworx/extensions/zip
    

    This command will add these lines to your composer.json file

    "mageworx": {
        "type": "artifact",
        "url": "/mageworx/extensions/zip"
    }
    
  4. Perform the command:

    composer require mageworx/module-deliverydate
    
  5. Clear the compiled code and the cache:

    php bin/magento setup:upgrade
    php bin/magento cache:flush
    php bin/magento setup:static-content:deploy
    
  6. To update the extension via composer perform the command:

    composer update mageworx/module-deliverydate
    

    Installation by copying the code

  7. Download the extension's package from your customer account, unzip it.

  8. Use any SSH client to connect to your server. Bear in mind that the user should write permissions to this folder and its subfolders.

  9. Upload all the files and folders from the extension's package to the root Magento folder.

  10. Via SSH, navigate to the root Magento folder and perform the command:

    php bin/magento module:enable MageWorx_DeliveryDate
    
  11. Clear the compiled code and cache:

    php bin/magento setup:upgrade
    php bin/magento cache:flush
    php bin/magento setup:static-content:deploy
    

Installation Using Our Repository

You can use our Repository for extension installation as well.

Delivery Options

The extension allows you to configure the delivery date functionality in your store through the delivery options. It gives you the possibility to configure the available delivery dates for different customer groups, store views or shipping methods separately. It can be usefull if you need to configure the available delivery dates or time intervals differently for different shipping carriers. If you do not need to separate the delivery date configurations, you can create one delivery option and assign it to all customer groupes and shipping methods.

To create, edit, disable or delete the delivery options, log into the Magento Admin panel and go to STORES ⟶ MageWorx Delivery Date ⟶ Delivery Option.

Delivery Date

Please note that during the initial setup this grid will be empty.

The Filters tab allows for using the standard Magento filters functionality to easily find the necessary delivery option.

To create a new delivery option, click the New Delivery Option button.

The workspace consists of 3 tabs: General, Limits and Holidays.

General

Delivery Date

  • Enable Delivery Option - the store owner can temporarily disable the extension by putting this toggle to No.

  • Delivery Option Title - you can specify the name of the delivery option. This title will be visible in the back-end only.

  • Store View - this setting allows you to assign the delivery option to specific store views. It can be useful if you need to configure differently the available delivery dates for different websites or store views.

  • Customer Group - this setting allows you to assign the delivery option to specific customer groups. It can be useful if you need to configure differently the available delivery dates for different customer groups, i.e. to give additional date or time slots for your VIP or wholesale customers.

  • Working Days - this setting lets you define the days available for the delivery. If no days are selected, the extension behaves as if all the days have been picked. Note that in this case the days without the delivery will be hidden on the Limits & Time Intervals tab.

  • Disable Same Day Delivery after - this time sets the time, after which the same day delivery will be unavailable. The website time will be used for this. The extension supports the AM/PM input here.

Delivery Date

  • Shipping Methods Limit - this drop-down allows you to choose whether you want to assign this delivery option to all your shipping methods or to specific ones. If the Specific Methods setting is selected, the Shipping Method appears below this field.

The Shipping Method allows choosing the method(-s) to show the added delivery option for.

  • Processing Order Period - this setting defines the number of days the store owner needs to process the order delivery. So if you need one day to process your orders and ship them, 1 should be written here. This field should be left blank if the shipment goes on the same day.

  • Max Delivery Period - this setting allows you to restrict the future dates as the delivery dates for your customers.

  • Active From and Active To - these dates define the period when the particular delivery date should be working on the front-end.

  • Sort Order - this setting gives the possibility to set the desired sort order for the Delivery Option. It might be necessary if there are several delivery options with the same configuration. The option with higher priority will work in this case.

Limits & Time Intervals

This section allows you to add the available time intervals for your deliveries and to set the limits and extra charges for each time interval if necessary.

First, you should select the setup of the "Delivery Quotes & Time Intervals Scope".

Global (Unlimited)

Delivery Date

This setting might be used if you do not have any orders limits. The "Extra Charge" fields allow you to set a price globally for your deliveies or an extra charge for specific time intervals. If you specify the global extra charge and the extra price for the specific time intervals, the charge for the specific time interval will be used on the front-end if selected.

Per Day

Delivery Date

If you have any daily limits for the number of your deliveries, you can choose the "Per Day" option. It adds the "Daily Quote" limit for the whole day and the "Quote Limit" for each time interval. Daily Quote is more important here so even if the time quote is not fully booked and the daily is, the customer won't be possible to select this day for the delivery. The daily limit will be the same for all your working days.

Per Day of Week

Delivery Date

This setting provides the possibility to give different quotes limits for different days. The days that are enabled in the previous section will be shown. Once you choose this option, you will be able to configure the daily limits and time intervals for every day of week. The daily limits and the extra charges are explained above (for the "Global" and the "Per Day: options) Delivery Date

Holidays

Delivery Date

This tab allows the store owner to set up the desired days to be excluded from the delivery (like holidays, days off etc).

It is possible to set each month option for some particular date so that this date won't be available in each month or set the annual option for some official holidays that happen each year.

Queue Grid

To view the delivery queue, log into the Magento Admin panel and go to STORES ⟶ MageWorx Delivery Date ⟶ Delivery Option.

Click the Select in the Action cell of the delivery option and choose the View Queue Grid option:

Delivery Date

This leads you to the calendar and the grid workspace. The calendar allows checking ±30 days from the current date for the delivery options. By default, all the delivery records are shown below it. To limit the grid to some particular orders from the timeframe, find the date and click on the time. The numbers inside the brackets show the occupied and the full number of the available delivery slots during this period of time. For the sake of convenience, the current date is shown in the blue circle.

Delivery Date

Order Delivery Info

Orders Grid

The extension adds the "Delivery Date" & the "Delivery Comment" columns to the Magento 2 orders grid to give you the possibility to see the chosen delivery date right from the orders grid:

Delivery Date

Order View

The delivery information is provided for any order. If the customer makes the order and fills the delivery date and time information, it will be shown in the order information.

Delivery Date

You can edit this information by clicking the Edit button:

Delivery Date

Extension Configuration

Log into the Magento Admin panel and go to STORES ⟶ Configuration ⟶ MAGEWORX ⟶ Delivery Date. The extension configuration has 2 tabs: Delivery Date Configuration and Frontend Configuration.


Delivery Date Configuration

Delivery Date

  • Enabled - this setting allows you to temporarily disable the extension by selecting No.

  • Allow Delivery Queue Overloading - it provides the possibility for the returned customer to be able to finalize the order with the specified date/time or not, if the limits are exceeded by the posterior customers.

  • Delivery Queue - this setting determines whether the deliveries queue should be used for all delivery options (Global) or separate for each one (Per Delivery Option). If you use one delivery configuration (option) for your store, keep this setting to "Global". If you need to set the deliveries queue running for each delivery option separately, you should choose "Per Delivery Option" here.

  • Display Comment Field on the Checkout - you can add the comment field on the Checkout. This field allows your customers to add some notes that may be important to make a delivery.

  • Comment Field Label - this field allows you to change the title of the comment field visible for your customers. You can translate it to different languages by switching the store views here.

  • Delivery Date Required - this option allows you to make the delivery date required for each order.

  • Pre-select Delivery Date - this setting automatically pre-selects the next available delivery date on the checkout.

Frontend Configuration

Delivery Date

  • Date Display Mode and Time Interval Mode are designed for the layout of the delivery date and time options on the checkout: the radio buttons, drop-down or inside the boxes (buttons). The calendar view (default) for the date picker is available as well.

Delivery Date

This example shows the frontend layout for the drop-down and the button views

  • Display today and tomorrow as words - this setting changes the dates to the direct words: the current date will be changed to Today while the next one will be shown as Tomorrow. The website time will be used for this.

This setting is not applicable to the calendar date mode.

  • Date Format - this setting manages the view of the date according to the local standards: Delivery Date The custom date format is supported as well: Delivery Date

  • Time Intervals Label Template - this setting determines the format how the time intervals are shown on the front-end. It supports variables, such as {{from_time_24}}, {{to_time_24}}, {{from_time_12}}, {{to_time_12}} where the 12/24 at the ending means a time format. When the 12-hours format is used, the time will be displayed with the AM/PM suffix.

  • Delivery Date Title - this field allows you to change the title of the date field on the checkout. Leave it empty if you need to hide the title at all.

  • Delivery Time Title - this field allows you to change the title of the time fields on the checkout. Leave it empty if you need to hide the title at all.

Products Restrictions

The extension allows you to define the products that allow your customers to choose the desired delivery date on the checkout. It can be useful if you have specific items that cannot have the delivery date option on the checkout, like the products with the pre-order feature.

To enable this functionality you need to set the setting "Enable Delivery Date Restriction" to "Yes" in the extension's configuration.

Once it's done, you can change the attribute "Allow Delivery Date" on the product level to set what products allow the delivery date feature and what items block it.

If mixed items are added to the cart, the delivery date feature will be hidden. It will be available on the checkout if all products in the cart has this attribute set to "Yes".

Estimated Delivery Date

The extension allows you to display the estimated delivery period right on the product page.

Product Configuration

The extension allows you to enable/disable the display of the estimated delivery info for each product separately. You can also configure the available delivery periods differently for every product as well. To configure this information for the products, go to the Delvery Options tab while editing the products.

  • Display Delivery Date - this setting displays the estimated delivery info on the product page.

  • Estimated Delivery Period: From - this value determines the minimum delivery period, when the product can be shipped.

  • Estimated Delivery Period: To - this value determines the maximum delivery period, when the product can be shipped.

Configuration

Log into the Magento Admin panel and go to STORES ⟶ Configuration ⟶ MAGEWORX ⟶ Delivery Date ⟶ Estimated Delivery Date by Products.

  • Use the minimum product Delivery Time - this setting filters the available delivery dates on the checkout using the from / to delivery values from the product level. If it is set to Yes, the system will use the from value and filter the available delivery dates on the checkout using it. The extension uses the "Processing order" period as well to filter the available dates on the checkout.

Examples:

  • if a product has 2 days minimum delivery period set in the "from" field on the product level and the processing order period is set to 0 (i.e. the same day delivery is available). In this case the next available date on the checkout will be the day after tomorrow: current date + 2 days.

  • if a product has 2 days minimum delivery period set in the "from" field on the product level and the processing order period is set to 3 (i.e. you need 3 days to process the order and ship the products). In this case the next available date on the checkout will be: current date + 3 days + 2 days.

  • if a product has 0 days minimum delivery period set in the "from" field on the product level and the processing order period is set to 2 (i.e. the same day delivery is available). In this case the next available date on the checkout will be today: current date + 0 days + 0 days.

  • Estimated Delivery Text - this field specifies the message that is shown on the product page if the estimated delivery is enabled to be displayed on the front-end. This field supports the variables: {{days_from_number}} / {{days_to_number}} to display the from / to values set on the products.

  • Same Day Delivery Text - this field allows you to specify a different message if the same day delivery is available for the product. This message is triggered when the from value is set to 0 on the product level. This field supports the variables: {{days_from_number}} / {{days_to_number}} to display the from / to values set on the products.

  • Next Day Delivery Text - this field allows you to specify a different message if the next day delivery is available for the product. This message is triggered when the from value is set to 1 on the product level. This field supports the variables: {{days_from_number}} / {{days_to_number}} to display the from / to values set on the products.

Front-end experience

You can check some examples, how the estimated delivery can be shown on the product page:

Estimated delivery template using from value only Delivery Date

Estimated delivery template using from and to values Delivery Date

Same day delivery message Delivery Date

Next day delivery message Delivery Date

Checkout experience

The extension adds the delivery date & time selection to the shipping method step. The available dates are filtered once a shipping method is selected/changed to reflect the correct avaialble dates with limits per each shipping method.

The layout mode depends on the "Date Display Mode" and the "Time Intervals Display Mode" settins in the configuration.

This is the example of the "Calendar" + "Dropdown" mode:

Delivery Date

The delivery fields are fully responsive and displayed beautifully on the mobile:

Delivery Date

Customer account

The selected delivery date & time and specified comment are shown in the order view in the customer account. The extension also allows you to enable the feature for your customers to change the delivery date & time before the order is shipped.

To enable this you should go to STORES ⟶ Configuration ⟶ MAGEWORX ⟶ Delivery Date ⟶ Delivery Date Configuration and enable the setting Allow Customers to change Delivery Date. Once it is enabled, there will be the "Change" link below the delivery information in the order view:

Delivery Date

The customers can change the previously selected delivery date & time and choose any other avaialble slots. The dates and time periods are shown using the same algorithms as on the checkout, i.e. all the rules and limits are used here as well.

If you have the dates and time periods with the extra charge, these slots are hidden as the available ones if the customers want to change the delivery information. However, you can show these slots as well if you enable the setting "Display the dates with extra charge". Please note that switching to the dates with the extra charge won't change the order totals and it won't charge the customers accordingly. You should procees with these charges manually.

The customers can change the delivery date & time using the beautiful and user-friendly display mode:

Delivery Date

The Save action will save the new date for the particular order.

API Support

The Delivery Date web API provides the developers with the means to use the web services that communicate with the Magento system. The list of the Delivery Date API commands can be observed in the webapi.xml file located in app/code/MageWorx/DeliveryDate/etc/. Note that the supported API requests need the admin authorization.

Get the Order Delivery Date by Order ID

The extension supports Magento 2 standard API to retrieve the details for specific orders.

Request Format

GET /V1/orders/{order_id}
Example:

GET /V1/orders/68

Response JSON example

 "extension_attributes": {
                            "delivery_day": "2019-05-08",
                            "delivery_hours_from": "12",
                            "delivery_minutes_from": "31",
                            "delivery_hours_to": "14",
                            "delivery_minutes_to": "55",
                            "delivery_comment": "Please call me before the delivery.",
                            "delivery_time": "12:31_14:55"
                        }

Display the delivery slots in 3rd party front-ends

The extension allows you to retrieve the available & occupied delivery dates & time slots for certain quotes, even created in 3rd party front-ends (like during the mobile apps checkout).

Request format

GET /V1/delivery_date/{quote_id}/{advanced_flag}
The "advanced_flag" can be 0 or 1. If it is set to 0, the request will return the available delivery date & time slots only. If it is set to 1, the request will return the available AND occupied delivery date & time slots. It might be helpful if you need to disable the unavailable dates as well.

Example:

GET /V1/delivery_date/2/1
GET /V1/delivery_date/2/0

Response JSON example

[
    {
        "entity_id": "1",
        "name": "Default Delivery Configuration",
        "methods": null,
        "is_active": "1",
        "sort_order": "1",
        "future_days_limit": "3",
        "start_days_limit": "0",
        "active_from": null,
        "active_to": null,
        "limits_serialized": {
            "default": {
                "time_limits": [
                    {
                        "from": "12:00",
                        "to": "13:00",
                        "quote_limit": "",
                        "extra_charge": "",
                        "position": "1",
                        "record_id": "0",
                        "initialize": "true"
                    },
                    {
                        "record_id": "1",
                        "from": "14:00",
                        "to": "21:00",
                        "quote_limit": "",
                        "extra_charge": "",
                        "position": "2",
                        "initialize": "true"
                    },
                    {
                        "record_id": "2",
                        "from": "10:00",
                        "to": "11:00",
                        "quote_limit": "",
                        "extra_charge": "",
                        "position": "3",
                        "initialize": "true"
                    },
                    {
                        "record_id": "3",
                        "from": "09:00",
                        "to": "10:00",
                        "quote_limit": "",
                        "extra_charge": "",
                        "position": "4",
                        "initialize": "true"
                    },
                    {
                        "record_id": "4",
                        "from": "08:00",
                        "to": "09:00",
                        "quote_limit": "",
                        "extra_charge": "",
                        "position": "5",
                        "initialize": "true"
                    }
                ],
                "daily_quotes": "",
                "extra_charge": "",
                "active": "1"
            },
            "sunday": {
                "daily_quotes": "",
                "active": "0"
            },
            "monday": {
                "daily_quotes": "",
                "extra_charge": "",
                "active": "0"
            },
            "tuesday": {
                "daily_quotes": "",
                "extra_charge": "",
                "active": "0"
            },
            "wednesday": {
                "daily_quotes": "",
                "extra_charge": "",
                "active": "0"
            },
            "thursday": {
                "daily_quotes": "",
                "extra_charge": "",
                "active": "0"
            },
            "friday": {
                "daily_quotes": "",
                "extra_charge": "",
                "active": "0"
            },
            "saturday": {
                "daily_quotes": "",
                "extra_charge": "",
                "active": "0"
            }
        },
        "holidays_serialized": [],
        "shipping_methods_choice_limiter": "0",
        "working_days": "sunday,monday,tuesday,wednesday,thursday,friday,saturday",
        "cut_off_time": "23:00",
        "quotes_scope": "1",
        "store_ids": [
            "0"
        ],
        "customer_group_ids": [],
        "day_limits": [
            {
                "active": true,
                "available": 0,
                "reserved": 0,
                "date_formatted": "Today",
                "status": "available",
                "time_limits": [
                    {
                        "from": "12:00",
                        "to": "13:00",
                        "extra_charge": ""
                    },
                    {
                        "from": "14:00",
                        "to": "21:00",
                        "extra_charge": ""
                    },
                    {
                        "from": "10:00",
                        "to": "11:00",
                        "extra_charge": ""
                    }
                ]
            },
            {
                "active": true,
                "available": 0,
                "reserved": 0,
                "date_formatted": "Tomorrow",
                "status": "available",
                "time_limits": [
                    {
                        "from": "12:00",
                        "to": "13:00",
                        "extra_charge": ""
                    },
                    {
                        "from": "14:00",
                        "to": "21:00",
                        "extra_charge": ""
                    },
                    {
                        "from": "10:00",
                        "to": "11:00",
                        "extra_charge": ""
                    },
                    {
                        "from": "09:00",
                        "to": "10:00",
                        "extra_charge": ""
                    },
                    {
                        "from": "08:00",
                        "to": "09:00",
                        "extra_charge": ""
                    }
                ]
            },
            {
                "active": true,
                "available": 0,
                "reserved": 0,
                "date_formatted": "July 20, 2019",
                "status": "available",
                "time_limits": [
                    {
                        "from": "12:00",
                        "to": "13:00",
                        "extra_charge": ""
                    },
                    {
                        "from": "14:00",
                        "to": "21:00",
                        "extra_charge": ""
                    },
                    {
                        "from": "10:00",
                        "to": "11:00",
                        "extra_charge": ""
                    },
                    {
                        "from": "09:00",
                        "to": "10:00",
                        "extra_charge": ""
                    },
                    {
                        "from": "08:00",
                        "to": "09:00",
                        "extra_charge": ""
                    }
                ]
            },
        ],
        "method": "tablerate_bestway"
    }
]
, where everything before the "day_limits": [ row is the configuration of the current delivery option. The response after this row is the information for the calculated delivery slots for the certain cart quote. The available row shows the limit for the particular date (unlimited in the example above). The reserved row means the number of placed orders for the particular date.

If you need to calculate the number of orders, that can be placed for particular date, you should just deduct the reserved value from the available number.

The status means the current status of the delivery date. If you use the advanced flag in your API request, you might see the unaavailable dates as well. It might be helpful if you need to display available and unavailable dates in your custom front-end.

The time_limits displays the available time periods for each date.

Got Questions?

MageWorx offers FREE lifetime support and updates for any extension developed for Magento. Need help with the extensions? Feel free to submit a ticket from https://www.mageworx.com/support/

MageWorx offers outstanding services developing custom-tailored solutions for Magento platform to attain your eCommerce objectives. Our professional impassioned team provides profound and custom oriented development of your project in a short timeframe.