
Originally Posted by
Child_Of_The_Mind
mrmeech,
I see that a few others were wondering along with me if you had per chance had the time to add a time select option to your wonderfully made calander. Thanks again for your work!
Friends!! A whole page and a half of responses happened and i didn't receive a notification of a new post until today!!! How that happend, i have no clue. But it's the truth!
Anyway, i DO have a variation with a time feature that will work, but is NOT implemented in the best way.
Here's the 2 cents of background on why the time part is little "ghetto-implemented": Basically when i went to do this i COULD NOT get the javascript to consistently merge the date with the time and have it insert into the database as a "datetime" record. I ran into huge problems with the fact that the zen's checkout uses css buttons combined with a function to call/create the "continue" button image. Additionally, when i went to use a pre-made date and time picker javascript object, i couldn't get that to work either. Forgive me!!
I will attach the package as is, which should work (provided you don't have any other checkout mods already installed). In it you will see commented out code from when i was feverishly trying to get a smooth datetime feature working.
You are going to have to add times to the array - currently there is just 12:30 and 1:30, and the format must be in 24-hour format. You'll see when you get there. You can find it on the includes/templates/YOUR_TEMPLATE/template/tpl_checkout_shipping_default.php. It's around line 140 and looks like this:
Code:
<!-- Bof Order Delivery Date -->
<fieldset class="shipping" id="delivery_date_details">
<legend><?php echo TABLE_HEADING_DELIVERY_DATE; ?></legend>
<label for="delivery_date_details">Date:</label>
<input readonly="readonly" id="date" name="order_delivery_date_day" type="text">
<select id="order_delivery_date_time" name="order_delivery_date_time">
<option value="">Select Delivery Time</option>
<option value="12:30:00">12:30pm</option>
<option value="13:30:00">1:30pm</option>
</select>
</fieldset>
THIS IS IMPORTANT:
BACK UP YOUR DATABASE FIRST!!!
If you have this installed already, you will need to alter the zen_orders table in the database. You *SHOULD* be able to just rename the row "order_deliver_date" to "order_delivery_date_day" and change the type from datetime to date. (I'm *pretty sure* this will preserve the date data, but don't hold me to it!) Then you need to add another row called "order_delivery_date_time" and make the type as just "time".
The SQL file is attached, which should work if you haven't installed the Mod yet at all.
And finally, KEEP THIS IN MIND: A number of months ago i read (i think) Ajeh's (who is a zen cart official) response to someone asking when the next version of zen cart (1.4) will be out, and the answer was basically some time before the end of december 2008 - WHICH IS VERY SOON (assuming they are still on track). Although not in their roadmap, it is likely that the checkout code will be changed.
Because of the 48kb limit on file uploads i had to split/zip up the package.
Make a folder called includes and decompress the following in there: Classes.zip, languages.zip, modules.zip, templates.zip
Let me know how this works out for everyone. 