Results 1 to 10 of 544

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Posts
    584
    Plugin Contributions
    0

    Default Re: Order Delivery Date Support Thread

    Hey everyone,

    I am trying to have the Order Delivery Date display on product info page instead of Checkout_shipping.

    So far I got the table to display on the product page. I am able to select the date and to continue with checkout process.

    However, the delivery date is not reflected on the checkout_confirmation. and it does not appear on the order.

    I think it has something to do with the header.php file but I don t know how to change it so order delivery date would work on product info page

    Any help would be more than appreciated

    Thank you

  2. #2
    Join Date
    Aug 2013
    Location
    Perth, WA, AU
    Posts
    279
    Plugin Contributions
    4

    Default Re: Order Delivery Date Support Thread

    I have amended my site to add order deliver time - documented it as I went along ....

    Use at your own risk ....



    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 -->

 

 

Similar Threads

  1. order delivery date addon - date not showing in checkout
    By jagall in forum Addon Shipping Modules
    Replies: 4
    Last Post: 19 Oct 2017, 09:09 PM
  2. JK Order Exporter - Support Thread
    By eVelt in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 26 Sep 2015, 07:06 AM
  3. v151 Order Delivery date on Product Info Page
    By nicksab in forum General Questions
    Replies: 0
    Last Post: 30 Dec 2013, 03:23 AM
  4. Support Thread for JS Date Picker for options
    By eVelt in forum All Other Contributions/Addons
    Replies: 17
    Last Post: 5 Dec 2013, 05:44 AM
  5. Order Delivery Date Mod
    By fagriffin in forum Addon Shipping Modules
    Replies: 1
    Last Post: 11 Oct 2008, 04:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg