This feature allows you to display accurate delivery dates on your product page, together with a countdown clock of the cutoff time by which a consumer needs to place an order in order to receive it by a particular date.
The cutoff time for each delivery option is derived from the carrier service web cutoff that can be found at the end of the option's JSON result, e.g.
{
"groupCodes": [
"STANDARD"
],
"photoUrls": [],
"telephoneNumber": null,
"distance": {
"unit": "m",
"value": 0
},
"description": null,
"carrierServiceCode": "RMSECONDSTL",
"long": null,
"optionType": "HOME",
"storeName": "",
"shippingCharge": 3.00,
"lat": null,
"delivery": {
"from": "2020-03-14T08:00:00.000Z",
"to": "2020-03-16T17:00:59.999Z"
},
"address": "",
"carrierServiceName": "2nd Class Packet",
"postcode": "",
"fullName": "Royal Mail 2nd Class Packet",
"collection": {
"from": "2020-03-13T18:30:00.000Z",
"to": "2020-03-13T19:30:59.999Z"
},
"storeId": null,
"logoUrl": null,
"storeTimes": {},
"carrierCode": "ROYALMAIL",
"hasDisabledAccess": false,
"bookingCode": "RMSECONDSTL/2020-03-13/*-*/*/*-*",
"cutOffDateTime": "2020-03-13T18:00:00.000Z"
},
If, as in the above example, the returned options show a cutOffDateTime
of 18:00 hours, you can use this in a simple calculation to display a countdown clock to consumers. For example, 18:00 hours - current time = 3 hours and 21 minutes
(remaining to ensure next day delivery):
The display is of course dependent on how you design your front end.