-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
saftek
We have resolved the email problem by making all emails html. BUT: we have the following problems. We have merged all pages into existing pages.
1) calendar isn't showing up on the checkout page.
2) /yourtemplate/templates/tpl_checkout_confirmation_default.php - line 187 - this bit of code
---- . (is_array($payment_modules->modules) ? $payment_modules->process_form_params() : '') ----
breaks the final checkout page and results in error
-----Fatal error: Call to undefined method payment::process_form_params() in /home/saftek/public_html/shop/includes/templates/custom/templates/tpl_checkout_confirmation_default.php on line 187 ----
Any clues on where to go from here would be appreciated.
Yeah, that undefined method is something that was anticipated to make it into ZC 1.5.5; however, was pushed out to ZC 1.6.0 which wasn't "realized" until well after the plugin was released. That line can be restored to what is provided in a default ZC store as provided by the likes of includes/templates/template_default/templates/tpl_checkout_confirmation_default.php. It was incorporated to provide support for paypal InContext. The alternative would be to add an applicable function to includes/classes/payment.php like shown in the v1.6.0 version of the same file. Or like pretty much any of the functions in that file.
-
Re: Order Delivery Date Support Thread
Thanks. That clears #2... I had already stripped that bit of code from the page... actually left it as it was prior.
Still haven't figured out #1 - why the calendar doesn't show up ... can manually input a date at the moment, but no calendar to pick from. Since this worked last week, before updating 155e and 251... it has to be in this new code someplace.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
saftek
Thanks. That clears #2... I had already stripped that bit of code from the page... actually left it as it was prior.
Still haven't figured out #1 - why the calendar doesn't show up ... can manually input a date at the moment, but no calendar to pick from. Since this worked last week, before updating 155e and 251... it has to be in this new code someplace.
Being javascript/jquery, my first recommendation is to verify html validation, next is to identify what jquery is loaded as seen at the proposed point of execution? I'd step in more if I was at a computer, but not too much of that diagnostics can be done from my mobile (easily).
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mc12345678
Being javascript/jquery, my first recommendation is to verify html validation, next is to identify what jquery is loaded as seen at the proposed point of execution? I'd step in more if I was at a computer, but not too much of that diagnostics can be done from my mobile (easily).
I appreciate your patience and assistance. Not seeing any html related errors. jquery -1.12.0min.js loading, looks like the appropriate jscripts are loading... jscript_b-calendar, mootools etc.
Via console I see : TypeError: B.getTag is not a function in the calendar JS.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
saftek
I appreciate your patience and assistance. Not seeing any html related errors. jquery -1.12.0min.js loading, looks like the appropriate jscripts are loading... jscript_b-calendar, mootools etc.
Via console I see : TypeError: B.getTag is not a function in the calendar JS.
So this is aggravating. The jscript_b-calendar.js file is not the same that I have on my functional ZC 1.5.5 site that also has jquery 1.12.0. The "new" file is a year younger and is written differently to not have the B.getTag command and other code.
I'm going to get this up on github and then try to package for re-release...
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mc12345678
So this is aggravating. The jscript_b-calendar.js file is not the same that I have on my functional ZC 1.5.5 site that also has jquery 1.12.0. The "new" file is a year younger and is written differently to not have the B.getTag command and other code.
I'm going to get this up on github and then try to package for re-release...
LOL... computer programs are a perfect home for gremlins!
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
saftek
LOL... computer programs are a perfect home for gremlins!
The change is shown here: https://github.com/mc12345678/order-...314d690af32add
I haven't uploaded the other changes I discussed earlier, yet. That commit is the one that was supposed to be with this plugin's distribution. The thing that primarily made/allowed it to work with ZC 1.5.5...
-
Re: Order Delivery Date Support Thread
copied the code provided. Still not seeing the calendar and getting the following error in the console...
TypeError: el.addEvent is not a function jscript_b-calendar.js:451:4
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
saftek
copied the code provided. Still not seeing the calendar and getting the following error in the console...
TypeError: el.addEvent is not a function jscript_b-calendar.js:451:4
recopied the file... no errors from b-calendar file now. But am working out the following errors...
TypeError: MooTools.upgradeLog is not a function[Learn More] jscript_a-mootools.js:360:37475
<anonymous> /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:360:37475
presto /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:27:464
Browser.detect /includes/modules/pages/checkout_shipping/jscript_b-calendar.js:15:5235
<anonymous> /includes/modules/pages/checkout_shipping/jscript_b-calendar.js:15:5360
#2
ReferenceError: Calendar is not defined[Learn More] index.php:152:42
<anonymous> /index.php:152:42
f /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:57:68
create/< /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:58:39
fireEvent/ /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:186:113
forEach self-hosted:269:13
fireEvent /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:186:86
b /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:264:1
d /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:180:54
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
saftek
recopied the file... no errors from b-calendar file now. But am working out the following errors...
TypeError: MooTools.upgradeLog is not a function[Learn More] jscript_a-mootools.js:360:37475
<anonymous> /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:360:37475
presto /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:27:464
Browser.detect /includes/modules/pages/checkout_shipping/jscript_b-calendar.js:15:5235
<anonymous> /includes/modules/pages/checkout_shipping/jscript_b-calendar.js:15:5360
#2
ReferenceError: Calendar is not defined[Learn More] index.php:152:42
<anonymous> /index.php:152:42
f /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:57:68
create/< /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:58:39
fireEvent/ /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:186:113
forEach self-hosted:269:13
fireEvent /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:186:86
b /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:264:1
d /includes/modules/pages/checkout_shipping/jscript_a-mootools.js:180:54
replaced the mootools.js with the one from github, cleared error #1. still have #2
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
saftek
replaced the mootools.js with the one from github, cleared error #1. still have #2
Cleared #2 by deleting calendar and mootools files and replacing with those copied from github. Now see the the calendar and all appears to be working. Thanks for your efforts! Cheers
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
saftek
Cleared #2 by deleting calendar and mootools files and replacing with those copied from github. Now see the the calendar and all appears to be working. Thanks for your efforts! Cheers
So to clarify, the files that are basically in this path: https://github.com/mc12345678/order-...ster/155_files on github are the ones that worked? Or did you go elsewhere in github?
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mc12345678
Yes, I pulled from that area. My file sizes are Moo=60294, calendar=24680 if that helps. If there are identifiers within the files you can use, let me know.
Cheers.
-
Re: Order Delivery Date Support Thread
I could use some help.
I noticed some talk about some of my issues but I'm not sure they are the same.
I am running ZC Version 1.5.5e.
This is a new shop from scratch.
I installed the files from the beginning of this thread that I downloaded in September, 2017.
#1) I am not getting a calendar to choose a date from but am getting the field I can fill in.
#2) When I get to Step 3 - Order Confirmation, I don't find a way to submit the order. This may not have to do with the Delivery Date addon but I don't know as I have not used the shop without it. I will be running more tests for this.
Are there some other files I need?
Thanks :D
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
plantman
I could use some help.
I noticed some talk about some of my issues but I'm not sure they are the same.
I am running ZC Version 1.5.5e.
This is a new shop from scratch.
I installed the files from the beginning of this thread that I downloaded in September, 2017.
#1) I am not getting a calendar to choose a date from but am getting the field I can fill in.
#2) When I get to Step 3 - Order Confirmation, I don't find a way to submit the order. This may not have to do with the Delivery Date addon but I don't know as I have not used the shop without it. I will be running more tests for this.
Are there some other files I need?
Thanks :D
Haven't gotten to a point of submitting the change to the forum, but yes, there were some issues with the download submitted to the ZC forum. The first of which was that the zip file was corrupted, then when it was "repaired" the wrong (older) moo tools related javascript files were provided, which means the download didn't offer the desired/expected functionality.
That's been corrected in github, but needs to be submitted. Further in correcting that issue, it was rewritten to not require modification to core files (just template related files) by way of using notifiers that exist in ZC 1.5.5.
These files are found at: https://github.com/mc12345678/order-...ive/master.zip
What it means (and instruction still needs to be written/rewritten to address this drastic change), but basically would recommend undoing the file changes that were made using the current install and then apply/incorporate the files from the 155_files folder of the download. The changes that have been made to those files can remain, they just are unnecessary.
-
Re: Order Delivery Date Support Thread
Just to make sure I am correct.
I am going to revert the changed files from the Delivery Date addon back to the Original ZC files.
Then Get the files from the github link and use those instead.
Thanks again.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
plantman
Just to make sure I am correct.
I am going to revert the changed files from the Delivery Date addon back to the Original ZC files.
Then Get the files from the github link and use those instead.
Thanks again.
That is the suggestion. As far as reverting back to the original ZC files, if the files modified by this plugin were clean original ZC files, then yes restore them, if they had been modified by some other plugin, then they should be restored back to that. (Ultimately restored to the condition they were before adding this plugin).
-
Re: Order Delivery Date Support Thread
I have that working now. I still had to go in and take care of line 187 but it is working now.
Now when an order is placed the confirmation emails (admin and customer) are not showing the delivery date. The date is there when I look at it from the admin.
Can you give me some direction to fix that.
Thanks
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
plantman
I have that working now. I still had to go in and take care of line 187 but it is working now.
Now when an order is placed the confirmation emails (admin and customer) are not showing the delivery date. The date is there when I look at it from the admin.
Can you give me some direction to fix that.
Thanks
Html or plain text email?
-
Re: Order Delivery Date Support Thread
Sorry, I thought of that just now. They are the plain text emails. A lot of our customers are schools and html emails don't go through some of the systems well.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
plantman
Sorry, I thought of that just now. They are the plain text emails. A lot of our customers are schools and html emails don't go through some of the systems well.
Your includes/classes/orders.php file should have a notifier at or around line 1018:
Code:
$this->notify('NOTIFY_ORDER_EMAIL_BEFORE_PRODUCTS', array(), $email_order, $html_msg);
Also the new code located in includes/classes/observers/auto.order_delivery_date_observer.php within the function updateNotifyOrderEmailBeforeProducts should have a line:
Code:
$email_order .= EMAIL_TEXT_DELIVERY_DATE . ' ' . zen_db_output($callingClass->info['order_delivery_date']) . "\n\n";
that appends the delivery date to just after the customer provided comments block...
That the data is available in the admin does indicate that at least it was stored with the order and confirms that it is locatable in the database and therefore should be present to be used in the above code.
Ohhhh... That all is fine and dandy, but the identification of using the above function is missing from the observer class:
Add the following at line 33 (moving existing line 33 down one) of includes/classes/observers/auto.order_delivery_date_observer.php:
Code:
$attachNotifier[] = 'NOTIFY_ORDER_EMAIL_BEFORE_PRODUCTS';
Change shown and incorporated in master branch: https://github.com/mc12345678/order-delivery-date/commit/53e749993e8c6a02780a28ed7dc04477826735df#diff-dbecab78edebe73f70eecd555e1b74cd
-
Re: Order Delivery Date Support Thread
All of that appears to be there but but that doesn't seem to be doing the job.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
plantman
All of that appears to be there but but that doesn't seem to be doing the job.
Until about 15 minutes ago, the $attachNotifier identified above was not present in the file system:
The line listed in red below has been newly added to the file download, needs to be added to your installation, and would be a reason that the email would not include the order delivery date information (in either html or plain text).
This is from/to be in: includes/classes/observers/auto.order_delivery_date_observer.php
Code:
function __construct() {
$attachNotifier = array();
$attachNotifier[] = 'NOTIFY_ORDER_AFTER_QUERY';
$attachNotifier[] = 'NOTIFY_ORDER_CART_FINISHED';
$attachNotifier[] = 'NOTIFY_ORDER_DURING_CREATE_ADDED_ORDER_HEADER';
$attachNotifier[] = 'NOTIFY_ORDER_EMAIL_BEFORE_PRODUCTS';
$attachNotifier[] = 'NOTIFY_HEADER_START_CHECKOUT_SHIPPING';
$attachNotifier[] = 'ORDER_QUERY_ADMIN_COMPLETE';
$this->attach($this, $attachNotifier);
}
If it was added while still logged in from the previous test, may need to log out and log back in/clear cache/sessions for the information to get "refreshed". Otherwise, you may have read the message before it was modified and only now have seen the modification that fixes the issue. :)
-
Re: Order Delivery Date Support Thread
The added code took care of it. You are awesome. Thanks
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
plantman
The added code took care of it. You are awesome. Thanks
Keep the feedback coming in whatever it is you test, try, or use... Everyone that has written something or added their touch can only really know what is and is not working by the feedback from the users. Mind you, it's most helpful to everyone if at least a little self research is done, but everyone makes mistakes. I could have deleted that entire "logic", but if nothing else you can see the process of elimination that I used... :) Had to go back to the basics again. :)
Thank you for confirming it fixed the issue. Now to write some more instruction on how to manage a transition from an older version to this one and maybe how it can be operated in ZC 1.5.3/1.5.4 (was just looking at the notifiers to see if it was possible without significant change to the ZC software).
I have also seen that there might be a remote possibility of capturing a time option as requested a few pages back which means likely will want to introduce an auto-installer to make the overall installation and support easier...
-
Re: Order Delivery Date Support Thread
Posted version 2.5.2 of the plugin to the ZC software moderators.
Quote:
What changed v2.5.2:
- Removed modifications from core files and used the notifier/observer system instead for ZC 1.5.5. Specifically the autoloader system.
- Replaced the mootools javascript with software that works with ZC 1.5.5.
- Removed changes from template files that did not get incorporated into ZC 1.5.5.
- Added text to identify that the delivery date is optional/required.
Once accepted it will be available for download from the ZC forum from here.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mc12345678
Posted version 2.5.2 of the plugin to the ZC software moderators.
Once accepted it will be available for download from the ZC forum
from here.
Version 2.5.2 has been reviewed and posted and is available from this zen-cart link:
-
Re: Order Delivery Date Support Thread
Hi there and first off, thank you so much for this wonderful mod. It is extremely useful for logistics operations.
One question: is there anyway I can code it such that the delivery date picker pops up only for local orders and not international orders?
Right now, if an international customer ignores the date picker and doesn't make a selection, the customer isn't allowed to proceed to the next page.
Any insight will be greatly appreciated!
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
audrey
Hi there and first off, thank you so much for this wonderful mod. It is extremely useful for logistics operations.
One question: is there anyway I can code it such that the delivery date picker pops up only for local orders and not international orders?
Right now, if an international customer ignores the date picker and doesn't make a selection, the customer isn't allowed to proceed to the next page.
Any insight will be greatly appreciated!
At minimum there are two files that would require modification, the observer class and then the checkout_shipping template file. I assume that for "sanity's" sake that if the current page were loaded with a send-to address that is international, that you would *not* want to display the delivery date field, though perhaps that would be a separate control to be addressed. The "condition" would update based on page reload/change when selecting an alternate ship-to address.
Some things that need to be considered: Where the definition/control is to be placed to identify perhaps usage for 'national', 'international', or 'both' (shipping typically or possibly has such a control which can be adapted to this), the consideration of free shipping items (does the delivery date and/or identification of a delivery date factor into such a situation)
The below is completely untested and written from a perspective of "seems like it would work"...
Per the below, modify: includes/classes/observers/auto.order_delivery_date_observer.php
Add a new function just before:
Code:
function update(&$callingClass, $notifier) {
The function would be:
Code:
/**
* Function to support display of the delivery date based on known internally collected order information.
**/
function display_delivery_date($order = NULL) {
// if this function is called, but there is no ORDER_DELIVERY_DATE_LOCATION defined, then allow the delivery date to be displayed.
if (!defined('ORDER_DELIVERY_DATE_LOCATION')) return true;
// If the location to be sent to is not defined, then address information will not be available for the $order class to determine
// the destination, indicate to display the delivery date.
if (!isset($_SESSION['sendto']) return true;
if (!isset($order)) {
$order = $GLOBALS['order'];
}
if (!isset($order)) {
// This area may need additional assignments in order to generate the appropriate information to be handled below
// if $order has not previously been fully populated.
require(DIR_WS_CLASSES . 'order.php');
$order = new order;
}
$pass = false;
switch (ORDER_DELIVERY_DATE_LOCATION) {
case 'national':
if ($order->delivery['country_id'] == STORE_COUNTRY) {
$pass = true;
}
break;
case 'international':
if ($order->delivery['country_id'] != STORE_COUNTRY) {
$pass = true;
}
break;
case 'both':
$pass = true;
break;
}
return $pass;
}
Modify the function updateNotifyHeaderStartCheckoutShipping as below in red:
Code:
// ZC155: $zco_notifier->notify('NOTIFY_HEADER_START_CHECKOUT_SHIPPING');
// NOTIFY_HEADER_START_CHECKOUT_SHIPPING
function updateNotifyHeaderStartCheckoutShipping(&$callingClass, $notifier) {
global $order_delivery_date, $messageStack;
// BEGIN Order Delivery Date
if (isset($_SESSION['order_delivery_date'])) {
$order_delivery_date = (isset($_SESSION['order_delivery_date'])) ? $_SESSION['order_delivery_date'] : null;
}
if ( isset($_POST['action']) && ($_POST['action'] == 'process') ) {
if (zen_not_null($_POST['order_delivery_date'])) {
$_SESSION['order_delivery_date'] = zen_db_prepare_input($_POST['order_delivery_date']);
} else if (defined('MIN_DISPLAY_DELIVERY_DATE') && MIN_DISPLAY_DELIVERY_DATE > 0 && $this->display_delivery_date())
{
$messageStack->add_session('checkout_shipping', ERROR_PLEASE_CHOOSE_DELIVERY_DATE, 'error');
unset($_SESSION['order_delivery_date']);
unset($order_delivery_date);
zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
} else {
// If nothing was posted, and the date is not required, then
// be sure to clear the date from the session so that the
// nothing will carry forward.
unset($_SESSION['order_delivery_date']);
}
$order_delivery_date = isset($_SESSION['order_delivery_date']) ? $_SESSION['order_delivery_date'] : null; // modified for strict processing mc12345678 2018-01-24
}
}
Then modify the updateNotifyOrderCartFinished function as indicated below in red:
Code:
// ZC 1.5.5: $this->notify('NOTIFY_ORDER_CART_FINISHED');
// This point was chosen to have just one delivery date for the entire order.
// To support a different delivery date by product, would want to either cycle through all of the product in this
// function or use the notifier 'NOTIFY_ORDER_CART_ADD_PRODUCT_LIST' to work with each product as it comes along.
function updateNotifyOrderCartFinished(&$callingClass, $notifier) {
global $display_delivery_date;
$callingClass->info['order_delivery_date'] = (isset($_SESSION['order_delivery_date'])) ? $_SESSION['order_delivery_date'] : null;
// set the global variable to display the delivery date (or not) based on the destination of the delivery.
$display_delivery_date = $this->display_delivery_date($callingClass);
}
Then in the template files:
includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_shipping_default.php
and/or
includes/templates/YOUR_TEMPLATE_RESPONSIVE/templates/tpl_checkout_shipping_default.php
Find:
Code:
<!-- Bof Order Delivery Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo sprintf(TABLE_HEADING_DELIVERY_DATE, (defined('MIN_DISPLAY_DELIVERY_DATE') && MIN_DISPLAY_DELIVERY_DATE > 0) ? TABLE_HEADING_DELIVERY_DATE_IS_REQUIRED : TABLE_HEADING_DELIVERY_DATE_IS_OPTIONAL); ?></legend>
<label for="order_delivery_date">Date:</label>
<input id="date" name="order_delivery_date" type="text" value="<?php echo $order_delivery_date; ?>">
</fieldset>
<!-- Eof Order Delivery Date -->
And change per the below:
Code:
<!-- Bof Order Delivery Date -->
<?php if (isset($display_delivery_date) ? $display_delivery_date : true) { ?>
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo sprintf(TABLE_HEADING_DELIVERY_DATE, (defined('MIN_DISPLAY_DELIVERY_DATE') && MIN_DISPLAY_DELIVERY_DATE > 0) ? TABLE_HEADING_DELIVERY_DATE_IS_REQUIRED : TABLE_HEADING_DELIVERY_DATE_IS_OPTIONAL); ?></legend>
<label for="order_delivery_date">Date:</label>
<input id="date" name="order_delivery_date" type="text" value="<?php echo $order_delivery_date; ?>">
</fieldset>
<?php } ?>
<!-- Eof Order Delivery Date -->
Then, lastly, to define ORDER_DELIVERY_DATE_LOCATION to be one of the three values of: 'national', 'international', or 'both'.
Ideally/ultimately this may be in an admin setting; however, let's put it in a file for the moment.
add a new file: includes/extra_datafiles/order_delivery_date_location.php
that contains:
Code:
<?php
/**
* This file contains the definition for when to display the order delivery date field based on the shipping destination.
**/
define('ORDER_DELIVERY_DATE_LOCATION', 'both'); // values are 'national', 'international', or 'both'
If the above changes are entered in that sequence (and potentially tested at each "chunk" of addition), then operation should not be disturbed along the way.
Again, this has not been tested and was presented as a thought of what may be necessary...
-
Re: Order Delivery Date Support Thread
I posted this a couple of years ago - time is added in quite easily, but take note my instructions are for an older version of the module ....
Will note though that while I thought time selection was a great idea at the time, we have now abandoned it as we found it too hard to meet customer demands.
Zencart Order Delivery Date – Time Addition
Following documents changes I made to my 1.5.1 installation to add Order Delivery Time to your Zencart.
It assumes you have Order Delivery Date mod already installed.
Datebase changes
orders.order_delivery_date was added as type 'date'. This needs to be changed to 'datetime'.
admin/includes/classes
order.php
no change
admin/includes/languages/English
orders.php
Change -
define('TABLE_HEADING_DELIVERY_DATE', 'Desired Delivery Date');
define('ENTRY_DELIVERY_DATE', 'Desired Delivery Date:');
define('EMAIL_TEXT_DELIVERY_DATE', 'Desired Delivery Date:');
To -
define('TABLE_HEADING_DELIVERY_DATE', 'Desired Delivery Date');
define('ENTRY_DELIVERY_DATE', 'Desired Delivery Date:');
define('EMAIL_TEXT_DELIVERY_DATE', 'Desired Delivery Date:');
define('TABLE_HEADING_DELIVERY_TIME', 'Desired Delivery Time');
define('ENTRY_DELIVERY_TIME', 'Desired Delivery Time:');
define('EMAIL_TEXT_DELIVERY_TIME', 'Desired Delivery Time:');
invoice.php
Change -
define('ENTRY_DELIVERY_DATE', 'Desired Delivery Date:');
To -
define('ENTRY_DELIVERY_DATE', 'Desired Delivery Date:');
define('ENTRY_DELIVERY_TIME', 'Desired Delivery Time:');
packingslip.php
Change –
define('ENTRY_DELIVERY_DATE', 'Desired Delivery Date:');
To –
define('ENTRY_DELIVERY_DATE', 'Desired Delivery Date:');
define('ENTRY_DELIVERY_TIME', 'Desired Delivery Time:');
admin/
invoice.php
Change –
<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>
To -
<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>
<tr>
<td class="main"><strong><?php echo ENTRY_DELIVERY_TIME; ?></strong></td>
<td class="main"><?php echo substr(zen_datetime_short($order->info['order_delivery_date']) ,11); ?></td>
</tr>
orders.php
Change –
<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>
To –
<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>
<tr>
<td class="main"><strong><?php echo ENTRY_DELIVERY_TIME; ?></strong></td>
<td class="main"><?php echo substr(zen_datetime_short($order->info['order_delivery_date']) ,11); ?></td>
</tr>
packingslip.php
Change –
<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>
To –
<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>
<tr>
<td class="main"><strong><?php echo ENTRY_DELIVERY_TIME; ?></strong></td>
<td class="main"><?php echo substr(zen_datetime_short($order->info['order_delivery_date']) ,11); ?></td>
</tr>
email
no change
(this could be improved - but the time does appear next to delivery date.)
includes/classes
order.php
no change
includes/languages/english/TEMPLATE/
checkout_confirmation.php
Change –
// Begin Order Delivery Date
define('TABLE_HEADING_DELIVERY_DATE', 'Desired Delivery Date');
// End Order Delivery Date
To –
// Begin Order Delivery Date
define('TABLE_HEADING_DELIVERY_DATE', 'Desired Delivery Date');
define('TABLE_HEADING_DELIVERY_TIME', 'Desired Delivery Time by');
// End Order Delivery Date
checkout_process.php
Change –
// BEGIN Order Delivery Date
define('EMAIL_TEXT_DELIVERY_DATE', 'Desired Delivery Date:');
// END Order Delivery Date
To –
// BEGIN Order Delivery Date
define('EMAIL_TEXT_DELIVERY_DATE', 'Desired Delivery Date:');
define('EMAIL_TEXT_DELIVERY_TIME', 'Desired Delivery Time:');
// END Order Delivery Date
checkout_shipping.php
Change –
// BEGIN Order Delivery Date
define('TABLE_HEADING_DELIVERY_DATE', 'Desired Delivery Date is Required!');
define('ERROR_PLEASE_CHOOSE_DELIVERY_DATE', 'Please choose a delivery date');
// END Order Delivery
To –
// BEGIN Order Delivery Date
define('TABLE_HEADING_DELIVERY_DATE', 'Desired Delivery Date is Required!');
define('TABLE_HEADING_DELIVERY_TIME', 'Desired Delivery Time is Required!');
define('ERROR_PLEASE_CHOOSE_DELIVERY_DATE', 'Please choose a delivery date');
define('ERROR_PLEASE_CHOOSE_DELIVERY_TIME', 'Please choose a delivery time');
// END Order Delivery
includes/modules/pages/checkout_shipping
header_php.php
Change -
//BEGIN Order Delivery Date
if (zen_not_null($_POST['order_delivery_date'])) {
$_SESSION['order_delivery_date'] = zen_db_prepare_input($_POST['order_delivery_date']);
} elseif (MIN_DISPLAY_DELIVERY_DATE > 0)
{
$messageStack->add_session('checkout_shipping', ERROR_PLEASE_CHOOSE_DELIVERY_DATE, 'error');
To -
//BEGIN Order Delivery Date
if ($_POST['order_delivery_time'] == 'notselected') {
$messageStack->add_session('checkout_shipping', ERROR_PLEASE_CHOOSE_DELIVERY_TIME, 'error');
zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
}
if (zen_not_null($_POST['order_delivery_date'])) {
$_SESSION['order_delivery_date'] = zen_db_prepare_input($_POST['order_delivery_date'] . " " . $_POST['order_delivery_time']);
} elseif (MIN_DISPLAY_DELIVERY_DATE > 0)
{
$messageStack->add_session('checkout_shipping', ERROR_PLEASE_CHOOSE_DELIVERY_DATE, 'error');
jscript_a-mootools.js
no change
jscript_b-calendar.js
no change
jscript_calendar_head.php
no change
includes/templates/TEMPLATE/css
checkout_shipping
no change
includes/templates/TEMPLATE/images
no change
includes/templates/TEMPLATE/templates
tpl_checkout_confirmation_default.php
Change -
<?php // BEGIN Order Delivery Date ?>
<br />
<h3><?php echo TABLE_HEADING_DELIVERY_DATE; ?></h3>
<h4><?php echo zen_date_long($order->info['order_delivery_date']); ?></h4><br />
</div>
<?php // END Order Delivery Date ?>
To -
<?php // BEGIN Order Delivery Date ?>
<br />
<h3><?php echo TABLE_HEADING_DELIVERY_DATE; ?></h3>
<h4><?php echo zen_date_long($order->info['order_delivery_date']); ?></h4><br />
<h3><?php echo TABLE_HEADING_DELIVERY_TIME; ?></h3>
<h4><?php echo substr(zen_datetime_short($order->info['order_delivery_date']),11); ?></h4><br />
</div>
<?php // END Order Delivery Date ?>
tpl_checkout_shipping_default.php
please note I force my customers to choose a 2 hour time window - you can amend the option value statements below to best suit your needs. Do note that I do record the upper limit of the time window in the order.
Its up to you what business logic you wish to apply.
Change -
<!-- 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 -->
To -
<!-- 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>
<fieldset class="shipping" id="order_delivery_time">
<legend><?php echo TABLE_HEADING_DELIVERY_TIME; ?></legend>
<label for="order_delivery_time">Time:</label>
<select name="order_delivery_time" id="delivery_time">
<option value="notselected" selected="selected">Please select ...</option>
<option value="11:00">09:00-11:00</option>
<option value="12:00">10:00-12:00</option>
<option value="13:00">11:00-13:00</option>
<option value="14:00">12:00-14:00</option>
<option value="15:00">13:00-15:00</option>
<option value="16:00">14:00-16:00</option>
<option value="17:00">15:00-17:00</option>
<option value="18:00">16:00-18:00</option>
</select>
</fieldset>
<!-- Eof Order Delivery Date -->
-
Re: Order Delivery Date Support Thread
Thank you for replying!
I tried the code but failed at the first chunk at: function update(&$callingClass, $notifier) {
Immediately after, the my index page showed up blank.
I wonder if I am doing something wrong? Pardon me, I'm not only at an intermediate level. Appreciate any thoughts.
This is how it looks like after I added in the code before the above line.
Code:
// Need a test for presence of field/plugin? Prefer something already in memory rather than asking the DB.
$order = $db->Execute("SELECT order_delivery_date
from " . TABLE_ORDERS . "
where orders_id = " . (int)$order_id);
$callingClass->info = array_merge($callingClass->info, array('order_delivery_date' => $order->fields['order_delivery_date']));
}
/**
* Function to support display of the delivery date based on known internally collected order information.
**/
function display_delivery_date($order = NULL) {
// if this function is called, but there is no ORDER_DELIVERY_DATE_LOCATION defined, then allow the delivery date to be displayed.
if (!defined('ORDER_DELIVERY_DATE_LOCATION')) return true;
// If the location to be sent to is not defined, then address information will not be available for the $order class to determine
// the destination, indicate to display the delivery date.
if (!isset($_SESSION['sendto']) return true;
if (!isset($order)) {
$order = $GLOBALS['order'];
}
if (!isset($order)) {
// This area may need additional assignments in order to generate the appropriate information to be handled below
// if $order has not previously been fully populated.
require(DIR_WS_CLASSES . 'order.php');
$order = new order;
}
$pass = false;
switch (ORDER_DELIVERY_DATE_LOCATION) {
case 'national':
if ($order->delivery['country_id'] == STORE_COUNTRY) {
$pass = true;
}
break;
case 'international':
if ($order->delivery['country_id'] != STORE_COUNTRY) {
$pass = true;
}
break;
case 'both':
$pass = true;
break;
}
return $pass;
}
function update(&$callingClass, $notifier) {
Quote:
Originally Posted by
mc12345678
At minimum there are two files that would require modification, the observer class and then the checkout_shipping template file. I assume that for "sanity's" sake that if the current page were loaded with a send-to address that is international, that you would *not* want to display the delivery date field, though perhaps that would be a separate control to be addressed. The "condition" would update based on page reload/change when selecting an alternate ship-to address.
Some things that need to be considered: Where the definition/control is to be placed to identify perhaps usage for 'national', 'international', or 'both' (shipping typically or possibly has such a control which can be adapted to this), the consideration of free shipping items (does the delivery date and/or identification of a delivery date factor into such a situation)
The below is completely untested and written from a perspective of "seems like it would work"...
Per the below, modify: includes/classes/observers/auto.order_delivery_date_observer.php
Add a new function just before:
Code:
function update(&$callingClass, $notifier) {
The function would be:
Code:
/**
* Function to support display of the delivery date based on known internally collected order information.
**/
function display_delivery_date($order = NULL) {
// if this function is called, but there is no ORDER_DELIVERY_DATE_LOCATION defined, then allow the delivery date to be displayed.
if (!defined('ORDER_DELIVERY_DATE_LOCATION')) return true;
// If the location to be sent to is not defined, then address information will not be available for the $order class to determine
// the destination, indicate to display the delivery date.
if (!isset($_SESSION['sendto']) return true;
if (!isset($order)) {
$order = $GLOBALS['order'];
}
if (!isset($order)) {
// This area may need additional assignments in order to generate the appropriate information to be handled below
// if $order has not previously been fully populated.
require(DIR_WS_CLASSES . 'order.php');
$order = new order;
}
$pass = false;
switch (ORDER_DELIVERY_DATE_LOCATION) {
case 'national':
if ($order->delivery['country_id'] == STORE_COUNTRY) {
$pass = true;
}
break;
case 'international':
if ($order->delivery['country_id'] != STORE_COUNTRY) {
$pass = true;
}
break;
case 'both':
$pass = true;
break;
}
return $pass;
}
Modify the function updateNotifyHeaderStartCheckoutShipping as below in red:
Code:
// ZC155: $zco_notifier->notify('NOTIFY_HEADER_START_CHECKOUT_SHIPPING');
// NOTIFY_HEADER_START_CHECKOUT_SHIPPING
function updateNotifyHeaderStartCheckoutShipping(&$callingClass, $notifier) {
global $order_delivery_date, $messageStack;
// BEGIN Order Delivery Date
if (isset($_SESSION['order_delivery_date'])) {
$order_delivery_date = (isset($_SESSION['order_delivery_date'])) ? $_SESSION['order_delivery_date'] : null;
}
if ( isset($_POST['action']) && ($_POST['action'] == 'process') ) {
if (zen_not_null($_POST['order_delivery_date'])) {
$_SESSION['order_delivery_date'] = zen_db_prepare_input($_POST['order_delivery_date']);
} else if (defined('MIN_DISPLAY_DELIVERY_DATE') && MIN_DISPLAY_DELIVERY_DATE > 0 && $this->display_delivery_date())
{
$messageStack->add_session('checkout_shipping', ERROR_PLEASE_CHOOSE_DELIVERY_DATE, 'error');
unset($_SESSION['order_delivery_date']);
unset($order_delivery_date);
zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
} else {
// If nothing was posted, and the date is not required, then
// be sure to clear the date from the session so that the
// nothing will carry forward.
unset($_SESSION['order_delivery_date']);
}
$order_delivery_date = isset($_SESSION['order_delivery_date']) ? $_SESSION['order_delivery_date'] : null; // modified for strict processing mc12345678 2018-01-24
}
}
Then modify the updateNotifyOrderCartFinished function as indicated below in red:
Code:
// ZC 1.5.5: $this->notify('NOTIFY_ORDER_CART_FINISHED');
// This point was chosen to have just one delivery date for the entire order.
// To support a different delivery date by product, would want to either cycle through all of the product in this
// function or use the notifier 'NOTIFY_ORDER_CART_ADD_PRODUCT_LIST' to work with each product as it comes along.
function updateNotifyOrderCartFinished(&$callingClass, $notifier) {
global $display_delivery_date;
$callingClass->info['order_delivery_date'] = (isset($_SESSION['order_delivery_date'])) ? $_SESSION['order_delivery_date'] : null;
// set the global variable to display the delivery date (or not) based on the destination of the delivery.
$display_delivery_date = $this->display_delivery_date($callingClass);
}
Then in the template files:
includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_shipping_default.php
and/or
includes/templates/YOUR_TEMPLATE_RESPONSIVE/templates/tpl_checkout_shipping_default.php
Find:
Code:
<!-- Bof Order Delivery Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo sprintf(TABLE_HEADING_DELIVERY_DATE, (defined('MIN_DISPLAY_DELIVERY_DATE') && MIN_DISPLAY_DELIVERY_DATE > 0) ? TABLE_HEADING_DELIVERY_DATE_IS_REQUIRED : TABLE_HEADING_DELIVERY_DATE_IS_OPTIONAL); ?></legend>
<label for="order_delivery_date">Date:</label>
<input id="date" name="order_delivery_date" type="text" value="<?php echo $order_delivery_date; ?>">
</fieldset>
<!-- Eof Order Delivery Date -->
And change per the below:
Code:
<!-- Bof Order Delivery Date -->
<?php if (isset($display_delivery_date) ? $display_delivery_date : true) { ?>
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo sprintf(TABLE_HEADING_DELIVERY_DATE, (defined('MIN_DISPLAY_DELIVERY_DATE') && MIN_DISPLAY_DELIVERY_DATE > 0) ? TABLE_HEADING_DELIVERY_DATE_IS_REQUIRED : TABLE_HEADING_DELIVERY_DATE_IS_OPTIONAL); ?></legend>
<label for="order_delivery_date">Date:</label>
<input id="date" name="order_delivery_date" type="text" value="<?php echo $order_delivery_date; ?>">
</fieldset>
<?php } ?>
<!-- Eof Order Delivery Date -->
Then, lastly, to define ORDER_DELIVERY_DATE_LOCATION to be one of the three values of: 'national', 'international', or 'both'.
Ideally/ultimately this may be in an admin setting; however, let's put it in a file for the moment.
add a new file: includes/extra_datafiles/order_delivery_date_location.php
that contains:
Code:
<?php
/**
* This file contains the definition for when to display the order delivery date field based on the shipping destination.
**/
define('ORDER_DELIVERY_DATE_LOCATION', 'both'); // values are 'national', 'international', or 'both'
If the above changes are entered in that sequence (and potentially tested at each "chunk" of addition), then operation should not be disturbed along the way.
Again, this has not been tested and was presented as a thought of what may be necessary...
-
Re: Order Delivery Date Support Thread
Looking at it again, in first "chunk"
this:
Code:
if (!isset($_SESSION['sendto']) return true;
is missing a closing paranthesis:
Code:
if (!isset($_SESSION['sendto'])) return true;
-
Re: Order Delivery Date Support Thread
Thanks again! I added the parenthesis and tested the site at every "chunk" edit. The site is working with no issues now. However, the delivery date picker is still showing up even though I've selected an overseas address.
Is there some part of the code for the observer file that I'm not editing right? So far I've just cut and pasted wholesale.
Quote:
Originally Posted by
mc12345678
Looking at it again, in first "chunk"
this:
Code:
if (!isset($_SESSION['sendto']) return true;
is missing a closing paranthesis:
Code:
if (!isset($_SESSION['sendto'])) return true;
-
Re: Order Delivery Date Support Thread
Audrey,
Okay, had a chance to look this over and try to use it. As said it was untested. There were parts that worked, and parts that did not... For example, if the location were set to national and an international address were chosen, then the customer would not be able to check out and would be stuck in a loop. That has been corrected in the following commit that incorporates this entire concept.
Note, it defaults to accept the date from both national and international, then if one of those is chosen, the date box is defaulted to display always. To change either/both of these settings such that the date box only displays for orders that really need them, modify the settings in the includes/extra_datafiles/order_delivery_date_location.php file.
https://github.com/mc12345678/order-.../tree/locality
The specific commit where the changes are shown is: https://github.com/mc12345678/order-...35349c8124621b
-
Re: Order Delivery Date Support Thread
Ok, I think that flew right over my head. But thank you MC12345678 for taking the time to walk me through this. I'll try my best to follow. Really appreciate your time!
-
Re: Order Delivery Date Support Thread
Ok wow, I can't believe how easy your instructions were. I followed it to a T and the mod is working beautifully now. Thank you so much :)
For those looking to have the Delivery Date Picker show up only for local orders and not international orders, and if you have been following the thread, all I had to do was:
(1) edit the file -----> includes/extra_datafiles/order_delivery_date_location.php
with this define set to "national" instead of "both". like this:
Code:
<?php
/**
* This file contains the definition for when to display the order delivery date field based on the shipping destination.
**/
define('ORDER_DELIVERY_DATE_LOCATION', 'national'); // values are 'national', 'international', or 'both'
(2) THEN, make the changes to the file -----> includes/classes/observers/auto.order_delivery_date_observer.php
with the new edits in this link ------> https://github.com/mc12345678/order-...35349c8124621b
Psyched that this worked out. Thank you again MC12345678!
-
Re: Order Delivery Date Support Thread
Glad that worked out for you. It was an interesting issue to try to address, required some reworking of the code to be able to detect the delivery address.
Note: a separate setting to consider and to achieve the goal of item 1 above (or to always display the field) is that within the same file there is an additional define that should be considered. As provided it defaults to false, but if set to true then it would always display the field:
Code:
define('ORDER_DELIVERY_DATE_DISPLAY_ALWAYS', 'false');
Now though I just realized an additional "arrangement" of options. The text indicating that the delivery date for a national delivery is required but is optional for an international delivery. The code (checkout process) already operates in this manner, but the displayed text does not.
-
Re: Order Delivery Date Support Thread
Do you mean the text that is actually displayed on the website? I had no issue with that at all following the above.
In fact, I went a step further and applied the code you gave (below) for the template files to :
includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_shipping_confirmation.php
just so it doesn't pop up there as well and confuse the customer, being that they did not get the chance to select a date in the checkout payment step.
Code:
<!-- Bof Order Delivery Date -->
<?php if (isset($display_delivery_date) ? $display_delivery_date : true) { ?>
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo sprintf(TABLE_HEADING_DELIVERY_DATE, (defined('MIN_DISPLAY_DELIVERY_DATE') && MIN_DISPLAY_DELIVERY_DATE > 0) ? TABLE_HEADING_DELIVERY_DATE_IS_REQUIRED : TABLE_HEADING_DELIVERY_DATE_IS_OPTIONAL); ?></legend>
<label for="order_delivery_date">Date:</label>
<input id="date" name="order_delivery_date" type="text" value="<?php echo $order_delivery_date; ?>">
</fieldset>
<?php } ?>
<!-- Eof Order Delivery Date -->
As for this below, I omitted it and the mod still achieves the intended outcome. It's a safeguard I suppose and handy to have if you want to always have it on/off. How interesting!
Code:
define('ORDER_DELIVERY_DATE_DISPLAY_ALWAYS', 'false');
-
Re: Order Delivery Date Support Thread
Thank you for pointing out that part as well, will update the code accordingly.
You wouldn't have seen the issue I described based on your desired usage. The text display issue to which I was referring would be seen in the following "complex" condition:
Location to require entry set to something other than both.
Display of the field set to always (true).
The order_delivery_date identified as required (configuration->minimums area with a non-zero value)
And the purchaser having entered a shipto address that is opposite of the location setting.
When the checkout_shipping page is displayed, the text "above" the date field would be displayed as required, but the user could click through without entering anything because the existing internal checkout logic doesn't require the date to be entered for that condition.
The text should actually display as the date being optional at that point.
So instead of this logic:
Code:
defined('MIN_DISPLAY_DELIVERY_DATE') && MIN_DISPLAY_DELIVERY_DATE > 0) ? TABLE_HEADING_DELIVERY_DATE_IS_REQUIRED : TABLE_HEADING_DELIVERY_DATE_IS_OPTIONAL
It would be:
Code:
defined('MIN_DISPLAY_DELIVERY_DATE') && MIN_DISPLAY_DELIVERY_DATE > 0 && (method_exists($zcObserverOrderDeliveryDateObserver, 'display_delivery_date') ? $zcObserverOrderDeliveryDateObserver->display_delivery_date($order) : true)) ? TABLE_HEADING_DELIVERY_DATE_IS_REQUIRED : TABLE_HEADING_DELIVERY_DATE_IS_OPTIONAL
The addition, bolded above, will toggle the required to optional text in the condition described above.
Ideally, perhaps an additional function would be added to the code to identify that the date is required as compared to optional considering that logic is basically used in more than one place (internal to the observer and then in the template files).
On some other things, I see that the branch I set aside for this functionality did not end up with all of the code and that your previous post addressed that by reference to the other commit where the additional code ended up. I'm working to correct that issue and to have all of the added functionality to support this in one commit instead of spread out. I didn't see the template file that was specifically referenced, but am thinking that it was intended to be the checkout_confirmation not the checkout_shipping_confirmation page. Need to look a little further, but makes me wonder if anything further downstram needs to be modified such as the email, the admin orders, etc... I thought though that there was enough present to allow end user/installer to modify the output relatively consistently.
Btw, since I started writing this, I have updated the locality branch to incorporate the required/optional swap and properly pulled in the display_delivery_date function that accidentally was captured in a later commit instead of where it should have been.
Unfortunately, with the complexity that this module is beginning to have, it is almost as if a separate configuration area may be necessary to support the additional features which may not be a bad thing considering it would then make it easier to modify the operation of the script when/where it is used. Especially if the previously posted method of incorporating a time option is used (instead of using a script based method of incorporating a time picker.)
-
Re: Order Delivery Date Support Thread
Does anyone here know if a module is available that uses (adjustable) time slots instead of calendar days? (It doesn't have to be free, and it would sure remove a lot of headaches I currently have trying to cobble something together through the checkout).
What I need is a module that lets me assign "so many orders for this slot" (or "so many order-$$$ for this slot" or a combination of both), and that lets me variate the size of the slot (e.g. from 2 hours to 3 or 4 hours), and delivery slots auto-closing after a pre-determined cut-off (e.g. at 10 am the delivery slot for 2pm-4pm disappears or is disabled). Ideally there would be a selectable date, with the available slots appearing after the delivery date has been chosen.
Thanks in advance.
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
jkenwell
Does anyone here know if a module is available that uses (adjustable) time slots instead of calendar days? (It doesn't have to be free, and it would sure remove a lot of headaches I currently have trying to cobble something together through the checkout).
What I need is a module that lets me assign "so many orders for this slot" (or "so many order-$$$ for this slot" or a combination of both), and that lets me variate the size of the slot (e.g. from 2 hours to 3 or 4 hours), and delivery slots auto-closing after a pre-determined cut-off (e.g. at 10 am the delivery slot for 2pm-4pm disappears or is disabled). Ideally there would be a selectable date, with the available slots appearing after the delivery date has been chosen.
Thanks in advance.
This site uses a custom delivery date, time, phone and message - http://uniquedesignsflorist.ca/ during the checkout process. It could be modified to use time slots if you would like. The newest version has been updated on the backend to deliver extra info directly to email so employees can pick orders straight from their phones :)
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
twitchtoo
This site uses a custom delivery date, time, phone and message -
http://uniquedesignsflorist.ca/ during the checkout process. It could be modified to use time slots if you would like. The newest version has been updated on the backend to deliver extra info directly to email so employees can pick orders straight from their phones :)
Would you by chance happen to have screenshots of the look and features? Out of respect, I'd hate to create a bum clutter account on the site just to look at it. :-) And what sort of $$ would I be looking at for the modification?
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
jkenwell
Would you by chance happen to have screenshots of the look and features? Out of respect, I'd hate to create a bum clutter account on the site just to look at it. :-) And what sort of $$ would I be looking at for the modification?
If it hasn't already, please consider moving this conversation to private messaging or branch off to a new thread (feel free to reference it here if that is done), but the discussion has degraded to discuss things that are not acceptable in the open forum.
-
1 Attachment(s)
Re: Order Delivery Date Support Thread
Hi there,
Would anyone be able to advise how I can adjust the delivery date picker box size? The dates seem to be spilling out of the background. Attached picture below. Much appreciated!
Attachment 17727
-
Re: Order Delivery Date Support Thread
At moment not able to identify the specific change necessary (at least two reasons: on a cell phone and for those with access to a browser that supports such review not having the web address to see what can be done.)
The css though is located in: includes/templates/YOUR_TEMPLATE_RESPONSIVE/css/checkout_shipping.css
And with that, it would seem that perhaps some changes are necessary to further support a responsive design/layout.
-
Re: Order Delivery Date Support Thread
Thanks for the quick reply yet again.
Does it mean anything if the same issue is showing on both mobile and desktop browser?
This is my site https://www.sabun.com.sg
Quote:
Originally Posted by
mc12345678
At moment not able to identify the specific change necessary (at least two reasons: on a cell phone and for those with access to a browser that supports such review not having the web address to see what can be done.)
The css though is located in: includes/templates/YOUR_TEMPLATE_RESPONSIVE/css/checkout_shipping.css
And with that, it would seem that perhaps some changes are necessary to further support a responsive design/layout.
-
Re: Order Delivery Date Support Thread
Oh boy can't believe I did it. Thank you mc12345678 for pointing me to the right file. I did some experimenting and found the code to edit.
at line 42 of the checkout_shipping.cc file.
Code:
div.calendar {
background: url(../images/calendar/calendar.png);
height: 195px;
padding: 0 6px;
text-align: center;
width: 160px;
-
Re: Order Delivery Date Support Thread
Hi everyone, would anyone happen to know how to fix or have encountered a wrong shipping date displayed?
If someone were to select a shipping date and go through the checkout as per normal, theres no issue.
The problem occurs when someone tries to EDIT the date after first selecting it on the previous checkout_shipping page, the date then randomly pick a date in the past like "October 18 2002" for example.
Any insight would be appreciated!
-
Re: Order Delivery Date Support Thread
Okay I figured out why. I had changed the date format in jscript_calendar_head.php from { myCal = new Calendar({ date: 'Y-m-d' } to { myCal = new Calendar({ date: 'd-m-Y' } and it screwed up the display on the check out page.
Quote:
Originally Posted by
audrey
Hi everyone, would anyone happen to know how to fix or have encountered a wrong shipping date displayed?
If someone were to select a shipping date and go through the checkout as per normal, theres no issue.
The problem occurs when someone tries to EDIT the date after first selecting it on the previous checkout_shipping page, the date then randomly pick a date in the past like "October 18 2002" for example.
Any insight would be appreciated!
-
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
audrey
Okay I figured out why. I had changed the date format in jscript_calendar_head.php from { myCal = new Calendar({ date: 'Y-m-d' } to { myCal = new Calendar({ date: 'd-m-Y' } and it screwed up the display on the check out page.
Thanks for reporting back your findings. That saved a lot of retesting as maintaining the previously entered date was part of the (re-)design consideration to support looping back to the checkout_shipping page.
-
3 Attachment(s)
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
I need help on making this module work.
I am using zencart 1.5.5f with one page checkout.
I managed to have calendar displaying on the checkout page. I am able to pick up a date even though it is appears backward once selected.
However, after completing the order, the date being displayed on the order in admin is 11/30/1999.
Any help on making this work would be greatly appreciated.
Attachment 17972
Attachment 17973
Attachment 17974
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
nicksab
I need help on making this module work.
I am using zencart 1.5.5f with one page checkout.
I managed to have calendar displaying on the checkout page. I am able to pick up a date even though it is appears backward once selected.
However, after completing the order, the date being displayed on the order in admin is 11/30/1999.
Any help on making this work would be greatly appreciated.
Attachment 17972
Attachment 17973
Attachment 17974
I started looking at this about 6 hours ago against an update to the module. While I continue to look into this, may I suggest verifying that the files are also installed in accordance with using the normal checkout method and temporarily disabling one-page-checkout to see that normal operation is working in this setup?
As to the date "being reversed", it is stored in ISO 8601 format of YYYY-MM-DD.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
mc12345678
I started looking at this about 6 hours ago against an update to the module. While I continue to look into this, may I suggest verifying that the files are also installed in accordance with using the normal checkout method and temporarily disabling one-page-checkout to see that normal operation is working in this setup?
As to the date "being reversed", it is stored in ISO 8601 format of YYYY-MM-DD.
Well, I have some updates I'd like to push to github, but someone just ran into a lightpole in the area and knocked out power to several blocks... so going to be a bit. I've made some improvements to try to back away from edits in template files and use more of the notify/observer system. Additionally it incorporates changes discussed over the last few pages including reintroducing some of the mootools javascript from a few versions ago that works when jQuery.noConflict() is introduced (will be included in this coming release).
Nicksab, I'd still be interested to hear what issues the standard install (without possibly incorporating information presented in this forum since last release) has in it so that I can be sure they are incorporated as I've run this new version without any issue, but guess I need to go through the install to be sure that I have all the necessary files in the distribution.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
mc12345678
Well, I have some updates I'd like to push to github, but someone just ran into a lightpole in the area and knocked out power to several blocks... so going to be a bit. I've made some improvements to try to back away from edits in template files and use more of the notify/observer system. Additionally it incorporates changes discussed over the last few pages including reintroducing some of the mootools javascript from a few versions ago that works when jQuery.noConflict() is introduced (will be included in this coming release).
Nicksab, I'd still be interested to hear what issues the standard install (without possibly incorporating information presented in this forum since last release) has in it so that I can be sure they are incorporated as I've run this new version without any issue, but guess I need to go through the install to be sure that I have all the necessary files in the distribution.
sorry for the delayed response.
I tried it with the classic default template and I am getting the exact same issue as mentioned before.
I will try to reinstall the module ( lastest version ) again and see if the problem still persist.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
mc12345678
Well, I have some updates I'd like to push to github, but someone just ran into a lightpole in the area and knocked out power to several blocks... so going to be a bit. I've made some improvements to try to back away from edits in template files and use more of the notify/observer system. Additionally it incorporates changes discussed over the last few pages including reintroducing some of the mootools javascript from a few versions ago that works when jQuery.noConflict() is introduced (will be included in this coming release).
Nicksab, I'd still be interested to hear what issues the standard install (without possibly incorporating information presented in this forum since last release) has in it so that I can be sure they are incorporated as I've run this new version without any issue, but guess I need to go through the install to be sure that I have all the necessary files in the distribution.
After reinstalling the module, it works fine with OPC disabled. How do I make it work with One Page Checkout?
Thank you
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
In the docs for OPC you'll find the fix to help with the MooTools use.
Quote:
The plugin's design also utilizes jQuery as its AJAX interface to the various updates required. There are some Zen Cart plugins that use the MooTools interface that will need a little extra "care and feeding" for compatibility with One-Page Checkout. OPC's v1.0.8 release provides the changes that enable interoperation with MooTools, but some plugin-specific changes might be needed in addition — specifically:
- Order Delivery Date. You'll need to copy that plugin's jscript*.* files to the /includes/modules/pages/checkout_one directory and modify the file jscript_a-mootools.js, adding the highlighted line to the top of that module:
//MooTools, , My Object Oriented (JavaScript) Tools. Copyright (c) 2006-2009 Valerio Proietti, , MIT Style License.
jQuery.noConflict();
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
dbltoe
In the docs for OPC you'll find the fix to help with the MooTools use.
Thanks for the reply. I will try that.
Is there a way to reverse the date displayed as well?
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
dbltoe
In the docs for OPC you'll find the fix to help with the MooTools use.
For the love of Zen Cart, I tried everything but I can t get it to work with OPC.
For some reason, it is not registering the date on the order. I keeps displaying the same date over and over again.
I works fine with OPC disable. If I disable OPC and pick a date, like 08-08-18, it will displayed and registered fine on the order ( admin). However, once I switch OPC back on, no matter how many orders or which date I choose, it will always display 08-08-18 on the admin.
Here is what I did:
- copied all the files from /modules/pages/checkout_shipping to /modules/pages/checkout_one
- copied the following code from /templates_default/tpl_checkout_shipping_default.php to template_default/checkout_one_default.php
<!-- 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 -->
- copied css from checkout_shipping.css to checkout_one.css to have the calendear displayed correctly.
- added the jQuery.noConflict(); to jscript_a-mootools.js
But after all this, it is not working....
Please help thank you
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
nicksab
For the love of Zen Cart, I tried everything but I can t get it to work with OPC.
For some reason, it is not registering the date on the order. I keeps displaying the same date over and over again.
I works fine with OPC disable. If I disable OPC and pick a date, like 08-08-18, it will displayed and registered fine on the order ( admin). However, once I switch OPC back on, no matter how many orders or which date I choose, it will always display 08-08-18 on the admin.
Here is what I did:
- copied all the files from /modules/pages/checkout_shipping to /modules/pages/checkout_one
- copied the following code from /templates_default/tpl_checkout_shipping_default.php to template_default/checkout_one_default.php
<!-- 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 -->
- copied css from checkout_shipping.css to checkout_one.css to have the calendear displayed correctly.
- added the jQuery.noConflict(); to jscript_a-mootools.js
But after all this, it is not working....
Please help thank you
If you truly copied all of the files of your store from includes/modules/pages/checkout_shipping to includes/modules/pages/checkout_one, then that would be a source of the problem.
The only software from the checkout_shipping directory above needed to support this plugin is that added to that directory to support this plugin. So namely first the javascript file and then possibly some of the code that is inside the header_php.php file, but not that entire file.
I've been working on a slight rewrite to pull code out of that file and make a few other improvements.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
mc12345678
If you truly copied all of the files of your store from includes/modules/pages/checkout_shipping to includes/modules/pages/checkout_one, then that would be a source of the problem.
The only software from the checkout_shipping directory above needed to support this plugin is that added to that directory to support this plugin. So namely first the javascript file and then possibly some of the code that is inside the header_php.php file, but not that entire file.
I've been working on a slight rewrite to pull code out of that file and make a few other improvements.
By "all files", I mean I copied from the plug-in to the checkout_one and nopt from the store:
jscript_calendar_head.php
jscript_b-calendar.js
jscript_a-mootools.js
This was suggested here because the calendar was not displaying.
The plug in file I downloaded do not include any header_php.php file. The plug in works great with OPC off. It just won t register the date into the order when OPC is on.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
nicksab
By "all files", I mean I copied from the plug-in to the checkout_one and nopt from the store:
jscript_calendar_head.php
jscript_b-calendar.js
jscript_a-mootools.js
This was suggested
here because the calendar was not displaying.
The plug in file I downloaded do not include any header_php.php file. The plug in works great with OPC off. It just won t register the date into the order when OPC is on.
Anybody please??
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
nicksab
Anybody please??
I'll be trying to implement the combination again soon... Have some other things I need to do, if there is anyone else that steps up then good, also.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
mc12345678
I'll be trying to implement the combination again soon... Have some other things I need to do, if there is anyone else that steps up then good, also.
Yeah, not feeling the love with trying to integrate... I thought that for sure it would still notify as if there had been no changes; however, its an entirely different set of operations and therefore things done to offer more of a plugin nature to ZC are basically useless and have to figure out how to integrate this module into that one.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
mc12345678
Yeah, not feeling the love with trying to integrate... I thought that for sure it would still notify as if there had been no changes; however, its an entirely different set of operations and therefore things done to offer more of a plugin nature to ZC are basically useless and have to figure out how to integrate this module into that one.
If you need notifiers added, just let me know via post to the One-Page Checkout's support thread.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Submitted version 2.6.1 of the plugin to incorporate operation with One Page Checkout and a few other minor updates/modifications.
Quote:
(v2.6.1) as identified by a few people, the new checkout plugin that offers a single page check (One Page Checkout) was found not to be compatible with this plugin. This version incorporates use of notifiers in that software and the way it has reworked core Zen Cart operation to maintain operation. Also more work has been done to move operations further away from the core code and to make use of common characteristics in the Zen Cart software.
- Modified the template files to expand the ability to offer modified content.
- Modified usage of global variables to reference $GLOBALS[''] instead of using the global construct.
- Updated the jscript_a-mootools.js file to version 1.2.5.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
lat9
If you need notifiers added, just let me know via post to the One-Page Checkout's support thread.
For operation with this plugin its not necessary, I just expected more integration of existing code into the plugin.
Added observation of more notifiers to integrate and had to add some code because of not posting the action=process parameter when submitting the payment/address/shipping page. Just worked around it.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Thank you. I really appreciate the hard work. Hopefully it will fix my issue
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
umm ok. This is still not working for me.
I got the version 2.6.1 from GitHub.
I installed all the files on a fresh version of zc 1.5.5f with OPC 2.0.4.
If OPC is set to false, everything works like a charm.
If OPC is set to true, Order delivery date is not being displayed on the checkout_one page.
What am I missing?
I feel really stupid right now and I think I need someone to walk me thru it. Please
Thank you.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
nicksab
umm ok. This is still not working for me.
I got the version 2.6.1 from GitHub.
I installed all the files on a fresh version of zc 1.5.5f with OPC 2.0.4.
If OPC is set to false, everything works like a charm.
If OPC is set to true, Order delivery date is not being displayed on the checkout_one page.
What am I missing?
I feel really stupid right now and I think I need someone to walk me thru it. Please
Thank you.
So, I didn't include the modified template file I think called tpl_checkout_one.php. Do still need to modify that file to include the display of the date "box". Plus there were some other modifications to be made/incorporated as discused above. (I used a post from the previous page I believe it was where it described the css that needed to be copied over, etc...)
The biggest fix made in 2.6.1 is that the data once captured on the store front now carries over into the admin (and not just the email) and I went ahead and incorporated the jquery.noConflict() command which was sadly necessary to even use this most recent file version of the mootools software.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
mc12345678
So, I didn't include the modified template file I think called tpl_checkout_one.php. Do still need to modify that file to include the display of the date "box". Plus there were some other modifications to be made/incorporated as discused above. (I used a post from the previous page I believe it was where it described the css that needed to be copied over, etc...)
The biggest fix made in 2.6.1 is that the data once captured on the store front now carries over into the admin (and not just the email) and I went ahead and incorporated the jquery.noConflict() command which was sadly necessary to even use this most recent file version of the mootools software.
Sounds really nice. If this could work with OPC, it will be a great combo.
Thank you for the hard work. Can t wait to give it a try
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Using Order Delivery Date v2.6.1 and OPC v2.0.4 on Zen Cart 1.5.5f. Here's what's needed for the integration:
* Update your template's version of checkout_one.css, appending the styling provided by ODD's checkout_shipping.css.
* Copy the ODD files provided in /includes/modules/pages/checkout_shipping to /includes/modules/pages/checkout_one.
* Copy /includes/templates/template_default/templates/tpl_modules_opc_shipping_choices.php to /includes/templates/YOUR_TEMPLATE/templates/ and make the changes highlighted below:
Code:
<div id="checkoutShippingContentChoose" class="important"><?php echo TEXT_NO_SHIPPING_AVAILABLE; ?></div>
<?php
}
?>
<!-- Bof Order Delivery Date -->
<?php if (isset($display_delivery_date) ? $display_delivery_date : true) { ?>
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo sprintf(TABLE_HEADING_DELIVERY_DATE, (defined('MIN_DISPLAY_DELIVERY_DATE') && MIN_DISPLAY_DELIVERY_DATE > 0 && (method_exists($zcObserverOrderDeliveryDateObserver, 'display_delivery_date') ? $zcObserverOrderDeliveryDateObserver->display_delivery_date($order) : true)) ? TABLE_HEADING_DELIVERY_DATE_IS_REQUIRED : TABLE_HEADING_DELIVERY_DATE_IS_OPTIONAL); ?></legend>
<label for="order_delivery_date">Date:</label>
<input id="date" name="order_delivery_date" type="text" value="<?php echo $order_delivery_date; ?>">
</fieldset>
<?php } ?>
<!-- Eof Order Delivery Date -->
<?php
} //-Order is not "virtual", display full shipping-method block
* Copy /includes/templates/template_default/templates/tpl_checkout_one_confirmation.php to /includes/templates/YOUR_TEMPLATE/templates/ and make the changes highlighted below:
Code:
<h3 id="checkoutConfirmDefaultShipment"><?php echo HEADING_SHIPPING_METHOD; ?></h3>
<h4 id="checkoutConfirmDefaultShipmentTitle"><?php echo $order->info['shipping_method']; ?></h4>
<?php
/* BEGIN Order Delivery Date */
if (isset($display_order_delivery_date) && $display_order_delivery_date) { ?>
<br />
<h3><?php echo TABLE_HEADING_DELIVERY_DATE; ?></h3>
<div class="buttonRow forward"><?php echo '<a href="' . $editShippingButtonLink . '">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?></div>
<h4><?php echo $order_delivery_date_text; ?></h4><br />
<?php } /* END Order Delivery Date*/
}
?>
</div>
* Update your admin's Configuration->One-Page Checkout Settings, adding each payment method you support to the Payment Methods Requiring Confirmation list.
* Copy /includes/languages/english/checkout_one_confirmation.php to /includes/languages/english/YOUR_TEMPLATE/checkout_one_confirmation.php and add the language constants required by ODD (you wouldn't need to do this if they were in an extra_definitions file).
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
lat9
Using Order Delivery Date v2.6.1 and OPC v2.0.4 on Zen Cart 1.5.5f. Here's what's needed for the integration:
* Update your template's version of checkout_one.css, appending the styling provided by ODD's checkout_shipping.css.
* Copy the ODD files provided in /includes/modules/pages/checkout_shipping to /includes/modules/pages/checkout_one.
* Copy /includes/templates/template_default/templates/tpl_modules_opc_shipping_choices.php to /includes/templates/YOUR_TEMPLATE/templates/ and make the changes highlighted below:
Code:
<div id="checkoutShippingContentChoose" class="important"><?php echo TEXT_NO_SHIPPING_AVAILABLE; ?></div>
<?php
}
?>
<!-- Bof Order Delivery Date -->
<?php if (isset($display_delivery_date) ? $display_delivery_date : true) { ?>
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo sprintf(TABLE_HEADING_DELIVERY_DATE, (defined('MIN_DISPLAY_DELIVERY_DATE') && MIN_DISPLAY_DELIVERY_DATE > 0 && (method_exists($zcObserverOrderDeliveryDateObserver, 'display_delivery_date') ? $zcObserverOrderDeliveryDateObserver->display_delivery_date($order) : true)) ? TABLE_HEADING_DELIVERY_DATE_IS_REQUIRED : TABLE_HEADING_DELIVERY_DATE_IS_OPTIONAL); ?></legend>
<label for="order_delivery_date">Date:</label>
<input id="date" name="order_delivery_date" type="text" value="<?php echo $order_delivery_date; ?>">
</fieldset>
<?php } ?>
<!-- Eof Order Delivery Date -->
<?php
} //-Order is not "virtual", display full shipping-method block
* Copy /includes/templates/template_default/templates/tpl_checkout_one_confirmation.php to /includes/templates/YOUR_TEMPLATE/templates/ and make the changes highlighted below:
Code:
<h3 id="checkoutConfirmDefaultShipment"><?php echo HEADING_SHIPPING_METHOD; ?></h3>
<h4 id="checkoutConfirmDefaultShipmentTitle"><?php echo $order->info['shipping_method']; ?></h4>
<?php
/* BEGIN Order Delivery Date */
if (isset($display_order_delivery_date) && $display_order_delivery_date) { ?>
<br />
<h3><?php echo TABLE_HEADING_DELIVERY_DATE; ?></h3>
<div class="buttonRow forward"><?php echo '<a href="' . $editShippingButtonLink . '">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?></div>
<h4><?php echo $order_delivery_date_text; ?></h4><br />
<?php } /* END Order Delivery Date*/
}
?>
</div>
* Update your admin's
Configuration->One-Page Checkout Settings, adding each payment method you support to the
Payment Methods Requiring Confirmation list.
* Copy /includes/languages/english/checkout_one_confirmation.php to /includes/languages/english/YOUR_TEMPLATE/checkout_one_confirmation.php and add the language constants required by ODD (you wouldn't need to do this if they were in an extra_definitions file).
Thank you very much. It seems to be working like a charm so far. This should even be part of the readme file or something.
I do have 2 last questions on this mods.
First, I am using this an older version of this plugin on another website with ZC 1.5.1. I did the change on post #7 of this threads so ODD will move forward to the next day after a certain time.
Is there a way of doing the same thing with the newer version of ODD? I have it set to 0 now so it allows same day delivery all day. However, I need it to move forward to the next day once it pass like 1 PM.
Second, the inverted date is still a little bit confusing. I tried to change Y-m-d to m-d-Y but it just breaks the whole thing.
Sorry for the long post. I am in no way a programmer obviously and I could use some more help
Thank you
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
nicksab
Thank you very much. It seems to be working like a charm so far. This should even be part of the readme file or something.
I do have 2 last questions on this mods.
First, I am using this an older version of this plugin on another website with ZC 1.5.1. I did the change on post #7 of this threads so ODD will move forward to the next day after a certain time.
Is there a way of doing the same thing with the newer version of ODD? I have it set to 0 now so it allows same day delivery all day. However, I need it to move forward to the next day once it pass like 1 PM.
Second, the inverted date is still a little bit confusing. I tried to change Y-m-d to m-d-Y but it just breaks the whole thing.
Sorry for the long post. I am in no way a programmer obviously and I could use some more help
Thank you
The application as generally provided has been put together to use javascript. The current javascript code being used does not differentiate options by hours; however, there are some options available. For one, to revert back to what was used when this plugin was first developed would modify the below code found in includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_shipping_default.php:
Code:
<!-- Bof Order Delivery Date -->
<?php if (isset($display_delivery_date) ? $display_delivery_date : true) { ?>
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo sprintf(TABLE_HEADING_DELIVERY_DATE, (defined('MIN_DISPLAY_DELIVERY_DATE') && MIN_DISPLAY_DELIVERY_DATE > 0 && (method_exists($zcObserverOrderDeliveryDateObserver, 'display_delivery_date') ? $zcObserverOrderDeliveryDateObserver->display_delivery_date($order) : true)) ? TABLE_HEADING_DELIVERY_DATE_IS_REQUIRED : TABLE_HEADING_DELIVERY_DATE_IS_OPTIONAL); ?></legend>
<label for="order_delivery_date">Date:</label>
<input id="date" name="order_delivery_date" type="text" value="<?php echo $order_delivery_date; ?>">
</fieldset>
<?php } ?>
<!-- Eof Order Delivery Date -->
and to replace the input line with:
Code:
<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>
Modifying the content of the for loop as necessary to support your business and date(s).
The date/time will still be stored in the database expected format of year-month-day; however, the selection option will be presented as desired/formatted.
As to using the provided javascript calendar to display the format differently, basically I envision that additional javascript would be necessary to do something like hide the provided input box providing an additional box that is formatted to display the result(s) desired and updated when the base data is modified. The reason for this operation is that if the visiting customer either does not have javascript/jquery/etc..., has disabled it, or there is a network problem, then the existing field would still be displayed and support data entry, though it would be expected to be in the year-month-day format.
Alternatively, the includes/modules/pages/checkout_shipping/jscript_calendar_head.php file could be modified following the instruction of the file and possibly the logic of above to disable today's date based on the page load time being above a certain value. This could be done by setting/adjusting the DIRECTION parameter following this instruction that is contained in the file:
Quote:
DIRECTION - A positive or negative integer that determines the calendar's direction: n (a positive number) the calendar is future-only beginning at n days after today; -n (a negative number) the calendar is past-only ending at n days before today; 0 (zero) the calendar has no future or past restrictions (default). Note if you would like the calendar to be directional starting from today–as opposed to (1) tomorrow or (-1) yesterday–use a positive or negative fraction, such as direction: .5 (future-only, starting today).
This could be applied by the following in that file changing the default:
Code:
?>
<script type="text/javascript">
window.addEvent('domready', function() { myCal = new Calendar({ date: 'Y-m-d' }, { blocked: ['24-25,31 12 *', '0 * * 0'], direction: 3, draggable: false }); });
</script>
<?php /*
to:
Code:
$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 representing the hour portion of time where still can use the "earliest" available date.
$time_zone_adjust = '0'; // use this to adjust your hour value forward or backwards
$display_current_time = false; // Change 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 (if applicable echo code has been added there see post #7 of the forum thread).
$current_adjusted_hour = ($current_hour + $time_zone_adjust);
$direction_add = 1;
if($current_adjusted_hour <= $begin_cutoff_hour) {
$direction_add = 0;
}
?>
<script type="text/javascript">
window.addEvent('domready', function() { myCal = new Calendar({ date: 'Y-m-d' }, { blocked: ['24-25,31 12 *', '0 * * 0'], direction: <?php echo 3 + $direction_add; ?>, draggable: false }); });
</script>
<?php /*
The echo 3 + $direction_add will either add a day or not to the existing 3 days from today.
As for instructions, well, I had set out to incorporate direction similar to above; however, besides at the time getting to a point of just moving on (still need to report issues encountered at the plugin's thread) also realized that the other plugin is still changing in various ways so didn't want to make the instructions so detailed that they have to change daily plus not being involved in the day-to-day development don't necessarily know the next direction it will take.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quick question - if I have 1.5.4 installed should I be using the 1.5.1 or 1.5.5 version ?
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
royaldave
Quick question - if I have 1.5.4 installed should I be using the 1.5.1 or 1.5.5 version ?
Stuck your foot out there did you? :) The right answer is that should be using ZC 1.5.5 or the most recently released production version; however, I would expect that the software provided in the package download would work using the 1.5.5 fileset for as far back as ZC 1.5.3, though it has not been tested.
I will say that in use of any provided template file, the important thing is to incorporate the Order Delivery Date changes provided into your existing template file or if that template file is unchanged, to use the template_default version of that file to incorporate the changes.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
mc12345678
Stuck your foot out there did you? :) The right answer is that should be using ZC 1.5.5 or the most recently released production version; however, I would expect that the software provided in the package download would work using the 1.5.5 fileset for as far back as ZC 1.5.3, though it has not been tested.
I will say that in use of any provided template file, the important thing is to incorporate the Order Delivery Date changes provided into your existing template file or if that template file is unchanged, to use the template_default version of that file to incorporate the changes.
Seems to be working - EXCEPT - if I don't select a date it displays - ERROR_PLEASE_CHOOSE_DELIVERY_DATE - even though I have updated checkout_shipping.php in languages.
Not using OPC.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Whenever you see something in all caps with underlines in between words, your seeing a display letting you know that the variable has not been defined. You may have placed the checkout_shipping.php in the wrong directory, it may be missing, or the define may be done incorrectly.
Look for includes/languages/english/YOUR_TEMPLATE/checkout_shipping.php
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Haven't seen anyone post about trying to use this with ZC 1.5.6 or issues directly related to using this with ZC 1.5.6 (where more likely to have stricter controls over operations); however, did want to provide some information if a problem occurs that identifies this plugin by reference to the table orders field order_delivery_date.
Operation on my test site shows history that at some point in use/development a date of 0000-00-00 was stored in the field; however, in operation of the current version it appears to properly store a value of null. That said, I wanted to address the problem before it was identified as an issue if it is/has been.
My suggestion first would be that while the database modifications of this plugin are present, that the following SQL be executed prior to attempting to upgrade to ZC 1.5.6 or if you ever encounter a problem modifying the orders table and the order_delivery_date field is identified as a problem.
The problem statement that may be expected to be seen in the zcInstall related logs would be something like:
Code:
[DATE_AND_TIME_OF_ISSUE SERVER_TIMEZONE] MySQL error 1292 encountered during zc_install:
Incorrect date value: '0000-00-00 00:00:00' for column 'order_delivery_date' at row XXX
ALTER TABLE orders ADD order_weight FLOAT default NULL;
The following SQL could be executed to eliminate any such issue with the order_delivery_date field.
Code:
UPDATE orders SET order_delivery_date = NULL WHERE order_delivery_date < '0001-01-01' and order_delivery_date is not null;
If operating with ZC 1.5.1 and above, the sql statement could be applied as is in the admin->Tools->Install SQL Patches. If, however, it is executed in phpMyAdmin, a similar database access utility or from within an older version of Zen Cart, then care must be taken to prepend the DB_PREFIX (defined in includes/configure.php and matching in admin/includes/configure.php) to orders. If the prefix were 'bright_', then the above would start with UPDATE bright_orders SET ...
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
I am in the process of upgrading a site from 1.5.5b to 1.5.6a and the calendar button is not displaying on the checkout page as expected. I have downloaded version 1.6.1 of the module and am working with that.
Looking through this support thread, it looks like a JQuery conflict, but it appears that JQuery is now being used in ZenCart to track session and order information, so there doesn't appear to be a piece of that I can readily dispose of (or maybe I am missing something?).
ZenCart 1.5.6a
Sitemap XML 3.9.5
ImageHandler5 for ZenCart 1.5.6
ZipShip 2.0.0
php 7.2.14
mysql 5.5.60
CentOS (Linux)
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
weif
I am in the process of upgrading a site from 1.5.5b to 1.5.6a and the calendar button is not displaying on the checkout page as expected. I have downloaded version 1.6.1 of the module and am working with that.
Looking through this support thread, it looks like a JQuery conflict, but it appears that JQuery is now being used in ZenCart to track session and order information, so there doesn't appear to be a piece of that I can readily dispose of (or maybe I am missing something?).
ZenCart 1.5.6a
Sitemap XML 3.9.5
ImageHandler5 for ZenCart 1.5.6
ZipShip 2.0.0
php 7.2.14
mysql 5.5.60
CentOS (Linux)
I thought I would have had a chance yesterday to install the plugin to my ZC 1.5.6a test site; however, didn't have that opportunity. Yes there has historically been a javascript/jQuery conflict; however, the noconflict flag had been added in to attempt to permit operation of the mootools software.
I will try again when back at my computer to install and see what is going on with the possibility of logging into your site to see what is happening there after I see what is happening.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
And the noconflict flag is in place...
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
weif
And the noconflict flag is in place...
Just installed this to ZC 1.5.6a, using the responsive classic template and had no issues with calendar display. Thought I would try to check the operation of the trouble site but don't see a link to it, so if provided I will check it out when at a computer that allows me to follow along with the javascript/jQuery.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
@weif,
Mentioned the potential jQuery conflict. Are you seeing in the console that there are jQuery issues or is it just from review of the thread that there was a problem? Curious if the execution has been followed and/or perhaps the css is causing the calendar to not be displayed where expected, etc...?
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
mc12345678
@weif,
Mentioned the potential jQuery conflict. Are you seeing in the console that there are jQuery issues or is it just from review of the thread that there was a problem? Curious if the execution has been followed and/or perhaps the css is causing the calendar to not be displayed where expected, etc...?
I have not found any way to determine whether there is a javascript or jquery conflict, I just got that information from re-reading this thread and from some other searches online...
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
weif
I have not found any way to determine whether there is a javascript or jquery conflict, I just got that information from re-reading this thread and from some other searches online...
Ok. Good information to know as the conflict issue was expected to be corrected in this recent distribution.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
mc12345678
Mentioned the potential jQuery conflict. Are you seeing in the console that there are jQuery issues or is it just from review of the thread that there was a problem? Curious if the execution has been followed and/or perhaps the css is causing the calendar to not be displayed where expected, etc...?
What led me to believe it was a JavaScript issue is that, on the site that isn't working, the "button" code is not inserted into the page to create the calendar button. You can see this when viewing source on the 1.5.5b site and comparing to the view source 1.5.6a site.
The diffs on the files on the server (for the tpl_checkout_shipping_default file)
the code on the 1.5.5b file shows:
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 -->
On the 1.5.6a site, the same block is:
Code:
<!-- Bof Order Delivery Date -->
<?php if (isset($display_delivery_date) ? $display_delivery_date : true) { ?>
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo sprintf(TABLE_HEADING_DELIVERY_DATE, (defined('MIN_DISPLAY_DELIVERY_DATE') && MIN_DISPLAY_DELIVERY_DATE > 0 && (method_exists($zcObserverOrderDeliveryDateObserver, 'display_delivery_date') ? $zcObserverOrderDeliveryDateObserver->display_delivery_date($order) : true)) ? TABLE_HEADING_DELIVERY_DATE_IS_REQUIRED : TABLE_HEADING_DELIVERY_DATE_IS_OPTIONAL); ?></legend>
<label for="order_delivery_date">Date:</label>
<input id="date" name="order_delivery_date" type="text" value="<?php echo $order_delivery_date; ?>">
</fieldset>
<?php } ?>
<!-- Eof Order Delivery Date -->
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
weif
What led me to believe it was a JavaScript issue is that, on the site that isn't working, the "button" code is not inserted into the page to create the calendar button. You can see this when viewing source on the 1.5.5b site and comparing to the view source 1.5.6a site.
The diffs on the files on the server (for the tpl_checkout_shipping_default file)
the code on the 1.5.5b file shows:
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 -->
On the 1.5.6a site, the same block is:
Code:
<!-- Bof Order Delivery Date -->
<?php if (isset($display_delivery_date) ? $display_delivery_date : true) { ?>
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo sprintf(TABLE_HEADING_DELIVERY_DATE, (defined('MIN_DISPLAY_DELIVERY_DATE') && MIN_DISPLAY_DELIVERY_DATE > 0 && (method_exists($zcObserverOrderDeliveryDateObserver, 'display_delivery_date') ? $zcObserverOrderDeliveryDateObserver->display_delivery_date($order) : true)) ? TABLE_HEADING_DELIVERY_DATE_IS_REQUIRED : TABLE_HEADING_DELIVERY_DATE_IS_OPTIONAL); ?></legend>
<label for="order_delivery_date">Date:</label>
<input id="date" name="order_delivery_date" type="text" value="<?php echo $order_delivery_date; ?>">
</fieldset>
<?php } ?>
<!-- Eof Order Delivery Date -->
So the template block of code was changed to try to offer some expanded services and for operation to occur even in the absence of some of the other files, just in case.
Having had an opportunity to look at the site, there area either of two things that were causing an issue.
the javascript jQuery was not defined, so when attempting to execute jQuery.noConflict, that causes an error. But, then without some sort of noConflict tag, then it may be possible that a conflict could still exist.
I've proposed the following change, though can't really say that it is still the best.
in [FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]/includes/modules/pages/checkout_shipping/jscript_a-mootools.js
change:
to:
Code:
if (undefined !== typeof(jQuery)) {
jQuery.noConflict;
}
[/FONT]
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
It turns out that the actual conflict was caused by having not merged the 1.5.6 template files with the live template. There are several changes between 1.5.1 (when they were last merged, in this case) and 1.5.6 which are no longer completely compatible.
So, boys and girls, remember when performing an upgrade, you need to check your template files for any custom template against the changes in the template it is modeled from...
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Hi, I have recently installed this module on a site running Zencart 1.5.5e. I originally installed version 2.6.1, and everything worked correctly with 2 exceptions.
1. The calendar popup doesn't appear on checkout. A date can be entered manually, and this functions correctly.
2. If a date is not entered, then on the order details, invoice and packing slip, a date of Tuesday 30th November, 1999 is shown. Looking at the database table, a value of 0000-00-00 00:00:00 is written to the table, rather than the correct default value of NULL (0001-01-01 00:00:00).
After reading a lot of posts in this forum, I downloaded and installed version 2.6.2, but bot problems persist. I consider 2. a bug.
I would appreciate any help to resolve these issues.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
donw
Hi, I have recently installed this module on a site running Zencart 1.5.5e. I originally installed version 2.6.1, and everything worked correctly with 2 exceptions.
1. The calendar popup doesn't appear on checkout. A date can be entered manually, and this functions correctly.
2. If a date is not entered, then on the order details, invoice and packing slip, a date of Tuesday 30th November, 1999 is shown. Looking at the database table, a value of 0000-00-00 00:00:00 is written to the table, rather than the correct default value of NULL (0001-01-01 00:00:00).
After reading a lot of posts in this forum, I downloaded and installed version 2.6.2, but bot problems persist. I consider 2. a bug.
I would appreciate any help to resolve these issues.
There are two aspects to item 2, the plugin uses ZC functions that are/were expected to provide appropriate response if no data was provided. This was found to be an issue and corrected in ZC 1.5.6. The pull that corrects the function operation for the three associated functions can be found in this PR: https://github.com/zencart/zencart/pull/2067/files and https://github.com/zencart/zencart/c...4c0a668713f047 to address the display of multilingual information on windows related systems (character encoding appeared to need modification on windows servers). While the first PR was not adopted in full (sequence of the checks was reversed), ZC 1.5.6 and above carries the calculations through to more appropriately handle/correct the issue. The second aspect is the need to assign a default to the field if nothing is provided. The field in the database can be modified per the below to provide a default and ensure that it accepts a value of NULL if NULL is given (Which should also prevent the incorrect storage of '0000-00-00 00:00:00'):
Code:
ALTER TABLE orders MODIFY order_delivery_date datetime DEFAULT '0001-01-01 00:00:00' NULL;
Then the code of post #478 that includes the following SQL:
Code:
UPDATE orders SET order_delivery_date = NULL WHERE order_delivery_date < '0001-01-01' AND order_delivery_date IS NOT NULL;
in anticipation of correcting issues associated with upgrading Zen Cart such as the orders table containing date/datetime fields that have incorrect/unacceptable values.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Thanks. The modified file has fixed the problem. Had already carried out the post #478. Any suggestions re the calendar not showing up ?
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
donw
Thanks. The modified file has fixed the problem. Had already carried out the post #478. Any suggestions re the calendar not showing up ?
This could be from a number of things, between load sequence of the mootools javascript, the presence/absence of css (button may be there, but not where it is expected), template modifications and whether the date box is tied to the correct object, as part of sequence loading whether some other javascript/jquery is prohibiting connecting/executing, a javascript failure in something else, the page not passing html validation, etc...
I (or I would think almost any forum member) could take a look at some of the above by knowing where on the Internet to look at and when that/those individuals are available to do so.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
I've just had a look in the Safari javascript console and the error coming up is related to the code:
if (undefined !== typeof (jQuery)) {
jQuery.noConflict();
}
at the top of the jscript_a-mootools.js file. The error is "Can't find variable: jQuery
Appreciate any help in sorting this out.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
donw
I've just had a look in the Safari javascript console and the error coming up is related to the code:
if (undefined !== typeof (jQuery)) {
jQuery.noConflict();
}
at the top of the jscript_a-mootools.js file. The error is "Can't find variable: jQuery
Appreciate any help in sorting this out.
Basically that means that jQuery is not being loaded before the mooTools.js file. This seems to imply that the header file(s) for the page load have been modified away from standard content for the last several Zen Cart versions. Specifically includes/templates/YOUR_TEMPLATE/common/html_header.php.
Effectively, somewhere above/before the mootolls file, jQuery should be loaded. It has been verified to function with the version released with ZC 1.5.6c and with the alpha version of ZC 1.5.7. Suggest comparing your version of that file with either of the two versions available either responsive_classic or template_default...
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Ok. From your suggestion I've replaced the html_header.php file with the 1.5.6c version, and that has gotten rid of the Mootools error, but I am now left with the following:
TypeError: el.addEvent is not a function. (In 'el.addEvent('focus', function(cal){ this.toggle(cal); }.pass(cal, this))', 'el.addEvent' is undefined) on line 454 of jscript_b-calendar.js
I've done a fair amount comparing of other files to try to find the problem, but have had no success.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
donw
Ok. From your suggestion I've replaced the html_header.php file with the 1.5.6c version, and that has gotten rid of the Mootools error, but I am now left with the following:
TypeError: el.addEvent is not a function. (In 'el.addEvent('focus', function(cal){ this.toggle(cal); }.pass(cal, this))', 'el.addEvent' is undefined) on line 454 of jscript_b-calendar.js
I've done a fair amount comparing of other files to try to find the problem, but have had no success.
I have this installed on what has now become a Zen Cart 1.5.7 site using responsive_classic primarily. Looking through the code as able, it seems that there may be an issue connecting with the box that is to represent/hold the date information. Again, need to be sure that the page validates against html and that the location to hold the date has the applicable html code to attach to the date block. That should be present in the provided checkout_shipping file at least in the modified code section.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Hi
Little bug that seems to have always existed with this -
If you select your delivery date then click 'Change Address' - on return to 'step 1 of 3' it doesn't remember the delivery date.
Using 1.5.6c and latest delivey date plugin - but I've had this issue forever.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
royaldave
Hi
Little bug that seems to have always existed with this -
If you select your delivery date then click 'Change Address' - on return to 'step 1 of 3' it doesn't remember the delivery date.
Using 1.5.6c and latest delivey date plugin - but I've had this issue forever.
Good point, though I wonder if it is possible to capture data from the page when selecting that or any other "button" on the page. Will take a look at the possibility of capturing the selection in the session when making the selection so that if a selection is made and navigation away from the page and subsequent return will retain the selection. May be a bit, but issue will be noted in github.
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
mc12345678
Good point, though I wonder if it is possible to capture data from the page when selecting that or any other "button" on the page. Will take a look at the possibility of capturing the selection in the session when making the selection so that if a selection is made and navigation away from the page and subsequent return will retain the selection. May be a bit, but issue will be noted in github.
Submitted as an issue: https://github.com/mc12345678/order-...-date/issues/5
-
Re: Can't Enter Order Delivery Date on Step 1 of 3 of Checkout
Quote:
Originally Posted by
mc12345678
I have this installed on what has now become a Zen Cart 1.5.7 site using responsive_classic primarily. Looking through the code as able, it seems that there may be an issue connecting with the box that is to represent/hold the date information. Again, need to be sure that the page validates against html and that the location to hold the date has the applicable html code to attach to the date block. That should be present in the provided checkout_shipping file at least in the modified code section.
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?