Forums / Managing Customers and Orders / Order Delivery Date Support Thread

Order Delivery Date Support Thread

Views: 163,004

Results 541 to 545 of 545
22 Sep 2024, 2:53 AM
#541
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

Order Delivery Date Support Thread

nicksab:

@royaldave

How are your changes to the plugin working for you?

I am looking for another options for my "delivery date" options on my site. As mentioned in my earlier post, I am using a jquery datepicker that displays on the product page ( via attribute text option). However, the whole cut-off time is driving me nuts. I can t figure out how to have it works on my time zone as opposed to local time. I am PST time and my cut off is 1 PM but if someone try to order from Europe or else, the date options changes based on their local time.

Back to this plugin, can it be displayed on product page instead of checkout? Can a cut-off time be specified that would work on my local time as opposed to user?

Hope this makes sense.

Thank you

My changes are working great for me, but I don't take time into account. Yes, thanks to the international date line I've had people in the US order things for "yesterday", but I take no shame in being unable to provide the impossible. People need to use common sense.

That said, I do believe it is possible to pass the timezone to the datepicker

https://stackoverflow.com/questions/28053858/how-can-i-set-a-timezone-in-the-jquery-datetimepicker

22 Sep 2024, 4:37 AM
#542
nicksab avatar

nicksab

Totally Zenned

Join Date:
Apr 2011
Posts:
592
Plugin Contributions:
0

Re: Order Delivery Date Support Thread

royaldave:

My changes are working great for me, but I don't take time into account. Yes, thanks to the international date line I've had people in the US order things for "yesterday", but I take no shame in being unable to provide the impossible. People need to use common sense.

That said, I do believe it is possible to pass the timezone to the datepicker

https://stackoverflow.com/questions/28053858/how-can-i-set-a-timezone-in-the-jquery-datetimepicker

Thanks for sharing the link. I did came across it while looking. I don t know anything about code so it got even more confused.

I did look at an option of using moment to specify a time zone based on the following post:

https://stackoverflow.com/questions/49373327/jquery-datepicker-showing-dates-after-cutoff-time

I tried with a sample product but it is hard to tell if it works while trying to spoof my IP to a different location.

My issue is the opposite of yours. :-(

For example:

I am on PST time (California) and my cut-off is 1 PM for same day delivery.

Someone in New York ( EST time) want to place an order for delivery. However, they can t pick today because it is 2 PM for them but it is only 11 AM my time ( store location). It getsmore problematic for Canada, Europe....

I understand potential customer could still call to place their order but in today's world, it is all online.

To my other question,

Is there away to have the calendar display on product_info page? instead of the checkout page.

Thank you

26 Sep 2024, 4:23 AM
#543
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

Re: Order Delivery Date Support Thread

nicksab:

Thanks for sharing the link. I did came across it while looking. I don t know anything about code so it got even more confused.

To my other question,

Is there away to have the calendar display on product_info page? instead of the checkout page.

Thank you

I'm not aware of any plugins that do this.

A simple way to do this though would be to add an Option Name to your products of 'Delivery Date'. It would simply be free form text where a requested delivery date can be entered. Obviously there's no verification though.

One solution might be to add an Option Name type of 'date' to Option Name Manager. And then you insert your datepicker code when it comes up - this would eliminate the need to add a date field to relevant Product tables.

23 Jul 2025, 1:20 AM
#544
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

Re: Order Delivery Date Support Thread

v2.8 of this plugin is now available.

this version made with the zen cart 2.1.0 file set. That said this should work for versions back to 1.5.8 - just be careful with the file merges.

Most importantly, this version uses a new calendar tool - jquery datetimepicker. the previous calendar tool relied on the mootools library to function, and unfortunately it's presence caused some disfunctionality. as it has not been updated for many years an update to a later mootools library was not possible as a solution. the older calendar did offer more functionality, for example the ability to enter a range of dates to blockout (now you'll need to list each one individually), but aside from that you should be able to run your zen cart reliably with this version.

Added Delivery Date to Account/Account History Info

And this works with one page checkout 2.5.4 - and probably any older version.

23 Sep 2026, 9:22 AM
#545
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

Re: Order Delivery Date Support Thread

I needed a bit of extra functionality this week so quickly coded something which I'll share in case its of use to anyone else.

Essentially I don't want to offer delivery for a couple of dates this week, however am still happy to accept orders for store pickup.

To achieve this -

Add a couple of lines like this to the define in lang.order_delivery_date -

'PICKUP_ONLY_DATES' => '["25/09/2026","26/09/2026"]',
'PICKUP_ONLY_MESSAGE' => 'Unfortunately your selected date is unavailable for delivery due to AFL Grand Final commitments. However Store Pickup is still available.',

Then in auto.order_delivery_date_observer add this code to the end of the function updateNotifyHeaderEndCheckoutPayment(&$callingClass, $notifier) -

// "delivery date" may be blocked, but we will allow store pickup
    if ( ($_SESSION['shipping']['id'] != 'storepickup_storepickup0') && (defined('PICKUP_ONLY_DATES'))  ) {
      if (strpos(PICKUP_ONLY_DATES, zen_date_short($GLOBALS['order']->info['order_delivery_date'])) != NULL ) {
        $GLOBALS['messageStack']->add_session('checkout_shipping', PICKUP_ONLY_MESSAGE, 'error');
        zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
      }
    }

This will bump the user back to checkout shipping displaying an error message stating the date might well be blocked out but you can change your delivery method to store pickup if you want to go ahead.