Quoted a new client the other day for an install of the Date/Time chooser for deliveries, but with some added extras, namely;
Rule 1. Deliveries can only be selected from Tuesday to Saturday.
This took a small function to exclude sundays and mondays from the datepicker display.
Rule 2. Delivery slots are available only from 11am to 2pm
Subject to rule 1 days, and in 15 minute slots; 11, 11.15, 11.30 and so on. Fairly straightforward.
Rule 3. Delivery days can be booked upto 6 months in advance.
Rule 4. Delivery slot can only be booked for the next day if ordering before 8pm the day before.
If after 8pm, the earliest delivery is the day after next (subject to rule 1). 1 line of PHP deals with this.
Rule5. Time is to be determined based on New York time. The server is located in Texas.
1 line of PHP solves this.
So, I made it…
As I had some time free today, I coded this mod whilst waiting on the client to decide whether or not to accept my quotation.
osCommerce is probably not the best tool to use for taking orders (this modification is for a restaurant), but it can be made to act in any way needed, with some coding finesse.