| Project: | Delivery time slots for Ubercart |
| Version: | 6.x-1.0-beta4 |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | mogtofu33 |
| Status: | needs work |
Issue Summary
testing beta3 i found the following:
- delivery timeslot pane does not show up in checkout till an address is selected / added. didn't dig the code, but it seems due to shipping quote not having (yet) do its job. imho a more sensible approach would be to show always the pane (if enabled) with an appropriate message if delivery timeslot can not be showed ("this shipping method does not allow delivery timeslot selection" or an invite to fill address and shipping, depending on situation). even better would be to put the timeslot selection table directly in the shipping pane, and visualize it when needed (a refresh on quote calcolation is already happening). i feel that having a pane appearing during the process can confuse the customer.
- past periods are still selectable. i.e. today at 3pm i can still select timeslot for today morning. i would recommend that period shall be selectable only from now() + $configurable_time_offset
Comments
#1
Hi,
This function has been set on new release : 6.x-1.0-beta4
- Iadd an option on checkout pane settings to display delivery pane by default.
- Your second suggestion is more difficult, because there is no "real timeslot", they are just text. I found it more "user friendly", because you can choose to display what you want to your customer. But i can't hide selection from now(), there is no timeslot, only free text...
I add an option on checkout pane to choose first day of selection.
Regards.
Mog.
#2
concerning 2nd comment, what about something like:
<?php
function _uc_deliverytimeslot_check_future($date, $timeslot, $offset) {
$timeslot_edges=explode('-',$timeslot);
$start_timeslot=$timeslot_edges[0];
$start_timeslot_details=explode(':',$start_timeslot);
$start_timeslot_hour= $start_timeslot_details[0];
$start_timeslot_min= $start_timeslot_details[1];
$timestamp = mktime($start_timeslot_hour,$start_timeslot_min, 0, $date['month'], $date['day'], $date['year']);
$now=time()+$offset*60;
if ($timestamp > $now) { $check = TRUE; } else { $check = FALSE; }
return $check;
}
?>
timeslot format: hh:mm-hh:mm
offset in minutes
btw i know it's not a patch, just some code to show the general idea. :)
#3
concerning visible by default option there is a problem:
if i use a shipping method that does not require delivery timeslots, after "Calculate shipping cost" pane checkout is broken.
#4
#5
here is a patch that address #2
as said timeslot format shall be hh:mm-hh:mm and offset is in minutes
admin option for setting offset is missing ftm
#6
here a second patch that change the behaviour of the checkout panel according to my request.
again no configuration menu has been changed (force display should not be necessary any more)
please let me know if you plan to adopt these patches.
#7
Thanks for the patch, but i think it's not a good idea to force timeslot format in a free textfield.
I will set a new way to handle timeslot, each timeslot will have label and time, so there will be no input error.
Regards
Mog.
#8
Can you elaborate a bit more? I'm not able to understand your point.
Btw take care that patch at #5 and patch at #6 are different, in spite of the file name that is the same, and can be adopted independently.