-
Order Delivery Date Support Thread
This contribution will add a field during checkout where a customer can select the date which they would like a product to be delivered.
The requested delivery date will then appear on:
- Confirm Order Page
- Email sent to customer when order is processed
- In the Admin: Edit Order, Invoice, Packing Slip
- When you update the status of an order it will include the delivery date on the email generated to the customer (if you select to notify customer)
- On the main orders page in the Admin, there is a new table field that shows the requested delivery date
This is very helpful for stores with perishable items, such as food or flowers.
This contribution is based off of the "ship date and cancel date" contribution, and i would like to make sure credit goes to everyone that has worked on this before myself (I did my best to notate this in the files). There were a number of issues with the code in that contribution and they are aiming to make more of a "PO" contribution. I simply needed a solid delivery date feature for one of my stores, so i am putting the code up for everyone else to benefit.
This is my first contribution to the zen-cart community, and it is my way of saying thanks for all the help on the forums and giving back. I really believe in this project and am proud to offer what i can.
I will post a link to the contribution's download page once it is approved by the Zen Cart administrators. (I wanted to make this thread first so i could include it in the readme.txt file)
Let the journey begin!
-MrMeech
-
Re: Order Delivery Date Support Thread
This sounds great! Exactly what I was looking for for my personal gift store!
-
Re: Order Delivery Date Support Thread
The download link is now available:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=976
Please let me know how this works out for you - If the installation went smoothly, please let me know! Or, if you ran into any problems or have any suggestions, please let me know that as well.
Thanks! :smile:
-
Re: Order Delivery Date Support Thread
mrmeech,
Thank you for this contribution it is exactly what I was looking for. Installation went well although I did make a few changes to integrate with Ty's tracking module.
Thanks again!!:D
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
duffy
mrmeech,
Thank you for this contribution it is exactly what I was looking for. Installation went well although I did make a few changes to integrate with Ty's tracking module.
Thanks again!!:D
I'm glad it worked out for ya. :)
-
Re: Order Delivery Date Support Thread
This is a great addition! Thank you.
I have one question though. the site I'm working on offers same day delivery if they order before 10am. Is there any way that I can have it not have today's date listed after 10 am???
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
pinixdesign
This is a great addition! Thank you.
I have one question though. the site I'm working on offers same day delivery if they order before 10am. Is there any way that I can have it not have today's date listed after 10 am???
I just wrote some code for ya - Open up /includes/templates/YOURTEMPLATE/templates/tpl_checkout_shipping_default.php
Find this code (it's near the bottom):
Code:
<!-- Bof Ship Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo TABLE_HEADING_DELIVERY_DATE; ?></legend>
<select name="order_delivery_date">
<?php
for ($i=0, $n=50; $i < $n; $i++) {
$now[$i] = strtotime ("+$i day", time());
if ( strftime ("%w",$now[$i])<>0
AND strftime ("%m-%d",$now[$i])<>"12-25"
AND strftime ("%m-%d",$now[$i])<>"12-26"
AND strftime ("%m-%d",$now[$i])<>"01-01"
){
echo '<option value="'.strftime ("%Y-%m-%d",$now[$i]).'">'.strftime ("%A %d %B %Y",$now[$i]).'</option>';
}
}
?>
</select>
</fieldset>
<!-- Eof Ship Date -->
And replace it with this:
Code:
<!-- Bof Ship Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo TABLE_HEADING_DELIVERY_DATE; ?></legend>
<select name="order_delivery_date">
<?php
$current_time = (date("h:ia"));
$current_hour = (date("H")); // 24 hour time as two digits
$begin_cutoff_hour = '10'; // set on a 24 hour time clock
$end_cutoff_hour = '19'; // set on a 24 basis - "19" would be 7pm
$time_zone_adjust = '0'; // use this to adjust your hour value forward or backwards
$display_current_time = false; // Chage to "true" to check your system time for adjustments to $time_zone_adjust. Result will be echo'd to browser below ship date dropdown menu
$current_adjusted_hour = ($current_hour + $time_zone_adjust);
if($current_adjusted_hour <= $begin_cutoff_hour) {
$date_offset = '0';
}
else {
$date_offset = '1';
}
for ($i=$date_offset, $n=50; $i < $n; $i++) {
$now[$i] = strtotime ("+$i day", time());
if ( strftime ("%w",$now[$i])<>0
AND strftime ("%m-%d",$now[$i])<>"12-25"
AND strftime ("%m-%d",$now[$i])<>"12-26"
AND strftime ("%m-%d",$now[$i])<>"01-01"
){
echo '<option value="'.strftime ("%Y-%m-%d",$now[$i]).'">'.strftime ("%A %d %B %Y",$now[$i]).'</option>';
}
}
?>
</select>
</fieldset>
<?PHP
if ($display_current_time == true) {
echo "YOUR SYSTEM TIME IS $current_time";
}
?>
<!-- Eof Ship Date -->
Change $display_current_time to true to see if the time output by the server/browser matches your time zone, and then adjust $time_zone_adjust as needed.
Let me know if this works for ya..
-
Re: Order Delivery Date Support Thread
Thank you so much! It seems to be working great so far. I will test it tomorrow morning just to be sure. You are a life saver!
-
Re: Order Delivery Date Support Thread
Hi mrmeech,
Don't mean to be a pest but I think I broke something on my install of this mod and maybe you can direct me to a fix.
In an effort to change the display of the ship date I changed the code in the
/includes/templates/YOURTEMPLATE/templates/tpl_checkout_shipping_default.php
file.
On the line to print the date I changed the order of Y , m, d to m, d, Y. It seemed to work fine, at least it shows the correct date order in the drop down at check out and displays the correct date order on the confirmation page as well. I also made this change in the emails and it displays properly there too.
But now I'm getting the date of 11/30/1999 in the orders list on the admin side for all orders, regardless of date selected. Could you guide me to what I need to correct?? And since I'm NOT a programmer, perhaps my approach is completely wrong.:shocking:
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
duffy
Hi mrmeech,
Don't mean to be a pest but I think I broke something on my install of this mod and maybe you can direct me to a fix.
In an effort to change the display of the ship date I changed the code in the
/includes/templates/YOURTEMPLATE/templates/tpl_checkout_shipping_default.php
file.
On the line to print the date I changed the order of Y , m, d to m, d, Y. It seemed to work fine, at least it shows the correct date order in the drop down at check out and displays the correct date order on the confirmation page as well. I also made this change in the emails and it displays properly there too.
But now I'm getting the date of 11/30/1999 in the orders list on the admin side for all orders, regardless of date selected. Could you guide me to what I need to correct?? And since I'm NOT a programmer, perhaps my approach is completely wrong.:shocking:
Well, changing that line of code can actually cause it to be inserted into the database record incorrectly, so it doesn't surprise me that you would wind up with something awkward happening. You could have also broken the date array that generates the list of dates... anyway, do some reading here if you're interested in learning about dates and mysql databases (i'm a strong encourager of learning): http://www.tizag.com/mysqlTutorial/mysql-date.php
What is it exactly that you want to do? Have the dropdown display the year at the end instead of the beginning of each date value?
-
Re: Order Delivery Date Support Thread
mrrmeech,
Thanks for your prompt reply and the link to the date lesson. You know what they say about "...fools rushing in..." That would be ME.
Yes, I was just looking to get the date to display in the Monty/Day/Year format. Now that I've read the tutorial (should have done that first LOL) I see the problem.
Although it does not seem to have "broken" the drop down display it does not store as expected in the database. Would you suggest I just change it back to the proper Mysql format and live with it? That is learn the Year first format. LOL
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
duffy
mrrmeech,
Thanks for your prompt reply and the link to the date lesson. You know what they say about "...fools rushing in..." That would be ME.
Yes, I was just looking to get the date to display in the Monty/Day/Year format. Now that I've read the tutorial (should have done that first LOL) I see the problem.
Although it does not seem to have "broken" the drop down display it does not store as expected in the database. Would you suggest I just change it back to the proper Mysql format and live with it? That is learn the Year first format. LOL
I would change it back to how to the original file for now and i'll see if i can get you a new one to try in a day or so - i'm super slammed with work until tomorrow!
-
Re: Order Delivery Date Support Thread
Thanks mrmeech, I'll change it back. Don't go out of your way for a fix, it's really not a big deal, but your help is immensely appreciated!!
-
Re: Order Delivery Date Support Thread
Is this where the line forms behind duffy for the mm/dd/yy version?? :wink:
Definitely been waiting for this mod - thank you!
betty
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
bettysue
Is this where the line forms behind duffy for the mm/dd/yy version?? :wink:
Definitely been waiting for this mod - thank you!
betty
Quote:
Originally Posted by
duffy
Thanks mrmeech, I'll change it back. Don't go out of your way for a fix, it's really not a big deal, but your help is immensely appreciated!!
Try this out...
(Duffy, you *shouldn't* have any awkward date problems with this, but test it out and let me know)
You want to open up includes/templates/YOURTEMPLATE/templates/tpl_checkout_shipping_default.php and use this code near the bottom instead of what's there:
PHP Code:
<!-- Bof Ship Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo TABLE_HEADING_DELIVERY_DATE; ?></legend>
<select name="order_delivery_date">
<?php
for ($i=0, $n=50; $i < $n; $i++) {
$now[$i] = strtotime ("+$i day", time());
if ( strftime ("%w",$now[$i])<>0
AND strftime ("%m-%d",$now[$i])<>"12-25"
AND strftime ("%m-%d",$now[$i])<>"12-26"
AND strftime ("%m-%d",$now[$i])<>"01-01"
){
echo '<option value="'.strftime ("%Y-%m-%d",$now[$i]).'">'.strftime ("%B %d %Y (%A)",$now[$i]).'</option>';
}
}
?>
</select>
</fieldset>
<!-- Eof Ship Date -->
-
Re: Order Delivery Date Support Thread
Thanks mrmeech. I've implemented the code change and this generates a nice drop down for the date selection but when I get to the confirmation stage of order processing the date is again displaying in in the yyyy/mm/dd format. Do we need to make a similar change in the tpl_checkout_confirmation page?
duffy.
-
Re: Order Delivery Date Support Thread
Mrmech,
Awesome contribution. :clap:
Working beautifully on a 1.3.8a - with a few easy cutomisations it now works with my templates - waiting now to try and see how we go with implementing into superorders and other contributions :bigups:
I'll try and post my customisations with other contributions if they actually work well enough to post!!
I have really been wanting something like this that's stable and seems fairly easy to customise also.
**** So here's the question:
I have tried in vane to try and work out the date how to turn off Saturday - Sunday is off as default - but not sure which bit of code turns it off and how!!!
Could you please advise how to turn off Saturday as well as Sunday ( or I guess any day when I understand how it works).
Thanks you very much for putting this up and your support for it.
Max
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
duffy
Thanks mrmeech. I've implemented the code change and this generates a nice drop down for the date selection but when I get to the confirmation stage of order processing the date is again displaying in in the yyyy/mm/dd format. Do we need to make a similar change in the tpl_checkout_confirmation page?
duffy.
try updating these lines of code in your tpl_checkout_confirmation_default.php
PHP Code:
<?php // BEGIN Order Delivery Date ?>
<h3><?php echo TABLE_HEADING_DELIVERY_DATE; ?></h3>
<p><h4><?php echo zen_date_long($order->info['order_delivery_date']); ?></h4></p><br />
</div>
<?php // END ORder Delivery Date ?>
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
FuzzyBunny
Mrmech,
Awesome contribution. :clap:
Working beautifully on a 1.3.8a - with a few easy cutomisations it now works with my templates - waiting now to try and see how we go with implementing into superorders and other contributions :bigups:
I'll try and post my customisations with other contributions if they actually work well enough to post!!
I have really been wanting something like this that's stable and seems fairly easy to customise also.
**** So here's the question:
I have tried in vane to try and work out the date how to turn off Saturday - Sunday is off as default - but not sure which bit of code turns it off and how!!!
Could you please advise how to turn off Saturday as well as Sunday ( or I guess any day when I understand how it works).
Thanks you very much for putting this up and your support for it.
Max
Max,
Open up tpl_checkout_shipping_default.php. This code should do the trick:
PHP Code:
<!-- Bof Ship Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo TABLE_HEADING_DELIVERY_DATE; ?></legend>
<select name="order_delivery_date">
<?php
for ($i=0, $n=50; $i < $n; $i++) {
$now[$i] = strtotime ("+$i day", time());
if ( strftime ("%w",$now[$i])<>0
AND strftime ("%w", $now[$i])<>6
AND strftime ("%m-%d",$now[$i])<>"12-25"
AND strftime ("%m-%d",$now[$i])<>"12-26"
AND strftime ("%m-%d",$now[$i])<>"01-01"
){
echo '<option value="'.strftime ("%Y-%m-%d",$now[$i]).'">'.strftime ("%B %d %Y (%A)",$now[$i]).'</option>';
}
}
?>
</select>
</fieldset>
<!-- Eof Ship Date -->
-
Re: Order Delivery Date Support Thread
Mrmeech,
Still going strong on this great contribution.
I am trying to work out an admin side (in edit_orders.php currently) to this, which I can do with:
<!-- Begin Delivery Date Block -->
<hr>
<strong>Current Delivery Date: </strong><?php echo zen_date_long($order->info['order_delivery_date']); ?><br>
<strong>Reset Delivery Date to: </strong>
<select name="update_order_delivery_date">
<?php
for ($i=0, $n=365; $i < $n; $i++) {
$now[$i] = strtotime ("+$i day", time());
if ( strftime ("%w",$now[$i])<>0
AND strftime ("%w", $now[$i])<>6
AND strftime ("%m-%d",$now[$i])<>"12-25"
AND strftime ("%m-%d",$now[$i])<>"12-26"
AND strftime ("%m-%d",$now[$i])<>"01-01"
){
echo '<option value="'.strftime ("%Y-%m-%d",$now[$i]).'">'.strftime ("%d %B %Y (%A)",$now[$i]).'</option>';
}
}
?>
</select>
<?php echo zen_draw_separator('pixel_trans.gif', '50', '1'); ?>
<?php echo zen_image_submit('button_update.gif', IMAGE_UPDATE); ?>
<hr>
<!-- End Delivery Date Block -->
The issue is that in the pull down list the default is the next available day when I want the selected option in the list to be the order_delivery_date.
If the list doesn't default to the current order_delivery_date it runs the risk of someone updating the page and changing the delivery date to the wrong one.
I have played around with the code for ages trying to work out how to get it to do it and still keep the rest of the list the same (ie. from today to how ever many days out you have the $n value set to.
Alternatively, in your opinion, should something like this be written as a pop-up type add-on as opposed to inline code?
Any help would be greatly appreciated.
Thanks, Max
-
Re: Order Delivery Date Support Thread
I'm thinking that maybe the admin side to change or update the delivery date should be a button next to the order in the order list (like the 'e' on the orders screen or the 'i' or 'p' on the superorders screen).
So . . . like the 'i' button opens a new window, or in super orders has a new window pop-up inside the details screen for some functions.
Maybe a 'd' button to click, pop-up opens, select new date, press submit/update button, writes to database, refreshes screen with new date.
What are your thoughts on this mrmeech??? Trying to work out the best way to spend my efforts on seeing if I can get something up that everyone can benefit from.
Thanks in advance, Max
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
FuzzyBunny
I'm thinking that maybe the admin side to change or update the delivery date should be a button next to the order in the order list (like the 'e' on the orders screen or the 'i' or 'p' on the superorders screen).
So . . . like the 'i' button opens a new window, or in super orders has a new window pop-up inside the details screen for some functions.
Maybe a 'd' button to click, pop-up opens, select new date, press submit/update button, writes to database, refreshes screen with new date.
What are your thoughts on this mrmeech??? Trying to work out the best way to spend my efforts on seeing if I can get something up that everyone can benefit from.
Thanks in advance, Max
Max,
So basically you want to add functionality to the admin side of zen cart so that an administrator can update the delivery date?
I have never used the superorders contribution, but the edit_orders.php page sounds like that is part of it. Zen cart doesn't not natively have a php file with that name (that i know of). Is this correct?
As far as writing code to update the date goes, you don't HAVE to use the "for" loop code. The only thing the database cares about is that the format of the date is precisely what it expects (which is the "date" data type) when you update the database record. Personally i would stay away from popup windows simply because they are frequently blocked by the browser or other software. I have started casually looking into javascript date picking software to MAYBE replace the dropdown list on the order checkout -- maybe a javascript calendar could be part of the solution to the superorder functionality?
In a week or two i plan on starting work on the next revision of the Order Delivery Date contribution. In the mean time i have been dumping hours of time into getting a PHPList mod for ZC working. If you are able to get code for superorders to work let me know and i'll gladly include it in the update.
Let me know if there's anything else i can help with-
-
Re: Order Delivery Date Support Thread
mrmeech,
Thanks for your time. You are correct about the files.
The java thing sounds good as it gets away from a need for popups.
The list seems very good and is very configurable once you understand how to include or not include days. It makes it very clear to the customer which day they can select for delivery.
I was talking to my wife and she said it would probably be best having the ability to update the delivery date on the screen people use for editing or updating their orders - so I'm trying to make the code a simple cut and paste into the code for any screen people use to edit/update their orders.
***
So . . how do I set the <select> value in the pull down list? I want the <select> value to be the current delivery date, so that people don't accidentally update it to the wrong date. Once that is done the code should be able to be placed anywhere people want to use it.
***
Thanks again.
Max
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
FuzzyBunny
mrmeech,
...
***
So . . how do I set the <select> value in the pull down list? I want the <select> value to be the current delivery date, so that people don't accidentally update it to the wrong date. Once that is done the code should be able to be placed anywhere people want to use it.
***
Thanks again.
Max
Max,
I have been thinking about this for a day or so now (..sometimes i let answers come to me through osmosis or something.. sort of like the bathroom effect when you realize something during your shower...) anyway.. the dates in that FOR loop are rendered based on the NOW variable, which inputs the current local date. You should be able to change the $now variable to select the order delivery date from the order array info array. This is assuming you don't go the route of the javascript calendar. Let me know if what you think..
-
Re: Order Delivery Date Support Thread
Hey there mrmeech.
Still not really doing it for me - - unfortunately most of my osmosis on this matter seems to be in the reverse, so no matter how much I put into the code it seems to be getting less and less likely I can get it to work suitably in the admin side as a pull down list.
So . . how are you going with the java calander to add into the module? I like the pull down on the front end though! ;-)
Do you have something that seems OK and can be stuck into my pages to see how it goes? Better to work on the same thing then head off in different directions - if I get it OK on the backend may be able to add it to the package?
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
FuzzyBunny
Hey there mrmeech.
Still not really doing it for me - - unfortunately most of my osmosis on this matter seems to be in the reverse, so no matter how much I put into the code it seems to be getting less and less likely I can get it to work suitably in the admin side as a pull down list.
So . . how are you going with the java calander to add into the module? I like the pull down on the front end though! ;-)
Do you have something that seems OK and can be stuck into my pages to see how it goes? Better to work on the same thing then head off in different directions - if I get it OK on the backend may be able to add it to the package?
Sorry FuzzyBunny - I got off track this past week with work. (I am a freelance production guy in new york city and last week was insane. It's how i pay rent and eat!! And eating is certainly a priority.)
Where are you with everything? Did you work out any of your own code?
-
Re: Order Delivery Date Support Thread
I installed this mod then had to uninstall it when I found out that no one could get to order step 3 (in v1.37).
I think part of the problem was an install of the gift wrapping mod which this client didn't need but that came as part of another mod which I did need for this client (if my memory is right..which it may not be!).
Both the gift wrapping mod and the date mod use the same areas of code in some of the same files and I could not figure out completely how to make the two live happily together.
So I uninstalled the date mod and resumed with our former method of customer date specification for this client. Client is a florist and while the method is not fancy, so far it works until I can get yours to reside happily on her site.
We have it set up as an attribute in each product and it carries through very nicely into admin and into the email with the customers order so the florist knows the delivery date with no problem. We also have a second attribute set up for the greeting card.
I know our simple system won't help any of you coders, but thought I would mention it as one never knows what may spark a thought. Sometimes bigger and better ideas came come from the thoughts of simple minds!!
Here is an example of what this looks like in her store (and *I* didn't pick the colors in the store...the client did! lol):
http://www.desertroseflorist.com/ind...products_id=53
betty
-
Re: Order Delivery Date Support Thread
Hi MrMeech,
On the admin side I tried two java apps - including the one that is used elsewhere in the admin - and could get niether of them to work.
I tried using:
- Bazillyo's Spiffy DHTML Popup Calendar (the one used elsewhere in admin and couldn't get a result at all ??? Couldn't figure this one out, so re-visiting on the weekend after they (hopefully) grant me permission to go into their yahoo group to get more info. http://tech.groups.yahoo.com/group/spiffyDHTML/ The court is out for me on this one.
- http://www.mattkruse.com/javascript/calendarpopup/ - very similar app but a different function to get it to work - however the A HREF="#" function does not work with the forms on the admin side - resets/processes the whole page instead of calling the calendar - so no good here either.
The best way I see this functioning at this point is having the delivery date update work as a java pop-up itself (like some of the other admin contributions use to control 'elements' of the information. This way the list and the java apps may work and neither will have to default to the current delivery date when displayed so admin users won't 'accidentally' update the delivery date to the wrong one.
This is the updated list code, which has some updates to allow our shipping staff to update the delivery date historically, on weekends, etc as they need to do:
<!-- Begin Delivery Date Block -->
<hr>
<strong>Current Delivery Date: </strong><?php echo zen_date_long($order->info['order_delivery_date']); ?><br>
<strong>Reset Delivery Date to: </strong>
<select name="update_order_delivery_date">
<?php
$deliv_date = ($order->info['order_delivery_date']);
for ($i=-30, $n=365; $i < $n; $i++) {
$now[$i] = strtotime ("+$i day", time());
if ( strftime ("%w",$now[$i])<>"12-25"
AND strftime ("%m-%d",$now[$i])<>"12-26"
AND strftime ("%m-%d",$now[$i])<>"01-01"
){
echo '<option value="'.strftime ("%Y-%m-%d",$now[$i]).'">'.strftime ("%d %B %Y (%A)",$now[$i]).'</option>';
}
}
?>
</select>
<?php echo zen_draw_separator('pixel_trans.gif', '50', '1'); ?>
<?php echo zen_image_submit('button_update.gif', IMAGE_UPDATE); ?>
<hr>
<!-- End Delivery Date Block -->
** I have been looking at the php manual and tutorials online and trying to work out how to define the current delivery date and make that the default or selected day on the pull down list - so if the rest of the order is updated on a screen in 'editorders', 'superorder' or another admin contribution then the person updating the rest of the information own't change the delivery date UNLESS they actually change the delivery date pull down list.
** Pulling out my hair trying to get the current delivery date to default on the list, but I am learning quite a bit about php coding in the mean time (I used to run a html web site management company about 10 years ago and have been away from it for years, so have to work out what to do again!!)
So either we can work out how to get the current delivery date to be the default date displayed on the list . . . or . . . we put the list code above in a java popup and see how that goes . . that's my current line of thought at the moment.
Any suggestions or comments??
Thanks, Max
-
Re: Order Delivery Date Support Thread
Hey there betty,
I haven't got the giftwrap module, but do have some other modules that also were affected by the delivery date mod.
What I did was restore the old templates that were over written by the devliery date mod. The files that are in the delivery date mod are really well defined (thanks mrmeech and others) in the files and easy to find - the few bits of code from the few files that are updated just need to be added into the same files you don't want over written - this is REALLY easy and quick to do. Just investigate the zip file for the delivery date mod you downloaded.
We are wholesale flower growers and distributors, so don't need a wrap service, but otherwise a lot of the same requirements - ie. the delivery date!!!! ;-)
Hope this info helps, and I'm working on some added backend functionality with this also, which may be of use to you. I'll be posting anything good enough for others to use.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
FuzzyBunny
<!-- Begin Delivery Date Block -->
<hr>
<strong>Current Delivery Date: </strong><?php echo zen_date_long($order->info['order_delivery_date']); ?><br>
<strong>Reset Delivery Date to: </strong>
<select name="update_order_delivery_date">
<?php
$deliv_date = ($order->info['order_delivery_date']);
for ($i=-30, $n=365; $i < $n; $i++) {
$now[$i] = strtotime ("+$i day", time());
if ( strftime ("%w",$now[$i])<>"12-25"
AND strftime ("%m-%d",$now[$i])<>"12-26"
AND strftime ("%m-%d",$now[$i])<>"01-01"
){
echo '<option value="'.strftime ("%Y-%m-%d",$now[$i]).'">'.strftime ("%d %B %Y (%A)",$now[$i]).'</option>';
}
}
?>
</select>
<?php echo zen_draw_separator('pixel_trans.gif', '50', '1'); ?>
<?php echo zen_image_submit('button_update.gif', IMAGE_UPDATE); ?>
<hr>
<!-- End Delivery Date Block -->
Max!
Looks like you've been hard at work!
Is that code you've got written out above for the orders.php file on the admin side for when you are looking at the orders in the spreadsheet-like view? Or is that for when you are actually editing orders?
Also, i have to say, sorry for no response here this week - for all i knew, it was quiet on the support thread... but what really happened was zen cart stopped emailing the updates to the thread! Got it all fixed now, so that's good. I found a small issue with the mod when a paypal checkout is used but i can't figure out what exactly is causing it - i'm going to outline this in a post immediately following this one.
-
Re: Order Delivery Date Support Thread
Alright!! So, i've found a bug with Order Delivery Date that happens when a customer checks out with the Paypal Integrated Checkout method.
Basically, when the order email is generated upon successfully completing the paypal payment, the email define "EMAIL_TEXT_DELIVERY_DATE" is not translating to the value set in the language file. The delivery date still makes it to the email OK, but the email prints out as above: EMAIL_TEXT_DELIVERY_DATE
I just started looking into the issue, but if anyone has any idea what could be causing this, please let me know. I would venture to bet that this has to do with a paypal data array somewhere. As I don't have a comprehensive understanding of the data flow with PayPal, i might need someone else to point me in the right direction with this one...
It's gotta be something simple - 9 out of 10 times it is. :smile:
-
Re: Order Delivery Date Support Thread
mrmeech,
Thanks for your reply back on the 12th. Due to that email bug on the forums I only got it today. Your work here is greatly appreciated!!!
duffy
-
Re: Order Delivery Date Support Thread
FuzzyBunny,
You should take a look at this: http://www.garrett.nildram.co.uk/calendar/scw.htm
If you look at the demo you will see that one of your formatting options is to click on text to update the date and the javascript calendar will appear, which could possibly circumvent the problem you're having?
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
FuzzyBunny,
You should take a look at this:
http://www.garrett.nildram.co.uk/calendar/scw.htm
If you look at the demo you will see that one of your formatting options is to click on text to update the date and the javascript calendar will appear, which could possibly circumvent the problem you're having?
I have this calendar working
http://www.atcakes.com/index.php?mai...pointment_page
Very easy to adjust to what you need it for.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
ATC
This might seem like an obvious question, but is your example the same calendar solution as my link in my last post (The SCW calendar)? Or is it something else?
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
This might seem like an obvious question, but is your example the same calendar solution as my link in my last post (The SCW calendar)? Or is it something else?
No it is not. At first I thought it was after taking closer look I seen the differences it came from dhtmlgoodies.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
ATC
No it is not. At first I thought it was after taking closer look I seen the differences it came from dhtmlgoodies.
Ok, awesome! Thanks. I'm going to compare these two a little bit myself and then use one of them for the delivery date selection on the checkout.
Aside from being easy to customize, is there anything that the dhtmlgoodies offers that you've found to be extremely helpful over the one i suggested to Fuzzybunny? Can you turn off selection for an exact date? etc..
I really appreciate your input on this!
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
Ok, awesome! Thanks. I'm going to compare these two a little bit myself and then use one of them for the delivery date selection on the checkout.
Aside from being easy to customize, is there anything that the dhtmlgoodies offers that you've found to be extremely helpful over the one i suggested to Fuzzybunny? Can you turn off selection for an exact date? etc..
I really appreciate your input on this!
No but I found a weeky planner could be used for setting appointments I know someone was working on a mod for that. I forget where I saw the thread.
-
Re: Order Delivery Date Support Thread
Works like a charm~:clap:
Just one error fix:
includes/languages/english/Your_Template/checkout_process.php
This files is missing '?' on line 64 (to close PHP correctly.).
Change '>' on line 64 to '?>'.
Otherwise under some PHP environments it would return a blank page just after Checkout Confirmation is clicked (orders will not be received).
In the future, notes about rewrites of Zen Cart core files and edit instruction about them could complete the work...
Great work!!
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
SteveKim
Works like a charm~:clap:
Just one error fix:
includes/languages/english/Your_Template/checkout_process.php
This files is missing '?' on line 64 (to close PHP correctly.).
Change '>' on line 64 to '?>'.
Otherwise under some PHP environments it would return a blank page just after Checkout Confirmation is clicked (orders will not be received).
In the future, notes about rewrites of Zen Cart core files and edit instruction about them could complete the work...
Great work!!
Thanks SteveKim! I updated the file so it will be fixed in the next release of the Delivery Date mod. (The new version will have a customizable javascript popup calendar on the checkout instead of a dropdown list..) Additionally, i will keep in mind your request to better notate the code alterations that were performed.
-
1 Attachment(s)
Re: Order Delivery Date Support Thread
Hello Everyone!
Version 2 of Order Delivery Date is pending approval and should be posted to the downloads section very soon!
This version has a beautiful javascript popup calendar for the desired Delivery Date selection. I've attached a screenshot - take a look!
There is also a bugfix to close a PHP tag correctly.
Enjoy!
-
Re: Order Delivery Date Support Thread
Hello All,
And thanks MrMeech for this excellent contribution!
I installed v2 tonight and the only issue I am facing is that the Calender button is appearing twice next to the Date field.
I also have Gift Wrapping mod installed - so had to make some manual edits. Not sure if I screwed up something while making those edits. Any advice?
Thanks in advance. Below is the screenshot.
http://www.divani.cc/error/orderdelivery.jpg
The website is www.divani.cc if anyone wants to check.
Vab
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
divani
Hello All,
And thanks MrMeech for this excellent contribution!
I installed v2 tonight and the only issue I am facing is that the Calender button is appearing twice next to the Date field.
Divani,
Glad to hear that you enjoy the contribution. :smile:
When you are viewing the page with the dropdown calendar, do you find that only one of the buttons works? Or do they both work?
-
Re: Order Delivery Date Support Thread
MrMeech,
Only button on the left displays the calender. The one on the right doesn't do anything at all. Also, for the records, I don't see any other errors like Javascript etc.
Thanks again,
Vab
-
1 Attachment(s)
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
divani
MrMeech,
Only button on the left displays the calender. The one on the right doesn't do anything at all. Also, for the records, I don't see any other errors like Javascript etc.
Vab,
Try replacing includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_shipping_default.php with the one attached to my reply here (which will need to be unzipped, obviously)
Let me know if it fixes your problem and if so, i'll update the contribution.
-
Re: Order Delivery Date Support Thread
Yes, the new file fixed it. :clap:
Thanks a ton!
Vab
-
Re: Order Delivery Date Support Thread
-
Re: Order Delivery Date Support Thread
MrMeech,
I found one more issue. The Desired Delivery Date does not register properly. At the Order Confirmation page during checkout, it shows up as blank. See screenshot below.
http://www.divani.cc/error/oddcheckout.jpg
Then in Admin->Orders, it displays as 12/31/1969 17:59:59. See screenshot below.
http://www.divani.cc/error/adminorderspage.jpg
Same for Invoice and Packing Slip for that particular order.
http://www.divani.cc/error/oddinvoice.jpg
I tried the new includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_shipping_default.php and both with and without "Gift Wrap" contribution edits applied.
Thanks,
Vab
-
Re: Order Delivery Date Support Thread
Vab,
What version of Zen Cart are you using?
-
Re: Order Delivery Date Support Thread
Vab,
I think you should re-upload all of the files again. Be sure to delete them FIRST, before uploading. I can tell from one of your screenshots that you still had Version 1 files. Additionally, the gift wrap module also customizes the order.php file in the "CLASSES" folder, and there is vital information in there to make it work with the delivery date mod i have here. If the order.php file is incorrect, you will get blank fields, as you are experiencing.
So, bottom line: Carefully re-upload ALL of the version 2 files and let me know where you get.
-
1 Attachment(s)
Re: Order Delivery Date Support Thread
MrMeech,
I am using zen cart 1.3.8a. Order Delivery Date is v2 and this is the only version I ever installed on my zen cart installation. Besides, I merged changes with Gift Wrap modified files using WinMerge.
I just went through all the changes again, particularly admin/includes/classes/order.php and catalog/includes/classes/order.php.
The Gift Wrap module adds only a couple of entries to admin/includes/classes/order.php. So it wasn't difficult to merge.
The catalog/includes/classes/order.php, however, has a lot of modifications. Like I said, I used WinMerge to carefully merge changes. I am attaching three versions of catalog/includes/classes/order.php here. One from stock zen cart installation, second after installing Gift Wrap and third after installing Order Delivery Date. Maybe that'll help troubleshoot.
I'll look through all the file changes I made tomorrow morning and will post any new findings.
Thanks again,
Vab
-
Re: Order Delivery Date Support Thread
Vab,
Have you tried this with all "pure" delivery date files? ie: no merging or sharing files with the gift wrap mod, etc...?
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
Vab,
Have you tried this with all "pure" delivery date files? ie: no merging or sharing files with the gift wrap mod, etc...?
That's the next thing I am going to try...will let you know.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
divani
I'm actually getting the same odd checkout error, and the date comes over as Tuesday 30 November, 1999 rather than the date the customer enters.
The other error I get is a PHP error for the admin/orders.php page on line 818 saying zen_get_orders_comments is undefined.
I run no other mods, and this mod (Order Delivery Date) is the first mod I've added to my zen cart. At the bottom of my admin, it says my zen cart version is: Zen Cart v1.3.7.1/v1.3.7
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
deoxiribo
I'm actually getting the same odd checkout error, and the date comes over as Tuesday 30 November, 1999 rather than the date the customer enters.
The other error I get is a PHP error for the admin/orders.php page on line 818 saying zen_get_orders_comments is undefined.
I run no other mods, and this mod (Order Delivery Date) is the first mod I've added to my zen cart. At the bottom of my admin, it says my zen cart version is: Zen Cart v1.3.7.1/v1.3.7
Deoxiribo,
This mod is only for 1.3.8, so i am almost entirely certain that that is causing your errors. When ZC went from 1.3.7 to 1.3.8 they overhauled a LOT of code on the Admin side, which, to the end user was/is transparent. They have been working on converting tons of procedural code into a more streamlined setup.
Try upgrading to 1.3.8 and then apply the Delevery Date Mod. (I would recommend upgrading anyway because with each release there are tons of updates, feature additions, and bug fixes..).
Hope that helps! :smile:
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
Deoxiribo,
This mod is only for 1.3.8, so i am almost entirely certain that that is causing your errors. When ZC went from 1.3.7 to 1.3.8 they overhauled a LOT of code on the Admin side, which, to the end user was/is transparent. They have been working on converting tons of procedural code into a more streamlined setup.
Try upgrading to 1.3.8 and then apply the Delevery Date Mod. (I would recommend upgrading anyway because with each release there are tons of updates, feature additions, and bug fixes..).
Hope that helps! :smile:
Thank you! That got rid of the PHP error. I'm embarrassed that I didn't think to upgrade. :blush:
The date is still coming over as 11/30/1999 00:00:00 for me. I'm not sure what files I should check.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
deoxiribo
Thank you! That got rid of the PHP error. I'm embarrassed that I didn't think to upgrade. :blush:
The date is still coming over as 11/30/1999 00:00:00 for me. I'm not sure what files I should check.
Could you elaborate on the date error? I really want to get this fixed - I'm having a hard time reproducing it on my computer. Is your computer system clock synced to the right date?
-
Re: Order Delivery Date Support Thread
The installation instructions require an SQL adjustment, however my db does not have a TABLE zen_orders. What are the SQL requirements to add this table or am I missing a component needed to make this program work?
I am running 1.3.8a-full.
Thank you
-
1 Attachment(s)
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
yellowleaf
The installation instructions require an SQL adjustment, however my db does not have a TABLE zen_orders. What are the SQL requirements to add this table or am I missing a component needed to make this program work?
I am running 1.3.8a-full.
Thank you
Your database probably doesn't have the "zen_" prefix on each table.
Try the attached SQL file..
-
Re: Order Delivery Date Support Thread
Thank you for the quick reply. That was it.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
Vab,
Try replacing includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_shipping_default.php with the one attached to my reply here (which will need to be unzipped, obviously)
Let me know if it fixes your problem and if so, i'll update the contribution.
mrmeech,
Thanks so much for this mod! I've been looking for something like this for awhile and I'm grateful to you and the other developers for taking the time to put all this together. I did have one question though.. Any chance that the next update could include time slots for delivery after the date is selected? For example a user could select 2008-06-16. And then select a time slot of 8:00 a.m. - 1:00 p.m or 1:00 p.m. - 6:00 p.m.? Thanks again for your great contribution.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
Child_Of_The_Mind
mrmeech,
Thanks so much for this mod! I've been looking for something like this for awhile and I'm grateful to you and the other developers for taking the time to put all this together. I did have one question though.. Any chance that the next update could include time slots for delivery after the date is selected? For example a user could select 2008-06-16. And then select a time slot of 8:00 a.m. - 1:00 p.m or 1:00 p.m. - 6:00 p.m.? Thanks again for your great contribution.
Glad you appreciate the work! :smile:
The update that is pending right now in the download section (version 2.1) just fixes a display issue, but I will put it on the (small) list of requested features. It might be a bit tricky to integrate it with the setup of this calendar solution, but i'll see what i can do.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
Glad you appreciate the work! :smile:
The update that is pending right now in the download section (version 2.1) just fixes a display issue, but I will put it on the (small) list of requested features. It might be a bit tricky to integrate it with the setup of this calendar solution, but i'll see what i can do.
Well I'll definitely stay posted! Thanks for taking it into consideration and again for building the mod in the first place!
-
1 Attachment(s)
Re: Order Delivery Date Support Thread
Mrmeech,
Well I have gone through all the files and where I found order_delivery_date I added the same information for order_cancel_date.
I followed through the files you said:
Quote:
* pay close attention to includes/classes/order.php. Look where the modifications for the order delivery date mod is... usually they are called "order_delivery_date" (go figure)
* Update your language defines in english/YOUR_TEMPLATE/*.php
* Update includes/templates/YOUR_TEMPLATE/templates/checkout_*.php to display your cancel date info or whatever
* Update admin/orders.php so that when you generate an email from an order page it will include the cancel date, as well as display the cancel date info on the orders page.
* Make sure you update admin/includes/classes/order.php as well
There were a few other files that I had to edit. The problem that I am having is that I cant get the calendar to work on the tpl_checkout_shipping_default.php.
The first one was:
PHP Code:
<!-- Bof Ship Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo TABLE_HEADING_DELIVERY_DATE; ?></legend>
<label for="date">Date</label>
<input class="calendar" readonly="readonly" id="date" name="date" type="text">
<button class="calendar" type="button"></button>
</fieldset>
<!-- Eof Ship Date -->
and I added:
PHP Code:
<!-- Bof Cancel Ship Date -->
<fieldset class="shipping" id="order_cancel_date">
<legend><?php echo TABLE_HEADING_CANCEL_DATE; ?></legend>
<label for="date2">Date</label>
<input class="calendar" readonly="readonly" id="date2" name="date2" type="text">
<button class="calendar" type="button"></button>
</fieldset>
<!-- Eof Cancel Ship Date -->
and when I get to the shipping page it shows 2 calendar buttons next to Desired Delivery Date and one next to Desired Cancel Date but only the first one on Desired Delivery Date does anything when clicked. (attached screenshot)
What do you think?
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
velvetangels
Mrmeech,
...
The problem that I am having is that I cant get the calendar to work on the tpl_checkout_shipping_default.php.
The first one was:
PHP Code:
<!-- Bof Ship Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo TABLE_HEADING_DELIVERY_DATE; ?></legend>
<label for="date">Date</label>
<input class="calendar" readonly="readonly" id="date" name="date" type="text">
<button class="calendar" type="button"></button>
</fieldset>
<!-- Eof Ship Date -->
and I added:
PHP Code:
<!-- Bof Cancel Ship Date -->
<fieldset class="shipping" id="order_cancel_date">
<legend><?php echo TABLE_HEADING_CANCEL_DATE; ?></legend>
<label for="date2">Date</label>
<input class="calendar" readonly="readonly" id="date2" name="date2" type="text">
<button class="calendar" type="button"></button>
</fieldset>
<!-- Eof Cancel Ship Date -->
and when I get to the shipping page it shows 2 calendar buttons next to Desired Delivery Date and one next to Desired Cancel Date but only the first one on Desired Delivery Date does anything when clicked. (attached screenshot)
This boggles my mind a little bit..
if you remove this line of code from the "requested delivery date" calendar, i bet it will fix that problem:
PHP Code:
<button class="calendar" type="button"></button>
However, what doesn't make sense is why it's not showing up on your cancel date calendar too. What happens if you remove that same line of code from the cancel date calendar?
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
This boggles my mind a little bit..
if you remove this line of code from the "requested delivery date" calendar, i bet it will fix that problem:
PHP Code:
<button class="calendar" type="button"></button>
However, what doesn't make sense is why it's not showing up on your cancel date calendar too. What happens if you remove that same line of code from the cancel date calendar?
Tried to delete the button on the first fieldset and it does take out the 2nd calendar under Desired Delivery Date but when you try to click the calendar for Desired Cancel Date it doesnt do anything.
Tried taking out the 2nd button in the cancel fieldset and it removes the calendar button from the cancel fieldset.
How does it know to pull the calendar popup? wonder why it isnt working when the first button is removed.
-
1 Attachment(s)
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
velvetangels
Tried to delete the button on the first fieldset and it does take out the 2nd calendar under Desired Delivery Date but when you try to click the calendar for Desired Cancel Date it doesnt do anything.
Tried taking out the 2nd button in the cancel fieldset and it removes the calendar button from the cancel fieldset.
How does it know to pull the calendar popup? wonder why it isnt working when the first button is removed.
I am pretty sure that the calendar .js file itself is generating a calendar button. The release only has the compiled version of the javascript file, but i'll attach the exploded (readable) version for you to sift through too.
This is the site for the calendar itself and might be very helpful to figuring this out: http://electricprism.com/aeron/calendar/
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
I am pretty sure that the calendar .js file itself is generating a calendar button. The release only has the compiled version of the javascript file, but i'll attach the exploded (readable) version for you to sift through too.
This is the site for the calendar itself and might be very helpful to figuring this out:
http://electricprism.com/aeron/calendar/
Found the problem after reading through the website - (thank you very helpful)
It turns out that you have to label each field that you want the calendar to display on different (had a suspicion about that)
so on here tpl_checkout_shipping_default.php this is what i did:
PHP Code:
<!-- Bof Ship Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo TABLE_HEADING_DELIVERY_DATE; ?></legend>
<label for="date1">Date</label>
<input class="calendar" readonly="readonly" id="date1" name="date1" type="text">
</fieldset>
<!-- Eof Ship Date -->
<!-- Bof Cancel Ship Date -->
<fieldset class="shipping" id="order_cancel_date">
<legend><?php echo TABLE_HEADING_CANCEL_DATE; ?></legend>
<label for="date2">Date</label>
<input class="calendar" readonly="readonly" id="date2" name="date2" type="text">
</fieldset>
<!-- Eof Cancel Ship Date -->
and had to change \includes\modules\pages\checkout_shipping\jscript_calendar_head.php
PHP Code:
?>
<script type="text/javascript">
window.addEvent('domready', function() {
myCal1 = new Calendar({ date1: 'Y-m-d' }, { blocked: ['24-25,31 12 *', '0 * * 0'], direction: 3, draggable: false });
myCal2 = new Calendar({ date2: 'Y-m-d' }, { blocked: ['24-25,31 12 *', '0 * * 0'], direction: 3, draggable: false });
});
</script>
<?PHP /*
I am testing now and I can add it as an update if anyone would like. :clap:
-
Re: Order Delivery Date Support Thread
Velvetangels,
So you DID wind up cutting out this line of code from the shipping_default page (to fix the double button problem) for both the ship date and cancel date:
PHP Code:
<button class="calendar" type="button"></button>
Correct?
-
1 Attachment(s)
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
Velvetangels,
So you DID wind up cutting out this line of code from the shipping_default page (to fix the double button problem) for both the ship date and cancel date:
PHP Code:
<button class="calendar" type="button"></button>
Correct?
MrMeech,
Ya I had to delete
PHP Code:
<button class="calendar" type="button"></button>
on the shipping_default page. It looks like adding it onto the input allows it to show the button anyways.
I tried to test it out and i am not getting any values to post through to other pages. I enter the dates on the shipping_default page and when i get to the Confirmation page it only has
Quote:
Desired Delivery Date
(Year - Month - Day)
Desired Cancel Date
(Year - Month - Day)
Going to try to work more though it today.
I attached the code that I have already edited if you want to take a look too.
-
1 Attachment(s)
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
velvetangels
...
I tried to test it out and i am not getting any values to post through to other pages.
...
I looked over the files you attached, and the only immediately apparent errors were in the includes/classes/order.php around line 950-ish in the email section. I'll attach the file with the corrections.
Also it appears you have not yet edited the files in the email directory- if ya don't do that the info will never make it onto the actual emails generated to the customer.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
I looked over the files you attached, and the only immediately apparent errors were in the includes/classes/order.php around line 950-ish in the email section. I'll attach the file with the corrections.
Also it appears you have not yet edited the files in the email directory- if ya don't do that the info will never make it onto the actual emails generated to the customer.
I think there is something else wrong with the script. I tried to install a fresh version on zencart and it never did pull the values all the way through to the confirmation page.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
velvetangels
I think there is something else wrong with the script. I tried to install a fresh version on zencart and it never did pull the values all the way through to the confirmation page.
I will look into this right away.
-
Re: Order Delivery Date Support Thread
Velvetangels,
You are right. I made changes from version 1 to version 2 (which is where i believe this happened) on a clean 138 install and somewhere in bringing the files to the community i botched something. It's quite frustrating because i have a working version of the calendar mod on a server and i've been trying to figure out what happened. I even have some awesome file compare tools that outline line by line changes to help and i'm still stumped.
Gotta head to bed but i'll work on this more tomorrow. I need to sleep on it. :smile:
Have you been working with a 138, or 138a version of ZC?
-
Re: Order Delivery Date Support Thread
I FOUND IT!!!! I shut down my computer, and sat for a second (after all these hours of hunting for it)...had an epiphany... and turned it back on and found it in a second. Study the two blocks of code, and you'll figure it out. It was tpl_checkout_shipping_defualt.php that was causing the problem.
Delivery Date version 2:
PHP Code:
<!-- Bof Ship Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo TABLE_HEADING_DELIVERY_DATE; ?></legend>
<label for="date">Date</label>
<input class="calendar" readonly="readonly" id="date" name="date" type="text">
</fieldset>
<!-- Eof Ship Date -->
And what it SHOULD be:
PHP Code:
<!-- Bof Order Delivery Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo TABLE_HEADING_DELIVERY_DATE; ?></legend>
<label for="order_delivery_date">Date:</label>
<input readonly="readonly" id="date" name="order_delivery_date" type="text">
</fieldset>
<!-- Eof Order Delivery Date -->
how stupid.
-
Re: Order Delivery Date Support Thread
Thank you! Version 2.2 works beautifully! The date came over perfectly.
Thank you so much for this mod. It's what I've been looking for over the course of several months. It's perfect for a flower shop website. :clap:
-
Re: Order Delivery Date Support Thread
How do I change the style of the calendar to the alternate styling (dashboard) as seen here: http://electricprism.com/aeron/calendar/#download.
I tried to insert the classes: ['dashboard'] but that caused no graphics... So i need different graphics? Where do I get them?
-
1 Attachment(s)
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
dimmyr
How do I change the style of the calendar to the alternate styling (dashboard) as seen here:
http://electricprism.com/aeron/calendar/#download.
I tried to insert the classes: ['dashboard'] but that caused no graphics... So i need different graphics? Where do I get them?
When making the first version of the popup calendar there was seemingly nowhere to go to get the background(s) for the calendar, so they are directly from the example page.
Check out the attached zip file.
-
Re: Order Delivery Date Support Thread
Hi,
Thanks for this great contribution, much respect!
Is there some way of making certain dates in the future "unavailble"?
Would there be a way of doing this through the admin panel?
(apologies if this has already been discussed, I couldnt find it if it has!)
Thanks for replies in advance
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
deoxiribo
Thank you! Version 2.2 works beautifully! The date came over perfectly.
Thank you so much for this mod. It's what I've been looking for over the course of several months. It's perfect for a flower shop website. :clap:
Where can I find version 2.2? I've looked through the files in the thread and the download section. Am I just missing it along the way?
thank you,
betty
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
bettysue
Where can I find version 2.2? I've looked through the files in the thread and the download section. Am I just missing it along the way?
thank you,
betty
If you go to the downloads section and use the search function on the main page and look for "Order Delivery Date" you will find it.
BUT!!! To save you 15 seconds of time, here's a link :smile::
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=976
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
henteaser
Hi,
Thanks for this great contribution, much respect!
Is there some way of making certain dates in the future "unavailble"?
Would there be a way of doing this through the admin panel?
(apologies if this has already been discussed, I couldnt find it if it has!)
To edit blackout dates:- Open: Includes/modules/pages/checkout_shipping/jscript_calendar_head.php
- Find the few lines of javascript (you can't miss it), and look for this part:
Code:
blocked: ['24-25,31 12 *', '0 * * 0']
- There are instructions near the top on how to disable specific days.
- By default, the 24th thru the 25th of december of each year is disabled (24-25,31 12 *) and every sunday (sunday is day zero of the week) of every week of every month of every year is disabled. You can add as many blackout parameters as you'd like by separating them with commas.
Unfortunately there is no way of doing this through the admin panel right now. I will put it onto the Features Wish List.
Let me know if you get it figured out. I will also add instructions to the readme file on how to block out dates (which i should have done in the first place) :smile:
-
Does not work for me
Hello, I installed this addon 2 weeks ago on my zen cart and it worked perfectly, but days later my server got hacked and everything was erased. Now I'm reinstalling but it does not work, I can't see the calendar on the cart :dontgetit
I tried reinstalling on 138 and 138a, but I get the same, I'm pretty sure it's a detail missing from my part. The only doubt I have at the moment is
Quote:
"Make sure to change any folders labeled YOUR_TEMPLATE to the template you are using."
I uploaded the YOUR_TEMPLATE files on all of the templates (classic, template default, your_template) just to make sure, but found another your_template file under languages.
Can anybody help?:unsure: and another question what are the .DS_Store files?
-
Re: Does not work for me
Quote:
Originally Posted by
elesgar
Hello, I installed this addon 2 weeks ago on my zen cart and it worked perfectly, but days later my server got hacked and everything was erased. Now I'm reinstalling but it does not work, I can't see the calendar on the cart :dontgetit
I tried reinstalling on 138 and 138a, but I get the same, I'm pretty sure it's a detail missing from my part. The only doubt I have at the moment is
I uploaded the YOUR_TEMPLATE files on all of the templates (classic, template default, your_template) just to make sure, but found another your_template file under languages.
Can anybody help?:unsure: and another question what are the .DS_Store files?
- The YOUR_TEMPLATE file is just that, it's whatever template (theme) you have selected (Admin -> Tools -> Template Selection). You SHOULD NOT have any folders on your server actually labeled as "YOUR_TEMPLATE" unless that is what you happened to name your template.
- The .DS_Store files are hidden files created by the MAC Operating System whenever it accesses a folder or drive. It holds pretty useless mac-pertinent info, such as icon preferences, folder placements, etc...Just delete them.
If your store got hacked, you should really take a look at this to properly secure it this time around: https://www.zen-cart.com/tutorials/index.php?article=73
-
Does not work for me
:laugh: it works!!:clap: what a great addon, now I have to check with my client if this is what she wants:wacko:
thanks a lot for your help
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
Alright!! So, i've found a bug with Order Delivery Date that happens when a customer checks out with the Paypal Integrated Checkout method.
Basically, when the order email is generated upon successfully completing the paypal payment, the email define "EMAIL_TEXT_DELIVERY_DATE" is not translating to the value set in the language file. The delivery date still makes it to the email OK, but the email prints out as above: EMAIL_TEXT_DELIVERY_DATE
I just started looking into the issue, but if anyone has any idea what could be causing this, please let me know. I would venture to bet that this has to do with a paypal data array somewhere. As I don't have a comprehensive understanding of the data flow with PayPal, i might need someone else to point me in the right direction with this one...
It's gotta be something simple - 9 out of 10 times it is. :smile:
Great mod, was wondering if this issue was ever sorted????
Many thanks
Rob
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
robsnowden
Great mod, was wondering if this issue was ever sorted????
Many thanks
Rob
As of the most recent version, i have not had this problem. So, it *shouldn't* be a bug anymore, but, as always, you should run a test and let me know if there are any issues still hanging around.
-
1 Attachment(s)
Re: Order Delivery Date Support Thread
Hi and thanks for the reply.
I am using version 2.2 on a zen installation 1.3.8a if this helps.
I attach a screen shot of the email:
Many thanks
Rob
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
robsnowden
Hi and thanks for the reply.
I am using version 2.2 on a zen installation 1.3.8a if this helps.
I attach a screen shot of the email:
Many thanks
Rob
The problem that was originally raised had to do specifically with the date not registering. The error you are seeing appears to be from an undefined language definition.
You should find the following line near the bottom of:
- ADMIN/INCLUDES/LANGUAGES/orders.php
- INCLUDES/LANGUAGES/YOUR_TEMPLATE/checkout_process.php
PHP Code:
define('EMAIL_TEXT_DELIVERY_DATE', 'Desired Delivery Date:');
-
Re: Order Delivery Date Support Thread
Yeo - these are all in place.
ADMIN/INCLUDES/LANGUAGES/orders.php is actually ADMIN/INCLUDES/LANGUAGES/ENGLISH/orders.php according to the structure of the mod. Is this correct??
Cheers again for your assistance.
Rob
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
robsnowden
Yeo - these are all in place.
ADMIN/INCLUDES/LANGUAGES/orders.php is actually ADMIN/INCLUDES/LANGUAGES/ENGLISH/orders.php according to the structure of the mod. Is this correct??
Cheers again for your assistance.
Rob
Sorry - i wrote the response pretty fast yesterday. You are correct.
Where are the emails generated from when you see the problem? When the order is initially processed? or when you update the status?
Also, do you have any other mods installed? If so, what are they?
-
Re: Order Delivery Date Support Thread
I think there is a problem with the zip package. I have no problems downloading it, but I can't get anything extracted from it.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
enchantedneedle
I think there is a problem with the zip package. I have no problems downloading it, but I can't get anything extracted from it.
Tammy,
When i download it from the site and unzip it, everything works ok. Are you on PC, Mac, or Linux? And can you expand (pun not intended) on what you mean by not being able to extract anything? ie: Do you get an error message? Is the unzipped folder blank? Have you tried different unzipping tools? etc...
-
1 Attachment(s)
Re: Order Delivery Date Support Thread
Count of Monte Cristo! I can't get this to work to save my life. I can't just drag and drop the files over -- I have a purchase order mod installed.
I also wanted to add a variety of other dates, but while I added their back-end functionality, I tried to do my testing with just order_early_delivery_date, and nothing comes through. I haven't even started on the admin side.
I used CompareIt! and can't see any differences between the contribution's code and mine.
ARRRGGGHHH!!!
I'm at the point where I'm willing to pay for a solution -- I don't have a ton of cash, but I've been working on this for three days.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
juno
Count of Monte Cristo! I can't get this to work to save my life. I can't just drag and drop the files over -- I have a purchase order mod installed.
I also wanted to add a variety of other dates, but while I added their back-end functionality, I tried to do my testing with just order_early_delivery_date, and nothing comes through. I haven't even started on the admin side.
I used CompareIt! and can't see any differences between the contribution's code and mine.
Have your tried comparing the contribution files to a brand new / fresh copy of the zen cart code, or just your own cart?
There is a great chance the purchase order mod is messing with getting this working for you.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
Tammy,
When i download it from the site and unzip it, everything works ok. Are you on PC, Mac, or Linux? And can you expand (pun not intended) on what you mean by not being able to extract anything? ie: Do you get an error message? Is the unzipped folder blank? Have you tried different unzipping tools? etc...
I'm on a PC vista home premium. When I click the zip file I can see the folders and the content inside, but when I click "extract all files" I get an error message that says "the folder you are trying to create already exists, try again, skip or cancel. If you try again the same error just keeps popping back up indefinitely and if you skip it the folder will be created, but with only 2 blank files inside and no other folders or content. I've tried extracting it to a different location than the one that the zip file is located in and the errors are the same. I haven't tried another upzipping tool, but I guess I can go download one.
-
Re: Order Delivery Date Support Thread
Quote:
I get an error message that says "the folder you are trying to create already exists, try again, skip or cancel.
Actually it says:
"There is already a file with the same name as the folder name you specified.
Specify a different name.
File: order_delivery_date_2-2
Try Again, Skip, Cancel"
Wait! I think I see the problem. There is a "ghost" file in each folder with the same name as the folder itself. The contents look like this.
Name File type Size
admin folder
email folder
includes folder
admin file 0kb
email file 0kb
includes file 0kb
I've never seen this before. What are they? They are on every level of the package. An empty file with the exact same name as the folder. Okay, I am able to drag and drop only the good files and not the "ghost" files.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
enchantedneedle
Actually it says:
"There is already a file with the same name as the folder name you specified.
Specify a different name.
File: order_delivery_date_2-2
Try Again, Skip, Cancel"
Wait! I think I see the problem. There is a "ghost" file in each folder with the same name as the folder itself. The contents look like this.
Name File type Size
admin folder
email folder
includes folder
admin file 0kb
email file 0kb
includes file 0kb
I've never seen this before. What are they? They are on every level of the package. An empty file with the exact same name as the folder. Okay, I am able to drag and drop only the good files and not the "ghost" files.
What are the file extensions on those "ghost" files? And have you tried another unzipping program yet to see if it happens there too?
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
What are the file extensions on those "ghost" files? And have you tried another unzipping program yet to see if it happens there too?
There are no file extensions on them. The icon used is a blank paper, (i.e. empty or unidentified file right?) However, if you click one in explorer, it says "this folder is empty".
I did manage to pull out what I need. At least I think I have. I can't seem to get the button to show up. https://www.enchantedcostumes.com/in...ckout_shipping
Any ideas on what I may be missing? I've gone through it for 3 hours now trying to figure it out.
-
Re: Order Delivery Date Support Thread
Quote:
At least I think I have. I can't seem to get the button to show up.
The calendar does work in IE, but not in FF. I was using FF to test it, my bad. Any ideas on the solution for the browser difference?