Logic for the Shortest Date, Longest Date and Selectability

SUMMARY

shortest date (N days after the order date) = business days + cut-off push-back + calendar days + addition from the selection
Holidays → used only for the shortest-date calculation (they do not affect selectability)
Blockout dates / blockout weekdays → used only for selectability (they do not affect the shortest date)
Longest date → counted in calendar days (holidays are not skipped)

RULES

S-1  Counting starts with the order date (today) as day 0.
S-2  Business days are counted skipping holidays (dates and weekdays). If today is a holiday, the holidays up to the first business day are added too.
S-3  Calendar days are simply added, regardless of holidays.
S-4  Cut-off: if the current "hour" >= cutOffTime, +1 day. Not set (99) means disabled.
S-5  When at least one holiday is set, the +1 day of S-4 is applied as "shifting the day on which business days start being counted to the next day".
S-6  The current time is the time of the IANA time zone if the delivery settings have one; otherwise the time of the customer's browser.
S-7  When the customer selects an option (area), that option's business days and calendar days are added to the shortest date.
S-8  Longest date = order date + end days. But if "Calculate Maximum Delivery Date from Minimum Delivery Date" is ON, it is shortest date + end days.
S-9  Selectable dates = [shortest date, longest date] − blockout dates − blockout weekdays.
S-10 "Only on Specified dates" ON: within the range, only the specified dates and the allowed weekdays can be selected.
S-11 If shortest date > longest date, there are no selectable dates (this happens easily with long-holiday settings).
S-12 When several groups are mixed and "When items from multiple groups are added to the cart, use the shipping date settings for the multiple groups." is ON, only the intersection of the selectable dates of each group can be selected.

QA

  • Q: I set a day as a holiday, but it can still be selected. A: Holidays are for the shortest-date calculation (S-2). To make it unselectable, set it as a blockout date (S-9).
  • Q: I want holidays counted in the number of days of the longest date. A: Not possible. The longest date is counted in calendar days (S-8).
  • Q: The shortest date moved one day later when I ordered in the afternoon. A: It depends on the cut-off time setting (S-4). Check the cut-off time.
  • Q: I want Saturdays and Sundays not to be selectable. A: Set them as blockout weekdays. If you also want the business-day count of the shortest date to skip Saturday and Sunday, set the same weekdays as holidays too (S-2, S-9).
  • Q: The calendar has no selectable date at all. A: Check in order: (1) shortest date > longest date (S-11) (2) no common date between groups (S-12) (3) the specified dates are empty (S-10).
  • Q: An order was placed with a date before the shortest date. A: Do not assert (ESCALATE).

ESCALATE

SituationInformation to request
A specific product or date cannot be selected / can be selectedStore URL, product URL, products in the cart, date and time (clock time) of the order
An order was placed with a date before the shortest dateOrder number, order date and time, products in the cart, browser used
The delivery date is not kept on the order / is emptyOrder number, the combination of products put in the cart

SEE

Install