-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
royaldave
I have another issue with this plugin and the classic responsive template.
The presence of mootools is breaking the mobile device menu on this page - you'll see its contents below the footer.
If you remove mootools from the directory it works properly.
Any ideas?
Ummm.. Not specifically, I mean I have the following checkout_shipping.css file:
Code:
/*
* Altered for ORDER DELIVERY DATE contribution
* Zen Cart Version: 1.3.8a
* Modification Date: 2008-05-15
* Author of this modification: MrMeech
* Previous authors to this contribution are: Peter Martin (pe7er), James Betesh
* This contribution is licensed under the GNU Public License V2.0
* http://www.zen-cart.com/license/2_0.txt
*/
/* Calendar: a Javascript class for Mootools that adds accessible and unobtrusive date pickers to your form elements <http://electricprism.com/aeron/calendar> */
/* Default CSS for Calendar (navigation: 1), Copyright (c) 2007 Aeron Glemann <http://electricprism.com/aeron> */
.hidden {
opacity: 0;
position: absolute;
}
.visible {
opacity: 1;
}
input.calendar,
select.calendar {
width: 99px;
}
button.calendar {
background: url(../images/calendar/calendar-icon.gif);
border: 0;
cursor: pointer;
/* float: left; */
height: 20px;
width: 20px;
margin-right: 6px;
}
button.calendar:hover,
button.calendar.active {
background-position: 0 20px;
}
div.calendar {
background: url(../images/calendar/calendar.png);
height: 195px;
padding: 0 6px;
text-align: center;
width: 147px;
}
div.calendar * {
margin: 0;
padding: 0;
}
div.calendar div {
background: none !important;
cursor: move;
height: 185px;
overflow: hidden;
padding-top: 10px;
position: relative;
width: 147px;
}
div.calendar caption {
color: #333;
font: normal 12px/16px Arial, Helvetica, sans-serif;
padding-top: 6px;
text-align: center;
width: 100%;
}
div.calendar caption a {
cursor: pointer;
display: block;
height: 12px;
overflow: hidden;
position: absolute;
text-indent: -100px;
top: 17px;
width: 11px;
}
div.calendar caption a.prev {
background-image: url(../images/calendar/calendar-prev.gif);
left: 0;
}
div.calendar caption a.next {
background-image: url(../images/calendar/calendar-next.gif);
right: 0;
}
div.calendar caption a:hover {
background-position: 0 12px;
}
div.calendar caption span {
height: 25px;
position: relative;
text-align: center;
}
div.calendar caption span.month {
padding-right: 8px;
}
div.calendar caption span.month:after {
content: ',';
}
div.calendar table {
background: #FFF;
border: 0;
border-collapse: collapse;
border-spacing: 0;
cursor: default;
margin: 0 auto;
overflow: hidden;
width: 147px;
}
div.calendar td,
div.calendar th {
border: 0;
color: #0597DB;
font: normal 12px Arial, Helvetica, sans-serif;
height: 21px;
text-align: center;
width: 21px;
}
div.calendar td {
background: url(../images/calendar/calendar-td.gif);
color: #FFF;
font-size: 11px;
}
div.calendar td.invalid {
color: #FF9999;
}
div.calendar td.valid {
background: url(../images/calendar/calendar-valid.gif);
color: #0597DB;
cursor: pointer;
}
div.calendar td.hilite {
background: url(../images/calendar/calendar-hilite.gif);
}
div.calendar td.inactive {
background: url(../images/calendar/calendar-td.gif) 0 100%;
color: #FFF;
}
div.calendar td.active,
div.calendar td.hover {
background: url(../images/calendar/calendar-valid.gif) 0 100%;
color: #FFF;
cursor: pointer;
}
and I have jscript_a-mootools.js and jscript_b-calendar.js loaded on responsive_classic and in mobile, template and standard desktop the calendar will appear adjacent to the button and the button adjacent to the text block. BTW, you can test "mobile" or "template" on your desktop to possibly rework the css by adding to your URL: &layoutType=mobile or &layoutType=tablet as desired for each of those "styles" to be applied to your desktop and then F12 (from PC I'm not sure how to do so on Macintosh) to then "locally" play with the CSS if needed.
Might want to check html validation/console for any validation issues.
-
1 Attachment(s)
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
mc12345678
Ummm.. Not specifically, I mean I have the following checkout_shipping.css file:
Code:
/*
* Altered for ORDER DELIVERY DATE contribution
* Zen Cart Version: 1.3.8a
* Modification Date: 2008-05-15
* Author of this modification: MrMeech
* Previous authors to this contribution are: Peter Martin (pe7er), James Betesh
* This contribution is licensed under the GNU Public License V2.0
* http://www.zen-cart.com/license/2_0.txt
*/
/* Calendar: a Javascript class for Mootools that adds accessible and unobtrusive date pickers to your form elements <http://electricprism.com/aeron/calendar> */
/* Default CSS for Calendar (navigation: 1), Copyright (c) 2007 Aeron Glemann <http://electricprism.com/aeron> */
.hidden {
opacity: 0;
position: absolute;
}
.visible {
opacity: 1;
}
input.calendar,
select.calendar {
width: 99px;
}
button.calendar {
background: url(../images/calendar/calendar-icon.gif);
border: 0;
cursor: pointer;
/* float: left; */
height: 20px;
width: 20px;
margin-right: 6px;
}
button.calendar:hover,
button.calendar.active {
background-position: 0 20px;
}
div.calendar {
background: url(../images/calendar/calendar.png);
height: 195px;
padding: 0 6px;
text-align: center;
width: 147px;
}
div.calendar * {
margin: 0;
padding: 0;
}
div.calendar div {
background: none !important;
cursor: move;
height: 185px;
overflow: hidden;
padding-top: 10px;
position: relative;
width: 147px;
}
div.calendar caption {
color: #333;
font: normal 12px/16px Arial, Helvetica, sans-serif;
padding-top: 6px;
text-align: center;
width: 100%;
}
div.calendar caption a {
cursor: pointer;
display: block;
height: 12px;
overflow: hidden;
position: absolute;
text-indent: -100px;
top: 17px;
width: 11px;
}
div.calendar caption a.prev {
background-image: url(../images/calendar/calendar-prev.gif);
left: 0;
}
div.calendar caption a.next {
background-image: url(../images/calendar/calendar-next.gif);
right: 0;
}
div.calendar caption a:hover {
background-position: 0 12px;
}
div.calendar caption span {
height: 25px;
position: relative;
text-align: center;
}
div.calendar caption span.month {
padding-right: 8px;
}
div.calendar caption span.month:after {
content: ',';
}
div.calendar table {
background: #FFF;
border: 0;
border-collapse: collapse;
border-spacing: 0;
cursor: default;
margin: 0 auto;
overflow: hidden;
width: 147px;
}
div.calendar td,
div.calendar th {
border: 0;
color: #0597DB;
font: normal 12px Arial, Helvetica, sans-serif;
height: 21px;
text-align: center;
width: 21px;
}
div.calendar td {
background: url(../images/calendar/calendar-td.gif);
color: #FFF;
font-size: 11px;
}
div.calendar td.invalid {
color: #FF9999;
}
div.calendar td.valid {
background: url(../images/calendar/calendar-valid.gif);
color: #0597DB;
cursor: pointer;
}
div.calendar td.hilite {
background: url(../images/calendar/calendar-hilite.gif);
}
div.calendar td.inactive {
background: url(../images/calendar/calendar-td.gif) 0 100%;
color: #FFF;
}
div.calendar td.active,
div.calendar td.hover {
background: url(../images/calendar/calendar-valid.gif) 0 100%;
color: #FFF;
cursor: pointer;
}
and I have jscript_a-mootools.js and jscript_b-calendar.js loaded on responsive_classic and in mobile, template and standard desktop the calendar will appear adjacent to the button and the button adjacent to the text block. BTW, you can test "mobile" or "template" on your desktop to possibly rework the css by adding to your URL: &layoutType=mobile or &layoutType=tablet as desired for each of those "styles" to be applied to your desktop and then F12 (from PC I'm not sure how to do so on Macintosh) to then "locally" play with the CSS if needed.
Might want to check html validation/console for any validation issues.
The page and calendar work fine - its just that at the bottom of the screen (on mobile) I get the contents of the menu -
Attachment 18803
I have worked out if I remove the mootools file then the menu goes back to where it should be.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
I am using this module on ZC 1.56 and it working great so far.
However, I do have a request and I am not sure if it is possible.
Is it possible to block off some delivery date based on the product category?
Meaning that if someone order item 1 from category A, all date are available but if he order item 1 from category B, it is only available to ship on 01- 20 thru 01-25.
Trying my best to explain what I am looking for and hopefully, someone can help
Thank you
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
nicksab
I am using this module on ZC 1.56 and it working great so far.
However, I do have a request and I am not sure if it is possible.
Is it possible to block off some delivery date based on the product category?
Meaning that if someone order item 1 from category A, all date are available but if he order item 1 from category B, it is only available to ship on 01- 20 thru 01-25.
Trying my best to explain what I am looking for and hopefully, someone can help
Thank you
There is some guidance in one of the javascript files about how to "block" out dates. The information is generic in nature like how to prevent delivery within the next 3 days or something. What you would want to do at or before this point is to evaluate the cart contents and assign the earliest delivery date based on those results.
The file I am talking about having some guidance is: includes/modules/pages/checkout_shipping/jscript_calendar_head.php
The file already has some php "code" in it, but seems like this would be a decent place to incorporate an evaluation of the session variable and associated data to control how the date is presented.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
mc12345678
There is some guidance in one of the javascript files about how to "block" out dates. The information is generic in nature like how to prevent delivery within the next 3 days or something. What you would want to do at or before this point is to evaluate the cart contents and assign the earliest delivery date based on those results.
The file I am talking about having some guidance is: includes/modules/pages/checkout_shipping/jscript_calendar_head.php
The file already has some php "code" in it, but seems like this would be a decent place to incorporate an evaluation of the session variable and associated data to control how the date is presented.
I did look into that file. However, I am using the modification from post # 7 on this thread. It blocks delivery date base on server and works great so far. However, I am not getting a "calendar" display for such. It is giving me a drop down menu instead.
My expertise in coding is limited so bare with me please. Not sure however to proceed at this point. I have seen ways where you can have cart checked in order to block things.
I haven t been able to find anything about blocking these dates based on a specific category though
-
Disallow checkout based on product category and date
hello,
I am not sure if this is possible but I would like to disallow checkout or block delivery date based on this criteria:
-any product except the one from category 11 is in the cart then date 02-11 thru 02-14 are blocked.
I am currently using order delivery date as an add on for my cart. To be honest, I tried to ask there but did not get much luck.
The code in my tpl_checkout_shipping_default is as follow:
Code:
<!-- Bof Order Delivery Date -->
<!-- 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 = '12H30'; // set on a 24 hour time clock
$end_cutoff_hour = '21'; // 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-31"
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 -->
<!-- Eof Order Delivery Date -->
I am currently able to block certain dates and to skip the day if time passed. Is there a way to block date base on product master category?
I am a real newbie when it comes to coding. I tried the Admin flag but it is not changing anything or at least not working for me.
Please any help will be really appreciated
Thank you
-
1 Attachment(s)
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Hoping someone can help - is this plugin still working with the latest version of ZC? I installed, and can get a store selection radio buttons at checkout, but there is no date picker, only a text field. If the user enters a date, it accepts it, but they're unable to use a drop down. Also, the heading above the box shows 'TABLE_HEADING_DELIVERY_DATE'.
Attachment 18950
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
SpyderSL
Hoping someone can help - is this plugin still working with the latest version of ZC? I installed, and can get a store selection radio buttons at checkout, but there is no date picker, only a text field. If the user enters a date, it accepts it, but they're unable to use a drop down. Also, the heading above the box shows 'TABLE_HEADING_DELIVERY_DATE'.
Attachment 18950
I have this working on 1.5.6a and on 1.5.6c, so it should work. From your screenshot, I can see that you have at least a missing entry in a language file - that's why you see "TABLE_HEADING_DELIVERY_DATE" instead of the instruction to select a date. The missing calendar pop-up indicates either a javascript conflict or missing header files. I would start by double checking that you installed correctly and all the files are in the right places...
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
weif
I have this working on 1.5.6a and on 1.5.6c, so it should work. From your screenshot, I can see that you have at least a missing entry in a language file - that's why you see "TABLE_HEADING_DELIVERY_DATE" instead of the instruction to select a date. The missing calendar pop-up indicates either a javascript conflict or missing header files. I would start by double checking that you installed correctly and all the files are in the right places...
It could also be something missing from the css that would cause the calendar to popup in view (it may be popping up off screen somewhere).
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Hi
Just some feedback for the next version.
Zencart 156 introduced showing the order details on the checkout success page. As the delivery date is obviously not there I was getting a deluge of emails from customers confirming their delivery date (Yes they were too lazy to read their email), so I was forced to add it in there.
For similar reasons I would also recommend adding it to order details under My Account.
Also I have changed the heading of 'Date' on the My Account page to 'Ordered' so that customers don't confuse the date with delivery date.
Thanks for listening ....
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Bug or intended?
As we know when you first hit the Checkout Shipping page the delivery date is set to blank.
Then lets say you have multiple shipping options - and lets say it has defaulted to 'Store Pickup' and you change it to 'Delivered' and click Continue (without updating delivery date).
Quite correctly you are warned that you need to enter your delivery date. However your change of shipping option is not remembered and it remains as 'Store Pickup'.
Is this intended functionality or a bug?
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
royaldave
Bug or intended?
As we know when you first hit the Checkout Shipping page the delivery date is set to blank.
Then lets say you have multiple shipping options - and lets say it has defaulted to 'Store Pickup' and you change it to 'Delivered' and click Continue (without updating delivery date).
Quite correctly you are warned that you need to enter your delivery date. However your change of shipping option is not remembered and it remains as 'Store Pickup'.
Is this intended functionality or a bug?
Ehhh, third option? Not originally/recently a consideration of concern?! It certainly was not intentional to blow away everything else just because there was an issue with the delivery date. The question becomes what to do about it in a "broader" acceptable way?
Right now, the location where the issue is detected still seems ideal; however, it is the redirect that is done right then that is the problem. That redirect occurs before the remainder of the shipping options are processed as part of the page's header load.
Unfortunately, if the redirect doesn't happen where it currently is set, then the next opportunity which allows the shipping module to be set is in the load of the checkout_payment page.
What this will do is allow the shipping module(s) to process on the delivery date with the possibility of knowing that there is a problem with that delivery date, but still storing whatever value was selected and then upon redirect to the checkout_payment page be sent back to reselect the delivery date.
Likely what I would do is that in the current location where there is the redirect because of the date, I would set a flag in the class to indicate the need to redirect on checkout_payment or something. And then when listening to checkout_payment, cause the redirect back to checkout_shipping... now I don't yet have an idea about how this might affect non-three page checkout processes.
Of course another idea is that in the "error" message add text to indicate the extent of reselection needed... but I'll prep something to take a look at for your situation and can see if what problems it creates by implementing...
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Thanks for your reply.
Just so you understand why only now I'm coming up with this issue is that I am intending to implement the "minimum order" plugin (https://www.zen-cart.com/downloads.php?do=file&id=402) however I have amended it to allow a "small" order to checkout with Store Pickup and only block orders that are being delivered.
Unfortunately it makes my site look a little buggy if they forget to enter the date and they change the shipping method from Delivery to Store Pickup and the warnings keep coming up and the method stays at "delivery".
Or maybe I'm being too pedantic..
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Ok, just about done with updating for ZC 1.5.7 and to address the above issue... Man a lot has changed in this area of the code... Although I've also found some areas of the ZC code can be filled with potential issues for those wishing to modify the email sent out by the zen_update_orders_history function and to customize emails without touching the function code... I've been able to handle most of the effort by way of the observer system though I'm trying to incorporate the information completely through that and inline with execution.
Anyways, need to test the operation out, but I believe I now have the code working such that at least in the standard ZC checkout process if there is a problem with the date information that other processing code is executed to try to take the customer to the checkout_payment page at which point the customer is redirected back to the checkout_shipping page. Probably should consider that action for one or more other pages in the checkout process though... Hmm... Hope to have something pushed to github shortly.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
royaldave
Thanks for your reply.
Just so you understand why only now I'm coming up with this issue is that I am intending to implement the "minimum order" plugin (
https://www.zen-cart.com/downloads.php?do=file&id=402) however I have amended it to allow a "small" order to checkout with Store Pickup and only block orders that are being delivered.
Unfortunately it makes my site look a little buggy if they forget to enter the date and they change the shipping method from Delivery to Store Pickup and the warnings keep coming up and the method stays at "delivery".
Or maybe I'm being too pedantic..
Nope, I don't think it is pedantic, the other night, ordered online from a "big company", every time went through almost anything on the checkout page the option to do curbside pickup changed to instore... For one reason or another had to cycle through like 4 times and updated the option each of those 4 times; however, somehow the final result was the "default" of instore...
At any rate, I get it and I do believe I was concerned about it, but was having difficulty finding an appropriate location that was "guaranteed" to work because of the internal operation when submitting for process. There's currently no redirect after collecting the information but before allowing operation to continue...
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Ok, I'm kind of done playing... Not saying perfect, but I'm tired of testing this at the moment and need some input on expectations/desires for the email etc...
I added files for ZC 1.5.7 into their own folder within the distribution which is currently accessible from: mc12345678/order-delivery-date at ZCv157 (github.com). I haven't seen the real final email result, but I can't say that I like how the notes are addressed... Again, input requested...
I also did not test with any of the other modified login/order schemes, but what I did test was the functionality at/around the entry or missing entry of the order delivery date to validate that other selections were maintained... As far as one or more observers monitoring some of these notifiers, may want to consider the autoload point sequence for each to ensure a properly sequenced load and to accomplish whatever each plugin does. It may also be that some of the observer code has to be split out so that the load sequence occurs as needed, but also be careful that dependencies are not lost when doing so.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
I'm using 1.5.6 so so just updated the auto.order_delivery_date_observer file.
Seems to work - it retains the chosen delivery method and I've put it live.
One minor feedback though is to update -
$html_msg['EMAIL_TEXT_DELIVERY_DATE'] = EMAIL_TEXT_DELIVERY_DATE . ' ' . zen_db_output($callingClass->info['order_delivery_date']);
to -
$html_msg['EMAIL_TEXT_DELIVERY_DATE'] = EMAIL_TEXT_DELIVERY_DATE . ' ' . zen_date_long(zen_db_output($callingClass->info['order_delivery_date']));
}
because the zen_date_long looks nicer :)
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
royaldave
I'm using 1.5.6 so so just updated the auto.order_delivery_date_observer file.
Seems to work - it retains the chosen delivery method and I've put it live.
One minor feedback though is to update -
$html_msg['EMAIL_TEXT_DELIVERY_DATE'] = EMAIL_TEXT_DELIVERY_DATE . ' ' . zen_db_output($callingClass->info['order_delivery_date']);
to -
$html_msg['EMAIL_TEXT_DELIVERY_DATE'] = EMAIL_TEXT_DELIVERY_DATE . ' ' . zen_date_long(zen_db_output($callingClass->info['order_delivery_date']));
}
because the zen_date_long looks nicer :)
Incorporated that for both the text and html entries in that area of the code. Thank you for the input.
-
Re: Order Delivery Date Support Thread
Hi,
I have installed the required files and do see the delivery date in the confirmation email. However I do not see the desired delivery date in the invoice when I am in the Admin area. I have checked the invoice.php file and it does include the following line:
define('ENTRY_DELIVERY_DATE', 'Desired Delivery Date:');
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
rkhan3366
Hi,
I have installed the required files and do see the delivery date in the confirmation email. However I do not see the desired delivery date in the invoice when I am in the Admin area. I have checked the invoice.php file and it does include the following line:
define('ENTRY_DELIVERY_DATE', 'Desired Delivery Date:');
That define would be expected to be in the admin/includes/languages/YOUR_LANGUAGE/invoice.php file,
To display that constant and the associated information for the order, changes to admin/invoice.php would need to have been incorporated. While the specific Zen Cart version appears to not be indicated (item identified in the posting tips), I would expect content similar to the following to be incorporated to the applicable version of the file:
Code:
<tr>
<td class="main"><strong><?php echo ENTRY_DELIVERY_DATE; ?></strong></td>
<td class="main"><?php echo zen_date_long($order->info['order_delivery_date']); ?></td>
</tr>
The above code was copied directly from the Zen Cart 1.5.7 version of invoice.php as provided in the distribution package at/around lines 133 through and including 136.
-
Re: Order Delivery Date Support Thread
-
Re: Order Delivery Date Support Thread
I am running 1.5.7c and just came across this plugin, looks awesome.
I am currently working on a site that will need to have a delivery with pick-up date for a rental business. Can you please tell me if this plugin will allow a return date with or without time?
Thank you for the work!!
-
Re: Order Delivery Date Support Thread
Noting the code on post #520, you can see how defines could be added for a return date and time. You'd just need to add fields in the files and database.
Load it up on a test site and try it out.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
dbltoe
Noting the code on post #520, you can see how defines could be added for a return date and time. You'd just need to add fields in the files and database.
Load it up on a test site and try it out.
Perfect! Thank you very much!
-
Re: Order Delivery Date Support Thread
I hope you don't mind one more question? I installed all files under the 1.5.7 folder from Github and also updated the deliverydate.sql file. However, I am receiving a 500 error on both the store site and admin side.
The site is most4less.com
Would you mind having a look?
I am running 1.5.7c
php: 7.3.28
Thanks.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
chuckrey
I hope you don't mind one more question? I installed all files under the 1.5.7 folder from Github and also updated the deliverydate.sql file. However, I am receiving a 500 error on both the store site and admin side.
The site is most4less.com
Would you mind having a look?
I am running 1.5.7c
php: 7.3.28
Thanks.
Check your logs folder. I would expect that a log is identified there as to why the site is unreachable...
-
Re: Order Delivery Date Support Thread
Hope you made a copy of your database before the installation of the mod.
There are several sql files in there that may or may not need to be used and, I'm not sure if the deliverydate-remove.sql file gets it all.
I'd try a backup restore if your host can't see some reason for the 500.
-
Re: Order Delivery Date Support Thread
I was just checking those, I should have checked ahead of time and posted. The error log is as follows:
Quote:
[14-Jul-2021 00:16:05 UTC] PHP Parse error: syntax error, unexpected ';' in /home/most4les/public_html/includes/classes/observers/auto.order_delivery_date_observer.php on line 138
[14-Jul-2021 00:16:05 UTC] Request URI: /admin/logoff.php, IP address: xx.xxxx.xx.xx
--> PHP Parse error: syntax error, unexpected ';' in /home/most4les/public_html/includes/classes/observers/auto.order_delivery_date_observer.php on line 138.
-
Re: Order Delivery Date Support Thread
Yes, definitely. I always do a back-up specially when database changes are involved. Thanks:smile:
-
Re: Order Delivery Date Support Thread
So apparently, this line is the issue:
WHERE orders_id = " . (int)($orders_fields['orders_id'] . " LIMIT 1";
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
chuckrey
So apparently, this line is the issue:
WHERE orders_id = " . (int)($orders_fields['orders_id'] . " LIMIT 1";
Yeah, just pulled it up...
Change:
Code:
WHERE orders_id = " . (int)($orders_fields['orders_id'] . " LIMIT 1";
to:
Code:
WHERE orders_id = " . (int)$orders_fields['orders_id'] . " LIMIT 1";
Man, I really wish I knew where/how characters like that just seem to randomly appear...
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mc12345678
Yeah, just pulled it up...
Change:
Code:
WHERE orders_id = " . (int)($orders_fields['orders_id'] . " LIMIT 1";
to:
Code:
WHERE orders_id = " . (int)$orders_fields['orders_id'] . " LIMIT 1";
Man, I really wish I knew where/how characters like that just seem to randomly appear...
LOL!! I wish I was half as good at you catching such things.
Thanks again. I greatly appreciate your work. I just did a test and it seems to work great. I just need to let the users know how to properly enter the date.
I value your time and work always
-
Re: Order Delivery Date Support Thread
Yet another question. Is there a way to have the date pop-up a calendar?
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
chuckrey
Yet another question. Is there a way to have the date pop-up a calendar?
That's actually one of the primary points of the plugin. Check your browser console for javascript/jquery like errors. A mal-formed page or something that prohibits the associated code from executing could prevent the display of the calendar option. There are a number of other possibilities, but I'm working from the perspective that all of the related files have been loaded for the associated Zen Cart version.
-
Re: Order Delivery Date Support Thread
I will have a look and update. Thanks again.
-
Re: Order Delivery Date Support Thread
Hi
Hope someone else is still using this.
I've noted in the past that the mootools library required for this plugin can cause some issues.
Namely if you're using the responsive classic template it would break the mobile menu when you were on the checkout_shipping page.
I have recently started making use of bootstrap template and mootools has reared its head again - basically sometimes when leaving the checkout_shipping page you are directed back to the home page instead of checkout_payment. I have no idea why - but removing the mootools file solved this problem.
One Page Checkout might be a workaround but I haven't tested this yet.
Anyway, I have replaced the mootools calendar with the jquery datepicker and got this working fine. However datepicker lacks the flexibility the mootools one had.
In particular I liked the wildcard and range date blocking, eg [* 1 2024] - block all january, or [1-10 1 2024] - block 1-10 january.
So asking if anyone has a solution to get mootools to play nice, or if you are aware of another datepicker with flexibility akin to the mootools one.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
royaldave
Hi
Hope someone else is still using this.
I've noted in the past that the mootools library required for this plugin can cause some issues.
Namely if you're using the responsive classic template it would break the mobile menu when you were on the checkout_shipping page.
I have recently started making use of bootstrap template and mootools has reared its head again - basically sometimes when leaving the checkout_shipping page you are directed back to the home page instead of checkout_payment. I have no idea why - but removing the mootools file solved this problem.
One Page Checkout might be a workaround but I haven't tested this yet.
Anyway, I have replaced the mootools calendar with the jquery datepicker and got this working fine. However datepicker lacks the flexibility the mootools one had.
In particular I liked the wildcard and range date blocking, eg [* 1 2024] - block all january, or [1-10 1 2024] - block 1-10 january.
So asking if anyone has a solution to get mootools to play nice, or if you are aware of another datepicker with flexibility akin to the mootools one.
I stopped using this plugin for the same reason you mentioned. I was never able to get Mootools to play nice with my site ( ZC 1.5.7 with one page checkout and bootstrap template).
I am using an updated version of JS date picker which use product attribute to display the calendar. The downside is the delivery date is on the product page as opposed to the checkout page.
I like that you can have several calendar with different setting based on which attribute is added to the product. Blocking date, cut off time... is fairly easy once you get the hang of it.
I haven't figured the time zone cut off time yet for it. The calendar uses UTC time and can be an issue if you cut off time or such.
Mootools was great when worked but i like my alternative so far. I have seen some nice React datepicker like Ant Design....but no clue how to make it work with ZC.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
nicksab
I stopped using this plugin for the same reason you mentioned. I was never able to get Mootools to play nice with my site ( ZC 1.5.7 with one page checkout and bootstrap template).
I am using an updated version of JS date picker which use product attribute to display the calendar. The downside is the delivery date is on the product page as opposed to the checkout page.
I like that you can have several calendar with different setting based on which attribute is added to the product. Blocking date, cut off time... is fairly easy once you get the hang of it.
I haven't figured the time zone cut off time yet for it. The calendar uses UTC time and can be an issue if you cut off time or such.
Mootools was great when worked but i like my alternative so far. I have seen some nice React datepicker like Ant Design....but no clue how to make it work with ZC.
For one final time I reinvestigated the mootools calendar and I can see that the particular calendar tool chosen for this plugin was last updated in 2009 and won't work with a mootools younger than v1.2.6.
As I mentioned previously I've been unable to find a datepicker with the same flexibility for blocking dates.
I'm rubbish at js, and completely ignorant to mootools so I won't be spending any more time on this pathway.
This plugin will work with pretty much any datepicker, and as mentioned previously I have got it working with a stock standard js date picker.
I could submit my changes to this plugin but I am sensitive that replacing the previous (mootools) datepicker might seem as a downgrade for some - but I will comment that removal of the mootools library prevents issues with both responsive classic template (on a mobile), and bootstrap overall.
And finally, and it is probably the wrong forum for this, but it is a shame that the author of the calendar tool used in the delivery date plugin did not carry on with it - not just for zen cart, but it could be useful in any number of applications.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
royaldave
For one final time I reinvestigated the mootools calendar and I can see that the particular calendar tool chosen for this plugin was last updated in 2009 and won't work with a mootools younger than v1.2.6.
As I mentioned previously I've been unable to find a datepicker with the same flexibility for blocking dates.
I'm rubbish at js, and completely ignorant to mootools so I won't be spending any more time on this pathway.
This plugin will work with pretty much any datepicker, and as mentioned previously I have got it working with a stock standard js date picker.
I could submit my changes to this plugin but I am sensitive that replacing the previous (mootools) datepicker might seem as a downgrade for some - but I will comment that removal of the mootools library prevents issues with both responsive classic template (on a mobile), and bootstrap overall.
And finally, and it is probably the wrong forum for this, but it is a shame that the author of the calendar tool used in the delivery date plugin did not carry on with it - not just for zen cart, but it could be useful in any number of applications.
@royaldave
How are your changes to the plugin working for you?
I am looking for another options for my "delivery date" options on my site. As mentioned in my earlier post, I am using a jquery datepicker that displays on the product page ( via attribute text option). However, the whole cut-off time is driving me nuts. I can t figure out how to have it works on my time zone as opposed to local time. I am PST time and my cut off is 1 PM but if someone try to order from Europe or else, the date options changes based on their local time.
Back to this plugin, can it be displayed on product page instead of checkout? Can a cut-off time be specified that would work on my local time as opposed to user?
Hope this makes sense.
Thank you
-
Re: Order Delivery Date Support Thread
After re-reading this thread, part of my answer was on post #7 regarding the cut-off time.
So it comes to know if anyone as an updated version that would work with ZC 2.0 , bootstrap template and One page checkout??
I am open to suggestions ( actually i would love a working solutions if anyone as it)
It would be great if the callendar could be displayed on product info page instead of checkout.
Anyone please?
thank you in advance.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
nicksab
@royaldave
How are your changes to the plugin working for you?
I am looking for another options for my "delivery date" options on my site. As mentioned in my earlier post, I am using a jquery datepicker that displays on the product page ( via attribute text option). However, the whole cut-off time is driving me nuts. I can t figure out how to have it works on my time zone as opposed to local time. I am PST time and my cut off is 1 PM but if someone try to order from Europe or else, the date options changes based on their local time.
Back to this plugin, can it be displayed on product page instead of checkout? Can a cut-off time be specified that would work on my local time as opposed to user?
Hope this makes sense.
Thank you
My changes are working great for me, but I don't take time into account. Yes, thanks to the international date line I've had people in the US order things for "yesterday", but I take no shame in being unable to provide the impossible. People need to use common sense.
That said, I do believe it is possible to pass the timezone to the datepicker
https://stackoverflow.com/questions/...datetimepicker
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
royaldave
My changes are working great for me, but I don't take time into account. Yes, thanks to the international date line I've had people in the US order things for "yesterday", but I take no shame in being unable to provide the impossible. People need to use common sense.
That said, I do believe it is possible to pass the timezone to the datepicker
https://stackoverflow.com/questions/...datetimepicker
Thanks for sharing the link. I did came across it while looking. I don t know anything about code so it got even more confused.
I did look at an option of using moment to specify a time zone based on the following post:
https://stackoverflow.com/questions/...er-cutoff-time
I tried with a sample product but it is hard to tell if it works while trying to spoof my IP to a different location.
My issue is the opposite of yours. :-(
For example:
I am on PST time (California) and my cut-off is 1 PM for same day delivery.
Someone in New York ( EST time) want to place an order for delivery. However, they can t pick today because it is 2 PM for them but it is only 11 AM my time ( store location). It getsmore problematic for Canada, Europe....
I understand potential customer could still call to place their order but in today's world, it is all online.
To my other question,
Is there away to have the calendar display on product_info page? instead of the checkout page.
Thank you
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
nicksab
Thanks for sharing the link. I did came across it while looking. I don t know anything about code so it got even more confused.
To my other question,
Is there away to have the calendar display on product_info page? instead of the checkout page.
Thank you
I'm not aware of any plugins that do this.
A simple way to do this though would be to add an Option Name to your products of 'Delivery Date'. It would simply be free form text where a requested delivery date can be entered. Obviously there's no verification though.
One solution might be to add an Option Name type of 'date' to Option Name Manager. And then you insert your datepicker code when it comes up - this would eliminate the need to add a date field to relevant Product tables.