
Originally Posted by
AmazonPayments
1. you should not get this error if your PHP has built-in XML support. can you paste the full error message ?
I wish I could but I ended up clearing the cache folder where ZenCart posted the error messages. The general messages was that class XMLParser cannot be found at it gave me a reference to that. Essentially this would only happen when there was nothing for the cron script to process.

Originally Posted by
AmazonPayments
2. First name and last names got from the amazon order report are mapped with the zencart first name and last name. any customization on that should be handled by yourself.
I found the part of the code that handles this but since ZenCart sends back (and stores) the buyer's name as one string, do any customization here wouldn't help. (What I mean is instead of asking for a first and last name, Amazon asks for A name instead.)

Originally Posted by
AmazonPayments
I actually managed to find this one out on my one and made a change to IOPNXMLParser and commented out the now() line of the code in the GetOrderDate function and uncommented the lines beneath it with some modifications.

Originally Posted by
AmazonPayments
could you explain how you got it working? this will help other merchants to get it fixed. if its a code bug, we will also get it patched.
Gladly. Essentially there is a code already in the amazonorder.php file that inserts the needed database file. However, it's comment out. So I uncommented that line and changed it from this:
PHP Code:
// amazon_db_execute("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int) $_SESSION['customer_id'] . "', '0', now())");
To this:
PHP Code:
amazon_db_execute("insert ignore into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int) $_SESSION['customer_id'] . "', '0', '" . $data->getOrderDate() ."')");
The insert ignore into was put in to prevent error messages from coming up from return customers, and customer_info_date_account_created is what the index.php of the admin area looks for when displaying new customers. Since $_SESSION['customer_id'] will either contain a new entry or an already existing id if it found it, there is no problem in making this change. At least by my testing that is.
Bookmarks