Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2009
    Posts
    51
    Plugin Contributions
    1

    Default Date corrections in Checkout By Amazon module

    There is a bug when calling the order table update in the code amazonorder.php.

    buggy line
    PHP Code:
    $sql_order_date_update "UPDATE ".TABLE_ORDERS." set date_purchased = '".$data->getOrderDate()."' where orders_id = '$insert_id'"
    Fixed line
    PHP Code:
    $sql_order_date_update "UPDATE ".TABLE_ORDERS." set date_purchased = ".$data->getOrderDate()." where orders_id = '$insert_id'"
    the issue is, getOrderDate returns 'now()'. the buggy line is again wrapped with single quote and hence the date is random.

    In SQL query, when using now() mysql function, they should *not* be wrapped with quote. Now i got it working :)

  2. #2
    Join Date
    Oct 2009
    Posts
    51
    Plugin Contributions
    1

    Default Re: creating a order using zencart order functions

    one more addition to the fix on a different file

    File: checkout_by_amazon\modules\order\MFAXMLParser.php
    Method : getOrderDate();

    change the line 212
    PHP Code:
     return $yyyyMMdd ' ' $hhmmss
    to
    PHP Code:
     return "'".$yyyyMMdd ' ' $hhmmss."'"
    Note: Make sure you test it on your sandbox server before updating it in production code.

 

 

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. v150 PayPal Module causing Infinite Loop when Amazon Checkout added
    By function in forum PayPal Express Checkout support
    Replies: 21
    Last Post: 1 Dec 2014, 03:13 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