Support for Ship Date Contribution

By | August 22, 2008

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 thoughts on “Support for Ship Date Contribution

  1. christoforos

    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. Gary Post author

    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. christoforos

    suddenly the popup for date choosed stopped opening.. i don’t know why.. untill know it was opening, but from yesterday it has stopped.. any idea?

  4. Gary Post author

    “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?

  5. christoforos

    no, i just moved this code (see below) on the footer.php (from the product_info).. :

    i moved this on footer to fix a bug of my site..

  6. christoforos

    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

  7. Gary Post author

    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.

  8. Gary Post author

    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 😉

  9. veena

    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.

  10. Gary Post author

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

  11. Thomas

    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.


  12. Gary Post author

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

  13. Mephii

    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?

  14. Gary Post author

    What you need to have is a module created to your specification which can be expensive. If you wish to explore that, please feel free to email me on

  15. Mephii

    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.


  16. danfeld

    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.

  17. Gary Post author

    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?

  18. Dan Feld-Jakobsen

    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 ..

  19. jose

    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


  20. roger

    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.

  21. Gary Post author

    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.

  22. James

    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.



  23. Gary Post author

    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?

  24. jose

    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

  25. Centauri_b

    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

  26. Gary Post author

    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.

  27. Michael

    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

  28. Maano


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


  29. Gary Post author

    Maano – search for “noWeekends” in the code 😉

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

  30. Maano


    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?


  31. Gary Post author

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


  32. Maano


    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?


  33. Gary Post author

    It would be in the jquery code on checkout_shipping.php – remove this:

    minDate: ‘1d’,

  34. Will

    Hi Garry,

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

  35. Gary Post author

    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

  36. Meoff

    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.

  37. Vic

    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 …

  38. Gary Post author

    Hi Vic

    I can’t remember working on Dans store, I’m pretty sure I never did. Happy to have a look for you in return for a few beers – to get me on email.


  39. Malin

    Any hints for the, DB update show 0000-00-00 00:00:00?
    I have the same problem.

  40. Chris

    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!

  41. BarneyMac

    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?


  42. Gary Post author

    Make sure you pass all 3 dates thru the session.

  43. Gary Post author

    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

  44. Mike

    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?

  45. Chanel

    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?

  46. Gary Post author

    Make sure the date function in osC is unchanged from normal.

  47. eranga

    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 ?

  48. Neil Hesman

    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.


  49. Gary Post author

    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.

  50. Steve

    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.