Page 2 of 54 FirstFirst 12341252 ... LastLast
Results 11 to 20 of 535
  1. #11
    Join Date
    Aug 2005
    Location
    Johnstown, PA, USA
    Posts
    45
    Plugin Contributions
    0

    Default Re: Order Delivery Date Support Thread

    mrrmeech,

    Thanks for your prompt reply and the link to the date lesson. You know what they say about "...fools rushing in..." That would be ME.

    Yes, I was just looking to get the date to display in the Monty/Day/Year format. Now that I've read the tutorial (should have done that first LOL) I see the problem.

    Although it does not seem to have "broken" the drop down display it does not store as expected in the database. Would you suggest I just change it back to the proper Mysql format and live with it? That is learn the Year first format. LOL

  2. #12
    Join Date
    Nov 2006
    Location
    New York City
    Posts
    248
    Plugin Contributions
    1

    Default Re: Order Delivery Date Support Thread

    Quote Originally Posted by duffy View Post
    mrrmeech,

    Thanks for your prompt reply and the link to the date lesson. You know what they say about "...fools rushing in..." That would be ME.

    Yes, I was just looking to get the date to display in the Monty/Day/Year format. Now that I've read the tutorial (should have done that first LOL) I see the problem.

    Although it does not seem to have "broken" the drop down display it does not store as expected in the database. Would you suggest I just change it back to the proper Mysql format and live with it? That is learn the Year first format. LOL
    I would change it back to how to the original file for now and i'll see if i can get you a new one to try in a day or so - i'm super slammed with work until tomorrow!

  3. #13
    Join Date
    Aug 2005
    Location
    Johnstown, PA, USA
    Posts
    45
    Plugin Contributions
    0

    Default Re: Order Delivery Date Support Thread

    Thanks mrmeech, I'll change it back. Don't go out of your way for a fix, it's really not a big deal, but your help is immensely appreciated!!

  4. #14
    Join Date
    May 2004
    Posts
    766
    Plugin Contributions
    0

    Default Re: Order Delivery Date Support Thread

    Is this where the line forms behind duffy for the mm/dd/yy version??

    Definitely been waiting for this mod - thank you!

    betty

  5. #15
    Join Date
    Nov 2006
    Location
    New York City
    Posts
    248
    Plugin Contributions
    1

    Default Re: Order Delivery Date Support Thread

    Quote Originally Posted by bettysue View Post
    Is this where the line forms behind duffy for the mm/dd/yy version??

    Definitely been waiting for this mod - thank you!

    betty
    Quote Originally Posted by duffy View Post
    Thanks mrmeech, I'll change it back. Don't go out of your way for a fix, it's really not a big deal, but your help is immensely appreciated!!
    Try this out...

    (Duffy, you *shouldn't* have any awkward date problems with this, but test it out and let me know)

    You want to open up includes/templates/YOURTEMPLATE/templates/tpl_checkout_shipping_default.php and use this code near the bottom instead of what's there:
    PHP Code:
    <!-- Bof Ship Date -->
    <fieldset class="shipping" id="order_delivery_date">
    <legend><?php echo TABLE_HEADING_DELIVERY_DATE?></legend>
    <select name="order_delivery_date">
    <?php
    for ($i=0$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 ("%B %d %Y (%A)",$now[$i]).'</option>';
        }
    }
    ?>
    </select>
    </fieldset>
    <!-- Eof Ship Date -->

  6. #16
    Join Date
    Aug 2005
    Location
    Johnstown, PA, USA
    Posts
    45
    Plugin Contributions
    0

    Default Re: Order Delivery Date Support Thread

    Thanks mrmeech. I've implemented the code change and this generates a nice drop down for the date selection but when I get to the confirmation stage of order processing the date is again displaying in in the yyyy/mm/dd format. Do we need to make a similar change in the tpl_checkout_confirmation page?

    duffy.

  7. #17
    Join Date
    Sep 2007
    Location
    Melbourne Australia
    Posts
    60
    Plugin Contributions
    0

    Default Re: Order Delivery Date Support Thread

    Mrmech,

    Awesome contribution.

    Working beautifully on a 1.3.8a - with a few easy cutomisations it now works with my templates - waiting now to try and see how we go with implementing into superorders and other contributions

    I'll try and post my customisations with other contributions if they actually work well enough to post!!

    I have really been wanting something like this that's stable and seems fairly easy to customise also.

    **** So here's the question:
    I have tried in vane to try and work out the date how to turn off Saturday - Sunday is off as default - but not sure which bit of code turns it off and how!!!

    Could you please advise how to turn off Saturday as well as Sunday ( or I guess any day when I understand how it works).

    Thanks you very much for putting this up and your support for it.

    Max

  8. #18
    Join Date
    Nov 2006
    Location
    New York City
    Posts
    248
    Plugin Contributions
    1

    Default Re: Order Delivery Date Support Thread

    Quote Originally Posted by duffy View Post
    Thanks mrmeech. I've implemented the code change and this generates a nice drop down for the date selection but when I get to the confirmation stage of order processing the date is again displaying in in the yyyy/mm/dd format. Do we need to make a similar change in the tpl_checkout_confirmation page?

    duffy.
    try updating these lines of code in your tpl_checkout_confirmation_default.php
    PHP Code:
    <?php // BEGIN Order Delivery Date ?>
    <h3><?php echo TABLE_HEADING_DELIVERY_DATE?></h3>
    <p><h4><?php echo zen_date_long($order->info['order_delivery_date']); ?></h4></p><br />
    </div>
    <?php // END ORder Delivery Date ?>

  9. #19
    Join Date
    Nov 2006
    Location
    New York City
    Posts
    248
    Plugin Contributions
    1

    Default Re: Order Delivery Date Support Thread

    Quote Originally Posted by FuzzyBunny View Post
    Mrmech,

    Awesome contribution.

    Working beautifully on a 1.3.8a - with a few easy cutomisations it now works with my templates - waiting now to try and see how we go with implementing into superorders and other contributions

    I'll try and post my customisations with other contributions if they actually work well enough to post!!

    I have really been wanting something like this that's stable and seems fairly easy to customise also.

    **** So here's the question:
    I have tried in vane to try and work out the date how to turn off Saturday - Sunday is off as default - but not sure which bit of code turns it off and how!!!

    Could you please advise how to turn off Saturday as well as Sunday ( or I guess any day when I understand how it works).

    Thanks you very much for putting this up and your support for it.

    Max
    Max,

    Open up tpl_checkout_shipping_default.php. This code should do the trick:
    PHP Code:
    <!-- Bof Ship Date -->
    <fieldset class="shipping" id="order_delivery_date">
    <legend><?php echo TABLE_HEADING_DELIVERY_DATE?></legend>
    <select name="order_delivery_date">
    <?php
    for ($i=0$n=50$i $n$i++) {
        
    $now[$i] = strtotime ("+$i day"time());
        if ( 
    strftime ("%w",$now[$i])<>0
            
    AND strftime ("%w"$now[$i])<>6
            
    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 ("%B %d %Y (%A)",$now[$i]).'</option>';
        }
    }
    ?>
    </select>
    </fieldset>
    <!-- Eof Ship Date -->

  10. #20
    Join Date
    Sep 2007
    Location
    Melbourne Australia
    Posts
    60
    Plugin Contributions
    0

    Default Re: Order Delivery Date Support Thread

    Mrmeech,
    Still going strong on this great contribution.
    I am trying to work out an admin side (in edit_orders.php currently) to this, which I can do with:

    <!-- Begin Delivery Date Block -->
    <hr>
    <strong>Current Delivery Date: </strong><?php echo zen_date_long($order->info['order_delivery_date']); ?><br>
    <strong>Reset Delivery Date to: </strong>
    <select name="update_order_delivery_date">
    <?php
    for ($i=0, $n=365; $i < $n; $i++) {
    $now[$i] = strtotime ("+$i day", time());
    if ( strftime ("%w",$now[$i])<>0
    AND strftime ("%w", $now[$i])<>6
    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 ("%d %B %Y (%A)",$now[$i]).'</option>';
    }
    }
    ?>
    </select>
    <?php echo zen_draw_separator('pixel_trans.gif', '50', '1'); ?>
    <?php echo zen_image_submit('button_update.gif', IMAGE_UPDATE); ?>
    <hr>
    <!-- End Delivery Date Block -->

    The issue is that in the pull down list the default is the next available day when I want the selected option in the list to be the order_delivery_date.

    If the list doesn't default to the current order_delivery_date it runs the risk of someone updating the page and changing the delivery date to the wrong one.

    I have played around with the code for ages trying to work out how to get it to do it and still keep the rest of the list the same (ie. from today to how ever many days out you have the $n value set to.

    Alternatively, in your opinion, should something like this be written as a pop-up type add-on as opposed to inline code?

    Any help would be greatly appreciated.

    Thanks, Max

 

 
Page 2 of 54 FirstFirst 12341252 ... LastLast

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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR