Helpcenter +918010117117" [email protected]
B4,309-10 Spaze iTech Park, Sector 49, Sohna Road, 122001 Gurgaon India
call to replace anchor tags contains '/admin' in href

How to add delivery time option on checkout?


You want to add a delivery time option on the checkout so that your customers can select a time for delivery.



To add a delivery time option at checkout, you can enable time option on the checkout. For providing calendar on the checkout page, you need to add calendar widget. To do so, you are required Order Option form and then add the calendar widget to your store. Follow the below-mentioned steps:

Creating Order Option form

  1. Go to Site  Forms section in StoreHippo Admin Panel.
  2. Click on Add new to create the Order option form.
  3. Provide the name of the form as 'order_option'.
  4. In the order options form, create a field for delivery_time.
  5. Enter label as 'Select Delivery Time' and name as 'select_delivery_time'.
  6. Select type as Widget.
  7. Click on the field settings icon next to type to edit the field. In the Widget field, enter the name of the widget (say "Calendar").
  8. Add options with the name as the delivery time slot (say 11 AM to 1 PM), in the value enter the lower time and the upper time limit separated by "-" (Say, 10-12).
  9. Click on Save to save the form.

    Adding Widget

  10. Go to StoreHippo Design Theme.
  11. Go to HTML section and click on Show all widgets.
  12. Click on Add new widget.
  13. Add new store widget, name it as "calendar" (mentioned above), add the below-mentioned code:

    <select class="form-control" ng-model="optionData[].value">
        <option value="">Please Select</option>
        <option ng-if="opt.value" ng-disabled="n >= opt.value.split('-')[0] && today_date==selected_date"
                ng-repeat="opt in option.settings.options" value="{{opt.value}}">{{}}
        <option ng-if="!opt.value" ng-repeat="opt in option.options" value="{{opt.value}}">{{}}


        $scope.today_date =  new Date(parseInt(window.serverTimestamp));
        var formatDate = function (date) {
            var d = new Date(date),
                month = '' + (d.getMonth() + 1),
                day = '' + d.getDate(),
                year = d.getFullYear();
            if (month.length < 2) month = '0' + month;
            if (day.length < 2) day = '0' + day;
            return [year, month, day].join('-');
        var d=new Date();
        $scope.n = d.getHours();
        $rootScope.getDateValue = function(opt){        if(!opt) return;
            $scope.selected_date = formatDate(opt);
            $scope.today_date = formatDate($scope.today_date);
            if ($scope.today_date != $scope.selected_date) {
                $scope.n = 0;
            else $scope.n = d.getHours();
            $scope.optionData[$].value = '';
            console.log('==opt==',$scope.selected_date , $scope.today_date,  $scope.n)
  14. Click on Save to save the widget.