Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
Vab,
Try replacing includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_shipping_default.php with the one attached to my reply here (which will need to be unzipped, obviously)
Let me know if it fixes your problem and if so, i'll update the contribution.
mrmeech,
Thanks so much for this mod! I've been looking for something like this for awhile and I'm grateful to you and the other developers for taking the time to put all this together. I did have one question though.. Any chance that the next update could include time slots for delivery after the date is selected? For example a user could select 2008-06-16. And then select a time slot of 8:00 a.m. - 1:00 p.m or 1:00 p.m. - 6:00 p.m.? Thanks again for your great contribution.
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
Child_Of_The_Mind
mrmeech,
Thanks so much for this mod! I've been looking for something like this for awhile and I'm grateful to you and the other developers for taking the time to put all this together. I did have one question though.. Any chance that the next update could include time slots for delivery after the date is selected? For example a user could select 2008-06-16. And then select a time slot of 8:00 a.m. - 1:00 p.m or 1:00 p.m. - 6:00 p.m.? Thanks again for your great contribution.
Glad you appreciate the work! :smile:
The update that is pending right now in the download section (version 2.1) just fixes a display issue, but I will put it on the (small) list of requested features. It might be a bit tricky to integrate it with the setup of this calendar solution, but i'll see what i can do.
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
Glad you appreciate the work! :smile:
The update that is pending right now in the download section (version 2.1) just fixes a display issue, but I will put it on the (small) list of requested features. It might be a bit tricky to integrate it with the setup of this calendar solution, but i'll see what i can do.
Well I'll definitely stay posted! Thanks for taking it into consideration and again for building the mod in the first place!
1 Attachment(s)
Re: Order Delivery Date Support Thread
Mrmeech,
Well I have gone through all the files and where I found order_delivery_date I added the same information for order_cancel_date.
I followed through the files you said:
Quote:
* pay close attention to includes/classes/order.php. Look where the modifications for the order delivery date mod is... usually they are called "order_delivery_date" (go figure)
* Update your language defines in english/YOUR_TEMPLATE/*.php
* Update includes/templates/YOUR_TEMPLATE/templates/checkout_*.php to display your cancel date info or whatever
* Update admin/orders.php so that when you generate an email from an order page it will include the cancel date, as well as display the cancel date info on the orders page.
* Make sure you update admin/includes/classes/order.php as well
There were a few other files that I had to edit. The problem that I am having is that I cant get the calendar to work on the tpl_checkout_shipping_default.php.
The first one was:
PHP Code:
<!-- Bof Ship Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo TABLE_HEADING_DELIVERY_DATE; ?></legend>
<label for="date">Date</label>
<input class="calendar" readonly="readonly" id="date" name="date" type="text">
<button class="calendar" type="button"></button>
</fieldset>
<!-- Eof Ship Date -->
and I added:
PHP Code:
<!-- Bof Cancel Ship Date -->
<fieldset class="shipping" id="order_cancel_date">
<legend><?php echo TABLE_HEADING_CANCEL_DATE; ?></legend>
<label for="date2">Date</label>
<input class="calendar" readonly="readonly" id="date2" name="date2" type="text">
<button class="calendar" type="button"></button>
</fieldset>
<!-- Eof Cancel Ship Date -->
and when I get to the shipping page it shows 2 calendar buttons next to Desired Delivery Date and one next to Desired Cancel Date but only the first one on Desired Delivery Date does anything when clicked. (attached screenshot)
What do you think?
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
velvetangels
Mrmeech,
...
The problem that I am having is that I cant get the calendar to work on the tpl_checkout_shipping_default.php.
The first one was:
PHP Code:
<!-- Bof Ship Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo TABLE_HEADING_DELIVERY_DATE; ?></legend>
<label for="date">Date</label>
<input class="calendar" readonly="readonly" id="date" name="date" type="text">
<button class="calendar" type="button"></button>
</fieldset>
<!-- Eof Ship Date -->
and I added:
PHP Code:
<!-- Bof Cancel Ship Date -->
<fieldset class="shipping" id="order_cancel_date">
<legend><?php echo TABLE_HEADING_CANCEL_DATE; ?></legend>
<label for="date2">Date</label>
<input class="calendar" readonly="readonly" id="date2" name="date2" type="text">
<button class="calendar" type="button"></button>
</fieldset>
<!-- Eof Cancel Ship Date -->
and when I get to the shipping page it shows 2 calendar buttons next to Desired Delivery Date and one next to Desired Cancel Date but only the first one on Desired Delivery Date does anything when clicked. (attached screenshot)
This boggles my mind a little bit..
if you remove this line of code from the "requested delivery date" calendar, i bet it will fix that problem:
PHP Code:
<button class="calendar" type="button"></button>
However, what doesn't make sense is why it's not showing up on your cancel date calendar too. What happens if you remove that same line of code from the cancel date calendar?
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
This boggles my mind a little bit..
if you remove this line of code from the "requested delivery date" calendar, i bet it will fix that problem:
PHP Code:
<button class="calendar" type="button"></button>
However, what doesn't make sense is why it's not showing up on your cancel date calendar too. What happens if you remove that same line of code from the cancel date calendar?
Tried to delete the button on the first fieldset and it does take out the 2nd calendar under Desired Delivery Date but when you try to click the calendar for Desired Cancel Date it doesnt do anything.
Tried taking out the 2nd button in the cancel fieldset and it removes the calendar button from the cancel fieldset.
How does it know to pull the calendar popup? wonder why it isnt working when the first button is removed.
1 Attachment(s)
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
velvetangels
Tried to delete the button on the first fieldset and it does take out the 2nd calendar under Desired Delivery Date but when you try to click the calendar for Desired Cancel Date it doesnt do anything.
Tried taking out the 2nd button in the cancel fieldset and it removes the calendar button from the cancel fieldset.
How does it know to pull the calendar popup? wonder why it isnt working when the first button is removed.
I am pretty sure that the calendar .js file itself is generating a calendar button. The release only has the compiled version of the javascript file, but i'll attach the exploded (readable) version for you to sift through too.
This is the site for the calendar itself and might be very helpful to figuring this out: http://electricprism.com/aeron/calendar/
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
I am pretty sure that the calendar .js file itself is generating a calendar button. The release only has the compiled version of the javascript file, but i'll attach the exploded (readable) version for you to sift through too.
This is the site for the calendar itself and might be very helpful to figuring this out:
http://electricprism.com/aeron/calendar/
Found the problem after reading through the website - (thank you very helpful)
It turns out that you have to label each field that you want the calendar to display on different (had a suspicion about that)
so on here tpl_checkout_shipping_default.php this is what i did:
PHP Code:
<!-- Bof Ship Date -->
<fieldset class="shipping" id="order_delivery_date">
<legend><?php echo TABLE_HEADING_DELIVERY_DATE; ?></legend>
<label for="date1">Date</label>
<input class="calendar" readonly="readonly" id="date1" name="date1" type="text">
</fieldset>
<!-- Eof Ship Date -->
<!-- Bof Cancel Ship Date -->
<fieldset class="shipping" id="order_cancel_date">
<legend><?php echo TABLE_HEADING_CANCEL_DATE; ?></legend>
<label for="date2">Date</label>
<input class="calendar" readonly="readonly" id="date2" name="date2" type="text">
</fieldset>
<!-- Eof Cancel Ship Date -->
and had to change \includes\modules\pages\checkout_shipping\jscript_calendar_head.php
PHP Code:
?>
<script type="text/javascript">
window.addEvent('domready', function() {
myCal1 = new Calendar({ date1: 'Y-m-d' }, { blocked: ['24-25,31 12 *', '0 * * 0'], direction: 3, draggable: false });
myCal2 = new Calendar({ date2: 'Y-m-d' }, { blocked: ['24-25,31 12 *', '0 * * 0'], direction: 3, draggable: false });
});
</script>
<?PHP /*
I am testing now and I can add it as an update if anyone would like. :clap:
Re: Order Delivery Date Support Thread
Velvetangels,
So you DID wind up cutting out this line of code from the shipping_default page (to fix the double button problem) for both the ship date and cancel date:
PHP Code:
<button class="calendar" type="button"></button>
Correct?
1 Attachment(s)
Re: Order Delivery Date Support Thread
Quote:
Originally Posted by
mrmeech
Velvetangels,
So you DID wind up cutting out this line of code from the shipping_default page (to fix the double button problem) for both the ship date and cancel date:
PHP Code:
<button class="calendar" type="button"></button>
Correct?
MrMeech,
Ya I had to delete
PHP Code:
<button class="calendar" type="button"></button>
on the shipping_default page. It looks like adding it onto the input allows it to show the button anyways.
I tried to test it out and i am not getting any values to post through to other pages. I enter the dates on the shipping_default page and when i get to the Confirmation page it only has
Quote:
Desired Delivery Date
(Year - Month - Day)
Desired Cancel Date
(Year - Month - Day)
Going to try to work more though it today.
I attached the code that I have already edited if you want to take a look too.