Support for Ship Date Contribution

This is the support thread for the soon to be released “Club osCommerce Ship Date” Contribution.

This contribution is quite an easy install, only affecting the following files:



Also, 1 small change in the database. And a few extra files to control the javascript.

Very easy to install, but as with all my contributions, I offer a guaranteed install service.

65 Replies to “Support for Ship Date Contribution”

  1. i want to ask you, can i change the format of the date? i want to do it 25/08/2008 , day/month/year.. That is the format we use in Greece, and i am afraid that if the popup calendar doesn’t open to some customers for any reason, then that will be a problem..

  2. Chris – yes, it’s possible to change, but only with some extra coding when getting the inputted date. The format it is in now, is correct for in sertion into the database (and consequently the correct format for the date functions in oscommerce).

  3. “any idea?” – i’d have to look at your code to give you an idea, and that is not free 😉

    Suggestion: date chooser is javascript – have you turned it off in your borwser.
    Suggestion: is the relevant files still at your webspace (the .js files that are called by the page).
    Suggestion: have you messed about with the code to try to get the correct date format – and broken it?

  4. link rel=”stylesheet” href=”lightbox.css” type=”text/css” media=”screen” /
    script type=”text/javascript” src=”js/prototype.js”>
    script type=”text/javascript” src=”js/scriptaculous.js?load=effects,builder”></script

    i took out now the because i saw that in my last post they didn’t appear those lines

  5. If you want me to have a look and find a fix I can do. It’ll cost you anywhere between a beer and a six pack of beer 😉 Email me.

  6. Support does not work that way.

    I need to make investigations as to why this is happening, and for that I need to log in your ftp, view your files. Once I can ascertain what’s wrong, I can think up a fix and let you know a cost. You won’t be charged anything that you are not 100% aware of.

    Please stop posting your error message – it’s not needed and not helpful 😉

  7. i get the following error:
    ‘$.datepicker is undefined
    (?)()()checkout…814946838 (line 65)
    to the wait list jQuery.readyList.push()()jquery-latest.js (line 1937)
    (?)()()jquery-latest.js (line 1961)
    each()([function(), function()], function(), undefined)jquery-latest.js (line 585)
    ready()()jquery-latest.js (line 1960)
    [Break on this error] beforeShowDay: $.datepicker.noWeekends’
    if i insert the date picker code in checkout_shipping.php file in oscommerce.

  8. Looks like a conflict somewhere – are you using any other javascript libraries in your website (eg scriptaculous) – maybe for a lightbox or whatever.

  9. Hi,
    can anyone tell me the changes that have to be made to the checkout_process.php so that the delivery date is also shown on the confirmation e-mail ?

    Thank you for any help in advance.


  10. Thomas – I thought it was already shown, but I could be mistaken. I’ll try to find time to take a look for you.

  11. Hey!
    I’m stuck with one thing about the delivery date chooser.
    I already have the calendar working fine along with sending values to database.

    What I need is an option to pick the time period (out of 4) from particular day instead of the whole day.
    Second thing is the limit of deliveries for each time period. This would need to inform (hide/show the time period) the user about the availability of each time period.

    Similar solution can be found on .. actually they have exactly the thing I need.

    Would You be able to tell what changes need to be made to achieve this?

  12. Thanks for Your reply and advice.

    I think, after spending a bit of night trying to solve that, I can tell I’m fast on my way to achieve that goal.
    After all, the thing with the limit of deliveries for each time period wasn’t as difficult to set up (with insert/update of a seperate table created specifficaly for calendar and ‘shipdates’).
    Although the check for availability might appear a pain it the *** since there are few other checks before showing the calendar already (e.g. target day, saturday/sunday options etc.).

    Nevertheless, I’m sure I can do that! So a new module isn’t necessary.


  13. Hi!.
    I’m trying to use the “delivery_date” fix on a OsCMax shop .. (heavily modded Oscommerce) with no success in sight, looking my eyes dry and tearing my (or what’s left of it)hair out … I just can’t figure it out … I’ve done the patching (using ‘Winmerge’) and followed your guide ….. could sure need a little hand coded help .. ;o)

    From Denmark.

  14. Hi Dan – I’m not familiar with oscmax, so it is possible that something else in the oscmax distribution would be conflicting. I don’t mind installing for you (or at least having a try), though I would charge you some “beers” for me to do so. It might be an idea for you to ask in the oscmax forums?

  15. Hi Gary.

    Thank you for replying so fast ..
    Yes it could be a conflict between the mod an the contribution … unfortunatly I’m not a php shark and able to actually read an understand the code, it’s a good portion af guessing and hoping when I’m installing it.. ;o)
    I would like you to help me installing the contribution and I’m ready to fill your fridge with “beer” .. You just tell me how we do it .. and what you need ..

    Dan ..

  16. Hi Gary,

    I just installed your coding into my test site in order to check the behaviour of the changes.
    Everything runs ok except the jabvascript date picker which doesn’t show up.
    Perhaps I didn’t copy the javascript files to the correct target directory of osCommerce ?
    I put them in the www/admin/includes/javascript folder…

    Could you give me some guidance about it ? It would be great.
    Many thanks


  17. Date picker not updating MySQL DB, All data’s showing up to catalog/checkout_confirmation.php as below,

    Preferred Delivery Date (Edit)
    Sunday 30 November, 2008

    but no DB update show 0000-00-00 00:00:00, so account history preferred delivery date also empty

    your comment/suggestions on this issue will be appreciated.

  18. Jose – I’m guessing you realised that you uploaded the js files to an incorrect folder. If that was not the solution please post back?

    Roger – sounds like you have not added the code that actually inserts the chosen date into the database.

  19. Hey Gary,

    I was wondering whether it would be possible for me to use multiple date choosers, such as a use date, collect date, and return date instead of the delivery date and if so, would it be a simple case of duplicating entries in the files or something a bit more advanced.



  20. James – I don’t know the answer without actually trying it – and I don’t have enough time in the day, sorry 🙁

    Maybe you could have a poke around in the code and see what you can come up with?

  21. Hi Gary,

    Sorry for this late answer. You are right, I erroneously uploaded the js file into a wrong folder.
    My confusion was due to the fact that the osCommerce installation I use has the “javascript” file name and not “js”…
    It was easy to fix. 😉

    I have another question regarding this tool.
    Would it be possible to include “holidays” that would not be pickable by customers?
    I am trying to build a new osCommerce site where customers can order items and be directly delivered home through private drivers. However, deliveries can only be done on tuesdays, thursdays and saturdays.
    The idea would be to consider thes days as “holidays” (or same behaviour as a sunday… for example). This way, customers will only be able to select dates realted to these specific days of the week.

    Can you let me know if this is possible within this tool ?

    Many thanks for your info…

    Best regards

  22. I provide a hire service for Scottish traditional dress, so i need my customers to have the facility to let me know the date the wish to pick up their outfit, the date of their function, and the date they wish to return their outfit.

    I have tried on 2 occassions to add your shipping date chooser but it doesn’t seem to work.

    Please help

  23. Hi – this is for 1 date, not 3. Can be made to work with three fairly straightforwardly. If you would like a quote to make this work for what you require, please contact me by email for a discussion and costing.

  24. Hi, can i know how do make chages to the year range(starting year from 1900)? i am using it for create account page, on date of birth. Thanks

  25. Hi

    I want to make saturday and sundays selectable too as the user can select to deliver on any day. What changes should i make?


  26. Maano – search for “noWeekends” in the code 😉

    Michael – this is not the right script for years. You would be better to use something different…

  27. Hi

    Thanks for the previous help. I can now successfully enter the date in the database. But still have a problem:

    In admin area, I can see the title “Preferred Delivery Date” on Order’s page but the date does not appear. Can you tell what can be wrong?


  28. “Very easy to install, but as with all my contributions, I offer a guaranteed install service.”


  29. Hi

    I want the user to be able to select the same day date too for same day delivery. Date picker does not allow same day selection. What should i change?


  30. Hi Garry,

    I’m I wrong or there’s no instalation instruction for already modified website in this package?

  31. Hi Will – I rarely supply instructions for modified stores. I’m thinking that people with modified stores know enough about osc to do what they need, or they can pay me to install 😉 Cheers, Gary

  32. I’m getting the same problem that Roger had below, where the database is not being written / storing the chosen date. I’ve gone square eyed trying to figure out how to solve it, and did’t see any answer posted before to Roger’s query.

    Can you help to explain where this could be going wrong?

    Date picker not updating MySQL DB, All data’s showing up to catalog/checkout_confirmation.php as below,

    Preferred Delivery Date (Edit)
    Sunday 30 November, 2008

    but no DB update show 0000-00-00 00:00:00, so account history preferred delivery date also empty

    your comment/suggestions on this issue will be appreciated.

  33. Hi Gary:

    There was a thread by Dan in Nov 16 2008 about installing this contribution on OscMax. Where you able to make this run for him on OscMax?

    I was able to install all mods to my OscMax site. The problem I am getting is that the Calendar is not showing up on the checkout_shipping.php page. Can you please some info to what might be causing this problem or how to debug it.

    Thanks …

  34. Thanks for the nice contribution! Had to add a few lines of code to stop errors I was getting:

    I had a problem when customer 1 placed an order and picked a date and checked out then customer 2 comes along and does not pick a date he gets customer 1’s date automatically. This is confusing for people, to fix I added this line in checkout_shipping.php:
    // ship date
    if (!tep_session_is_registered(‘delivery_date’)) tep_session_register(‘delivery_date’);
    add line:
    $delivery_date = ”;

    The other problem I got was when there was no date picked and the customer tried to checkout a mysql error would occur when checkout_process.php tries to insert ” into delivery_date field in the database (incorrect data for datetime). I fixed this by putting an if statement in checkout_process.php something like this: if ($order->info[‘delivery_date’] == ”) then remove ‘delivery_date’ from $sql_data_array. (not proper syntax)

    Next step is to develop form validation to force the customer to pick a date (have not done this yet).

    I have installed this contribution and made the time picker based on this contribution as well (it was easy!) and both works as they should, thanks Gary!

  35. Recently installed, had to amend to create 3 dates (as its a hire site) pickup date, function date and return date. Everything runs perfect ! date chooser in each section, and the order processes correctly. Amended sql to include three columns. but the data never seems to be added to the table. checked and rechecked files and all seems fine. what am i overlooking?


  36. BM – look at how it’s done in the original download, and follow suit for your other two dates. If you cannot get it working and you need a quote to fix, let me know by email oscshops AT

  37. I installed this successfully and changed “Preferred Delivery Date” to “Preferred Date”. Added to invoice and date is showing correctly. However, header reads “Delivery_Date” and not “Preferred Date”. How can this be corrected?

  38. Hi Gary,

    I was very excited when I found this contribution so I went ahead and installed it right away (osCommerce 2.2RCA).
    Weirdest thing is happening though, when I pick tomorrow as preferred delivery date it shows October 11, 2029 on the checkout confirmation page and the date is not even showing up in admin/orders.php or account_history_info.php…
    It isn’t being stored in the database either… What is your fee for installing/fixing this contribution?

  39. This works grate for me , thnx !!

    there is a requirement for disable specific date from calender ,
    Ex: National day
    Is it possible with editing js file or any ,how can i do it ?

  40. Hi Gary,

    I have installed the date picker option on this site and it works just fine on COD orders, but no date is passed when customers opt to pay by PayPal. I am sure I have missed something but don’t know what.

    Any pointers will be greatly appreciated.


  41. Hi Neil

    Depending on which paypal module you use, the paypal module uses it’s own version of checkout_process. You therefore need to add the shipdate stuff into the paypal module for it to be recorded in the database.

  42. Hi, I cannot get the SQL to accept edit to orders table.

    After edit it looks like this:

    SELECT * FROM `orders` WHERE 1
    ADD `delivery_date` DATETIME NOT NULL AFTER `delivery_address_format_id` ;

    Error message received:

    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ADD `delivery_date` DATETIME NOT NULL AFTER `delivery_address_format_id` LIMIT’ at line 2

    Please advise, thank you

Leave a Reply

Your email address will not be published. Required fields are marked *