Zen Cart Logo
Forums / Addon Payment Modules / Checkout by Amazon Zen Cart Plug-in

Checkout by Amazon Zen Cart Plug-in

Views: 135,599

Results 61 to 80 of 350
8 Sep 2010, 12:08 PM
#61
ella33 avatar

ella33

New Zenner

Join Date:
Oct 2008
Posts:
21
Plugin Contributions:
0

Checkout by Amazon Zen Cart Plug-in

In case anyone else has problems with IE and checkout, which I did .. check your IE managed add-ons (under tools on explorer). My cart kept freezing when testing on IE every time I clicked on add to cart. My issue ended up being the add-on for RealNetworks that was causing the freeze, once disabled it worked perfectly. So be sure to check that out if you are running into a problem.

9 Sep 2010, 3:36 AM
#62
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Checkout by Amazon Zen Cart Plug-in

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.

AmazonPayments:

  1. 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.)

AmazonPayments:

  1. Look at http://www.zen-cart.com/forum/showthread.php?t=162847 for date corrections

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.

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:

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

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.

9 Sep 2010, 5:27 AM
#63
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

I just installed CBA on our website tonight and I'm having a few issues. I will break them down into separate posts though to simplify answering and future searches for the fixes. :smile:

My first issue is the same as this one previously posted:

ella33:

Amazon installed just fine on my site but when I go to checkout I get the error: "We're sorry, but we're currently having problems retrieving order details from the merchant, and cannot process your order. Please return to the merchant's website and try placing your order again. "

I noticed someone had this issue earlier and corrected it with a change in the php.ini, but mine is already set to allow_call_time_pass_reference = true.

Any ideas?

The ERROR report says:

Error Type: OrderCalculationCallbacks
Error Code: ResponseSchemaValidationError
Message: The OrderCalculationsResponse could not be validated. Details: The XML could not be validated against the schema [cvc-complex-type.2.4.b: The content of element 'ShippingMethod' is not complete. One of '{"http://payments.amazon.com/checkout/2009-05-15/":ShippingMethodId}' is expected.].

Disabled the Callback and it worked fine. I wondered if maybe it was because we use 'Zone Shipping' and it's not calculated other than by country, so I turned the Callback on and set it to not include the Shipping calculation.

I got the same message as above only with a different error. This time the error said:

Error Type: OrderCalculationCallbacks
Error Code: AddressMismatchError
Message: The shipment address in OrderCalculationsResponse doesn't match the buyer address in OrderCalculationsRequest.

I'm not sure why or how the buyer address didn't match because I never got to the stage where I could login to my Amazon account.

We don't HAVE to have the callback since I set the shipping prices/taxes in Seller Central, but we plan to offer calculated UPS expedited shipping for the holidays and it would be nice to offer this service to our Amazon payment customers too.

Thanks for your help!

I'll finish that project tomorrow, I've made enough mistakes today!

9 Sep 2010, 6:09 AM
#64
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

AmazonPayments:

we did the testing with IE 8, FF 3.6, Safari 5.0.

I'm seeing some browser issues.

I've tested the checkout in IE 7, IE 8, Chrome 6.0.4, Safari 5.0, Opera 10.61 and FF 3.5.10, FF 3.5.12, FF 3.6.

The good news - it works in almost all of them (except the bolded ones). :smile:

In FF 3.5.10 and Safari 5.0 the order did not return the size attribute in our Zen Admin orders. While this may not be an issue with the older version of FF, it could be a deal breaker with Safari. 90% of our products have a size attribute. We have no way of knowing what size the customer ordered if it isn't returned in the order information and needless to say it's very unprofessional to have to call/email a customer to ask for this info.

In Opera 10.61 you can complete checkout, but when you click on the "Checkout with Amazon" button, it opens a new tab which doesn't look very good and could be confusing for customers. I attached a screenshot.

I use Opera as my main browser and not all links open a new window/tab, so I'm assuming this is a general Opera browser issue and not a user specific setting.

As a side note - I have only seen the 'One-click' pop-up box show up once and that was in Opera. It still opened the other tab and took me there, but I clicked back on the original shopping cart tab and there it was.

Again, thanks for your help! :)

I'll finish that project tomorrow, I've made enough mistakes today!

9 Sep 2010, 6:20 AM
#65
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

Last but not least - a stupid question and I feel like an idiot having to ask it, but...

How can I tell if my cron job is working? I've only set up a couple of these before and generally, I can tell by the email I receive if it's working.

I put this as my command:

wget "http://www.xxxxxx.com/checkout_by_amazon.php?action=Everything" -O /dev/null

and set it to run every 5 minutes.

The email I'm getting says:

--2010-09-09 02:10:02-- http://www.xxxxxx.com/checkout_by_amazon.php?action=Everything
Resolving https://www.xxxxxx.com... xxx.xx.xx.x
Connecting to www.xxxxxx.com|xxx.xx.xx.x|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://www.xxxxxx.com/index.php?main_page=cookie_usage [following]
--2010-09-09 02:10:02-- http://www.xxxxxx.com/index.php?main_page=cookie_usage
Reusing existing connection to www.xxxxxx.com:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `/dev/null'

0K .......... .......... .......... ........               209K=0.2s

2010-09-09 02:10:02 (209 KB/s) - `/dev/null' saved [38936]

I'll finish that project tomorrow, I've made enough mistakes today!

9 Sep 2010, 9:27 AM
#66
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

Another thing I just noticed -

When the order goes to Seller Central and we receive the "Sold, Ship Now" email it shows the Zencart product ID # instead of our REAL product model/SKU.

Is there a way to change this?

Thanks!

I'll finish that project tomorrow, I've made enough mistakes today!

9 Sep 2010, 9:38 PM
#67
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Checkout by Amazon Zen Cart Plug-in

Boggled:

Last but not least - a stupid question and I feel like an idiot having to ask it, but...

How can I tell if my cron job is working? I've only set up a couple of these before and generally, I can tell by the email I receive if it's working.

I put this as my command:

wget "http://www.xxxxxx.com/checkout_by_amazon.php?action=Everything" -O /dev/null

and set it to run every 5 minutes.

The email I'm getting says:

You're getting a 302 redirect code in there. Is your site up and running or is it down for maintenance?

9 Sep 2010, 10:04 PM
#68
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

retched:

You're getting a 302 redirect code in there. Is your site up and running or is it down for maintenance?

It's up and running. http://mbgltd.com

That's the part that didn't look right to me.

I'll finish that project tomorrow, I've made enough mistakes today!

9 Sep 2010, 10:09 PM
#69
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Checkout by Amazon Zen Cart Plug-in

Boggled:

It's up and running. http://mbgltd.com

That's the part that didn't look right to me.

There's a line in includes/spiders.txt that has wget listed (by default). Go to your includes folder and remove the line of wget. Then wait for the next run.

This SHOULD fix the problem as I'm running the cron now and am not getting this error.

That or you can edit checkout_by_amazon.php and add:

define('SESSION_BLOCK_SPIDERS','False');
``` to it instead.
9 Sep 2010, 10:38 PM
#70
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

retched:

There's a line in includes/spiders.txt that has wget listed (by default). Go to your includes folder and remove the line of wget. Then wait for the next run.

This SHOULD fix the problem as I'm running the cron now and am not getting this error.

That or you can edit checkout_by_amazon.php and add:

define('SESSION_BLOCK_SPIDERS','False');


First, thank you so much for responding!  I really appreciate it.

I removed the wget in the spiders.txt file.

Now I'm getting:
> --2010-09-09 18:25:01--  <http://www.mbgltd.com/checkout_by_amazon.php?action=Everything>
> Resolving <https://www.mbgltd.com>... xxx.xx.xx.x
> Connecting to www.mbgltd.com|xxx.xx.xx.x|:80... connected.
> HTTP request sent, awaiting response... 500 Internal Server Error
> 2010-09-09 18:25:02 ERROR 500: Internal Server Error.

I have verified the checkout_by_amazon.php file is in the correct location with permissions set to 644.

Could it be a setting on the server?

I'll finish that project tomorrow, I've made enough mistakes today!

9 Sep 2010, 10:43 PM
#71
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Checkout by Amazon Zen Cart Plug-in

retched:

There's a line in includes/spiders.txt that has wget listed (by default). Go to your includes folder and remove the line of wget. Then wait for the next run.

This SHOULD fix the problem as I'm running the cron now and am not getting this error.

That or you can edit checkout_by_amazon.php and add:

define('SESSION_BLOCK_SPIDERS','False');


Boggled, I just checked my own. Remove that line of code and just edit out the wget line from includes/spiders.txt.

Also check your cache directory for the error and paste that here as well.

If you have AIM or the like, my contact info is available on my profile here.
10 Sep 2010, 1:17 AM
#72
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

Thank you again for your help Retched!
I don't have AIM, but I do think I found the problem/solution thanks to you.

I had only edited out the wget line from the spiders.txt. I hadn't added that line of code, so I just left everything the way it was and looked at the cache.

The error in my cache says:

PHP Fatal error: Class 'XMLParser' not found in /xxxxx/xxxxxxxx/public_html/checkout_by_amazon/amazonorder.php on line 360

That sounded familiar, so I searched this thread again and found you had also run into the 500 /XMLParser error. After checking several things, this is what you had found (Post 62):

Essentially this would only happen when there was nothing for the cron script to process.

I'm hoping that is the problem with mine too - there aren't any orders to process right now.

When I did a Live test order last night, it went through fine (other than the quirks I mentioned in other posts) and showed up in both my Zen Admin and Seller Central. Once it was marked shipped in our Admin, the information was relayed back to Amazon and everything updated.

So unless the Cron job affects something else I'm not aware of, I'm going to just wait to see what happens when there are orders and not stress in the meantime. :)

Thank you again for pointing me in the right direction.

I'll finish that project tomorrow, I've made enough mistakes today!

10 Sep 2010, 4:18 AM
#73
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Checkout by Amazon Zen Cart Plug-in

Boggled:

Thank you again for your help Retched!
I don't have AIM, but I do think I found the problem/solution thanks to you.

I had only edited out the wget line from the spiders.txt. I hadn't added that line of code, so I just left everything the way it was and looked at the cache.

The error in my cache says:

That sounded familiar, so I searched this thread again and found you had also run into the 500 /XMLParser error. After checking several things, this is what you had found (Post 62):

I'm hoping that is the problem with mine too - there aren't any orders to process right now.

When I did a Live test order last night, it went through fine (other than the quirks I mentioned in other posts) and showed up in both my Zen Admin and Seller Central. Once it was marked shipped in our Admin, the information was relayed back to Amazon and everything updated.

So unless the Cron job affects something else I'm not aware of, I'm going to just wait to see what happens when there are orders and not stress in the meantime. :)

Thank you again for pointing me in the right direction.

I have not tried this on a live site, However... you can attempt to do this. Copy IOPNXMLParser.php in the checkout_by_amazon/modules/order directory to your computer.

Rename the file XMLParser.php and edit two lines.

Replace class IOPNXMLParser{ with class XMLParser{ and replace function IOPNXMLParser($xml){ with function XMLParser($xml){

I'm working on seeing if I can make a code edit to amazonorder.php so that it will no longer execute the code if the variable that determines which parser to load is empty, to just not execute the code... Make sure to upload this back in the same directory. The directory should now have three files. IOPNXMLParser, MFAXMLParser, and XMLParser

Also make sure to add in the little line I changed up above so that you don't have any errors.

10 Sep 2010, 5:59 AM
#74
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

retched:

I have not tried this on a live site, However... you can attempt to do this. Copy IOPNXMLParser.php in the checkout_by_amazon/modules/order directory to your computer.

Rename the file XMLParser.php and edit two lines.

Replace class IOPNXMLParser{ with class XMLParser{ and replace function IOPNXMLParser($xml){ with function XMLParser($xml){

I'm working on seeing if I can make a code edit to amazonorder.php so that it will no longer execute the code if the variable that determines which parser to load is empty, to just not execute the code... Make sure to upload this back in the same directory. The directory should now have three files. IOPNXMLParser, MFAXMLParser, and XMLParser

Also make sure to add in the little line I changed up above so that you don't have any errors.

Ok. I tried this and made the changes you suggested.
Now my Cron job email says:

--2010-09-10 01:55:02-- http://www.mbgltd.com/checkout_by_amazon.php?action=Everything
Resolving https://www.mbgltd.com... xxx.xx.xx.x
Connecting to www.mbgltd.com|xxx.xx.xx.x|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `/dev/null'

0K                                                        53.1M=0s

2010-09-10 01:55:04 (53.1 MB/s) - `/dev/null' saved [319]

No more 500 Internal Server error. :)

I'll finish that project tomorrow, I've made enough mistakes today!

10 Sep 2010, 8:08 AM
#75
amazonpayments avatar

amazonpayments

New Zenner

Join Date:
Oct 2009
Posts:
52
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

retched:

I have not tried this on a live site, However... you can attempt to do this. Copy IOPNXMLParser.php in the checkout_by_amazon/modules/order directory to your computer.

Rename the file XMLParser.php and edit two lines.

Replace class IOPNXMLParser{ with class XMLParser{ and replace function IOPNXMLParser($xml){ with function XMLParser($xml){

I'm working on seeing if I can make a code edit to amazonorder.php so that it will no longer execute the code if the variable that determines which parser to load is empty, to just not execute the code... Make sure to upload this back in the same directory. The directory should now have three files. IOPNXMLParser, MFAXMLParser, and XMLParser

Also make sure to add in the little line I changed up above so that you don't have any errors.

Hi retched,

there is a reason for having these two parsers. IOPN and MFA are needed. if IOPN is not reachable from Amazon, the orders are retrieved using MFA.

so if you make changes, make sure you are addressing all the stuff.

Thank you for this fix

10 Sep 2010, 1:14 PM
#76
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

retched:

I have not tried this on a live site, However... you can attempt to do this. Copy IOPNXMLParser.php in the checkout_by_amazon/modules/order directory to your computer.

Rename the file XMLParser.php and edit two lines.

Replace class IOPNXMLParser{ with class XMLParser{ and replace function IOPNXMLParser($xml){ with function XMLParser($xml){

I'm working on seeing if I can make a code edit to amazonorder.php so that it will no longer execute the code if the variable that determines which parser to load is empty, to just not execute the code... Make sure to upload this back in the same directory. The directory should now have three files. IOPNXMLParser, MFAXMLParser, and XMLParser

Also make sure to add in the little line I changed up above so that you don't have any errors.

Just a follow up and a head's up -

I don't know if the above change is behind what I'm seeing this morning, but I can only assume it is since it looks like it started right after I made the change.

We also sell on Amazon and this morning EVERY Merchant fulfilled transaction we've had on Amazon has now shown up in our Zencart admin and is showing as pending.

I deleted the XMLParser.php file and I'm hoping that will stop this from happening.

I also contacted Seller Support to find out if I could safely delete these orders from our Zen cart. (They all show as shipped in Seller Central.)

I'll finish that project tomorrow, I've made enough mistakes today!

10 Sep 2010, 9:53 PM
#77
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Checkout by Amazon Zen Cart Plug-in

Boggled:

Just a follow up and a head's up -

I don't know if the above change is behind what I'm seeing this morning, but I can only assume it is since it looks like it started right after I made the change.

We also sell on Amazon and this morning EVERY Merchant fulfilled transaction we've had on Amazon has now shown up in our Zencart admin and is showing as pending.

I deleted the XMLParser.php file and I'm hoping that will stop this from happening.

I also contacted Seller Support to find out if I could safely delete these orders from our Zen cart. (They all show as shipped in Seller Central.)

Ok now this is bothersome...

If you're getting the 500 server errors, I would go ahead and undo the change in the server. The 500 server error means that something stopped in the code and caused it to come to up as invalid. The only problem with this is, your cache folder will be filled up error messages from this.

11 Sep 2010, 4:44 AM
#78
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Checkout by Amazon Zen Cart Plug-in

retched:

Ok now this is bothersome...

If you're getting the 500 server errors, I would go ahead and undo the change in the server. The 500 server error means that something stopped in the code and caused it to come to up as invalid. The only problem with this is, your cache folder will be filled up error messages from this.
"500" errors won't show up in the myDebug logs created by Zen Cart, because "500" errors stop PHP execution before it can even start, let alone log anything.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Sep 2010, 11:14 AM
#79
marcopolo avatar

marcopolo

Totally Zenned

Join Date:
May 2008
Location:
United States
Posts:
522
Plugin Contributions:
2

Re: Checkout by Amazon Zen Cart Plug-in

I offer a local pickup option and would like to disable this option for Amazon & Google Checkout payment orders. I was thinking how to do it and need a little help in modifying the below line from the local pickup module. It simple needs to disable itself if Amazon or Google Checkout is being used as payment methods.

Here is the line in the pickup module that I believe needs to be modified to accomplish this.

Can anyone help on this?

if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_STOREPICKUP_ZONE > 0) ) {

marcopolo
Zen Cart 2.2.2 | PHP 8.5.11 | MariaDB 10.11.14

16 Sep 2010, 4:21 PM
#80
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

I'm still getting the 500 error on my cron job, but everything seems to be passing back and forth between Seller Central and Zen like it should.

I've had another issue pop up though.
I installed CBA on another cart. Identical set up - only differences are the template and the server they are on (same host though).

The new cart I can't get the tracking to 'stick' in the Zen Admin. I add it, click submit and it throws me back out to the Order list page. The order is marked shipped, but it doesn't add the tracking number and it doesn't send the info to Amazon.

It works perfect on the first cart I installed it on.

Any ideas what could be causing this? Did I miss something?

I'll finish that project tomorrow, I've made enough mistakes today!