Results 1 to 10 of 544

Hybrid View

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

    Default Re: Order Delivery Date Support Thread

    Quote Originally Posted by MhawSayar View Post
    ...I already installed this mod v2.2 (Only Date version) in my site. Do I need to remove it before re-installing with this one (Date & Time mod)? Or how can I install this new one without removing old? Just overwrite all old files? (sql, admin, email, includes..etc)

    [I've no zen prefix in my database.]
    The date with time version uses different database row names than the date-only version. These steps should provide you a rather easy roadmap for moving from version w/o date to the version WITH the date:


    1. Do NOT do this on a live site. And when you do, back up your site and database!!!
    2. log in to your database for your zen cart store via PHPmyAdmin
    3. Select the "Orders" table from the list of tables on the left.
    4. Scroll down to the bottom of the table, where you will see "order_delivery_date"
    5. Click on the pencil icon (it will say "change" when you hover over it)
    6. Rename it from "order_delivery_date" to "order_delivery_date_day" and click save.
    7. THEN copy and paste the SQL statement that is zipped up and attached to this post into an query window in PHPmyAdmin (you can access it via the button icons on the top of the left frame).
    8. Overwrite delivery date files with the delivery date w/time files.
    9. Test!

    Hopefully that goes smoothly for ya!
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2009
    Location
    Moscow, Russia
    Posts
    3
    Plugin Contributions
    0

    Have a Drink Re: Order Delivery Date Support Thread

    Quote Originally Posted by mrmeech View Post
    The date with time version uses different database row names than the date-only version. These steps should provide you a rather easy roadmap for moving from version w/o date to the version WITH the date:

    [*]Do NOT do this on a live site. And when you do, back up your site and database!!![*]log in to your database for your zen cart store via PHPmyAdmin
    ...................
    Hopefully that goes smoothly for ya!


    Thank you so much for really quick reply Mr Meech!!

    Very clear instructions and really great help for me!!! I followed your instructions exactly and now installation is finished smoothly without any problems! Work Awesome!

    Again appreciate for your works and helping others! You are the great man!

    Wish all of the best for you!!


    [I installed this modified version mod into my Online shop test version, and I edit to add some additional time intervals. I attach screenshoot to show how it's working Awesome!]
    Attached Images Attached Images  

  3. #3
    Join Date
    Jul 2004
    Posts
    5
    Plugin Contributions
    0

    Default Re: Order Delivery Date Support Thread

    mrmeech, awesome mod!

    However, I've had two issues. Fixed one, still stumped on the other.

    1) I noticed that, if you place and complete an order with a selected delivery date, then in the same session place a second order, but leave the delivery date blank, the 2nd order will store the same delivery date that you entered on the first order.

    Figured out that this was due to the Order Delivery Date being stored in a session variable, along with other order-related data, but that (unless I screwed up the install!), the delivery date session variable is never cleared like the others are. So, I made the following change to includs\modules\pages\checkout_process\header_php.php ...

    // unregister session variables used during checkout
    unset($_SESSION['sendto']);
    unset($_SESSION['billto']);
    unset($_SESSION['shipping']);
    unset($_SESSION['payment']);
    unset($_SESSION['comments']);
    unset($_SESSION['order_delivery_date']); //<- added this line
    $order_total_modules->clear_posts();//ICW ADDED FOR CREDIT CLASS SYSTEM


    That seemed to fix the problem.

    2. If a customer doesn't select a delivery date, I've verified that the field is NULL in the table. The date is also blank in all relevant emails. However, on the Admin Orders pages, any orders with a blank (NULL) delivery date appear with the delivery date 11/30/1999. Again, if a date WAS selected, the correct date appears. But if a date was NOT selected, and the table field is NULL, then the date 11/30/1999 appears, rather that it just being blank.

    Any ideas on this one?

    Thanks!
    Steve
    Last edited by plbs; 24 Jan 2009 at 12:52 AM. Reason: didn't finish entry

  4. #4
    Join Date
    Jul 2004
    Posts
    5
    Plugin Contributions
    0

    Default Re: Order Delivery Date Support Thread

    Well, I'm a PHP and ZC newb, so I don't know if this is the ideal solution, but I did come up with a fix for my #2 problem above.

    I edited admin\includes\function\general.php, specifically the three date conversion functions, zen_date_long, zen_date_short, and zen_datetime_short

    Each of those starts with an if ... return false statement to trap essentially blank input. It was trapping '0001-01-01 00:00:00' as a "blank" date, but I found that my NULL date field was actually evaluating to "0000-00-00" as a string. So I added another OR to each of those IF statements:

    function zen_date_long($raw_date) {
    if ( ($raw_date == '0001-01-01 00:00:00') || ($raw_date == '0000-00-00') || ($raw_date == '') ) return false; //<-- edited this line



    function zen_date_short($raw_date) {
    if ( ($raw_date == '0001-01-01 00:00:00') || ($raw_date == '0000-00-00') || ($raw_date == '') ) return false; //<-- edited this line



    function zen_datetime_short($raw_datetime) {
    if ( ($raw_datetime == '0001-01-01 00:00:00') || ($raw_datetime == '0000-00-00') || ($raw_datetime == '') ) return false; //<-- edited this line



    Again, don't know if this is the optimal way to fix, but it has worked. Now, if there is no delivery date entered on an order, that field is simply blank on the Admin orders table, edit order page, invoice, packing slip, etc.

    If there's a better, or more Zen-compliant way to do this, please advise!

    Thanks,
    Steve

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

    Default Re: Order Delivery Date Support Thread

    Quote Originally Posted by plbs View Post
    Well, I'm a PHP and ZC newb, so I don't know if this is the ideal solution, but I did come up with a fix for my #2 problem above.

    I edited admin\includes\function\general.php, specifically the three date conversion functions, zen_date_long, zen_date_short, and zen_datetime_short

    Each of those starts with an if ... return false statement to trap essentially blank input. It was trapping '0001-01-01 00:00:00' as a "blank" date, but I found that my NULL date field was actually evaluating to "0000-00-00" as a string. So I added another OR to each of those IF statements:

    function zen_date_long($raw_date) {
    if ( ($raw_date == '0001-01-01 00:00:00') || ($raw_date == '0000-00-00') || ($raw_date == '') ) return false; //<-- edited this line



    function zen_date_short($raw_date) {
    if ( ($raw_date == '0001-01-01 00:00:00') || ($raw_date == '0000-00-00') || ($raw_date == '') ) return false; //<-- edited this line



    function zen_datetime_short($raw_datetime) {
    if ( ($raw_datetime == '0001-01-01 00:00:00') || ($raw_datetime == '0000-00-00') || ($raw_datetime == '') ) return false; //<-- edited this line
    Hey Steve,

    I have been aware of this issue where when no date is selected, it reflects as being entered from 1999 or something weird, but i have been lax on updating this, and i apologize.

    With regard to your changes listed above, you have edited core functions that zen cart also uses in other various places. So, while you may have fixed the display with order delivery date, you may have broken another part of the application.

    In my last response from a few minutes ago regarding your first issue listed, i said that i would test the session fix within the next day or so. I will also try to write a new function JUST for order delivery date to address this issue.

  6. #6
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: Order Delivery Date Support Thread

    Quote Originally Posted by mrmeech View Post
    Hey Steve,

    I have been aware of this issue where when no date is selected, it reflects as being entered from 1999 or something weird, but i have been lax on updating this, and i apologize.

    With regard to your changes listed above, you have edited core functions that zen cart also uses in other various places. So, while you may have fixed the display with order delivery date, you may have broken another part of the application.

    In my last response from a few minutes ago regarding your first issue listed, i said that i would test the session fix within the next day or so. I will also try to write a new function JUST for order delivery date to address this issue.
    I'm still having this Tuesday 30 November, 1999 issue... Can't seem to find a fix anywhere. Was it ever posted?

    Thanks!

  7. #7
    Join Date
    Apr 2010
    Posts
    263
    Plugin Contributions
    0

    Default Re: Order Delivery Date Support Thread

    Hi, I hope you can help me. I have created a site for a customer, www.theflowershoppe.co.uk, version 1.3.9 h. All worked fine until we added the required Cookie Control (got it on this site: http://civicuk.com/cookie-law/updates/Joomla). The calendar will no longer show up during checkout. When I remove the cookie control, the calendar works. Do you possibly have any suggestions on how can I have both working?

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

    Default Re: Order Delivery Date Support Thread

    Quote Originally Posted by plbs View Post
    I noticed that, if you place and complete an order with a selected delivery date, then in the same session place a second order, but leave the delivery date blank, the 2nd order will store the same delivery date that you entered on the first order.

    Figured out that this was due to the Order Delivery Date being stored in a session variable, along with other order-related data, but that (unless I screwed up the install!), the delivery date session variable is never cleared like the others are. So, I made the following change to includs\modules\pages\checkout_process\header_php.php ...

    // unregister session variables used during checkout
    unset($_SESSION['sendto']);
    unset($_SESSION['billto']);
    unset($_SESSION['shipping']);
    unset($_SESSION['payment']);
    unset($_SESSION['comments']);
    unset($_SESSION['order_delivery_date']); //<- added this line
    $order_total_modules->clear_posts();//ICW ADDED FOR CREDIT CLASS SYSTEM

    That seemed to fix the problem.
    Ahhh - i hadn't thought about this and it has not been brought up before now. I will test this fix in the next day or so and update the official contribution package. Thanks!!

 

 

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