
Originally Posted by
Doodlebuckets
I am using the Fast and Easy Checkout mod for my sites and I noticed that this mod alters the checkout_shipping.php file but that file is not utilized in my checkouts now. How do you go about integrating this with FEC?
Thanks, I would LOVE to use this!
Unfortunately i do not have the time right now to actually merge the contributions together, BUT - I can give you a roadmap to follow based on peeking at the FEC contribution files, so here it goes:
BACK UP YOUR DATABASE! Then back it up again, for good measure. I am not liable if your database gets messed up. (or anything else) Absolutely DO NOT do this on a live store.
1) Install the SQL patch, which will add a row in the orders table to hold the delivery date.
2) Apply everything in the admin folder to your site's admin folder.
3) Update the email templates - this will reflect the delivery date on emails generated to the customer from when the order is processed, and when you choose to notify the customer when you update their status in the admin.
4) Upload includes/classes/order.php
5) includs/languages/english/YOUR_TEMPLATE/*.php
All of the language definitions are at the bottom of the files. Some of them repeat. You want to make sure that they are inserted into your FEC language files (which, as it is structured in the package, does not use a template override, which i would suggest). Some of the language definitions repeat depending on the page - just make sure you have one of each definition in the FEC language files. In other words, no repeats.
6) I am not 100% sure on this, but i think this what you need to do. Take everything in the includes/modules/pages/checkout_shipping folder and put it into the respective folders for the FEC pages where you want to have the delivery date calendar. I think this is probably INCLUDES/MODULES/PAGES/CHECKOUT for the FEC code. DO NOT OVERWRITE the HEADER.PHP file here!!! Open the Delivery date header up and find the noted edits and copy them into the FEC header.php.
7) Copy and add CSS from INCLUDES/TEMPLATES/your_template/CSS/checkout_shipping.css into INCLUDES/TEMPLATES/your_template/CSS/checkout.css
8) copy image files in the template folder - nothing overwritten there.
9) Adding the code in the template to display the delivery date code in the checkout: So, add this code somewhere WITHIN the "FORM" tag on the template file for FEC where you'd like to have the calendar displayed:
HTML 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 -->
and then add this to the template file where you'd like to have it reflected on the confirmation page:
HTML Code:
<?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 ?>
10) Configuring the calendar - this is done in the file INCLUDES/MODULES/PAGES/CHECKOUT_SHIPPING/jscript_calendar_head.php
Instructions are commented into the file itself.
Best of luck!
Bookmarks