Shopping Basket

 x 

Cart empty


Log In

Find Us Elsewhere

SSL

Yesterday an issue with the Amazon Shopping Cart checkout function was brought to our attention. If a customer uses the checkout button to click through to Amazon, they will be confronted with a message saying that there are no items in their cart - not good!

This seems to be a very new issue, and seems to have happened due to an update by Amazon in their own systems. When the Shopping Cart forwards customers to Amazon, the purchase URL that it uses has the & entity in its query string encoded as & . This is a normal thing to do, and until now the Amazon API never had a problem with this, now suddenly it does. We are hoping that Amazon will soon fix the issue themselves, and we have raised the issue on the Amazon developer forum, but so far there is no response. Being a big company it is difficult to contact them to raise a bug report.

Anyway there is no point in complaining further about it, it is not a difficult thing to work around it. We will be releasing a new update, version 1.6.3, probably later today, which includes a fix for this as well as a few other bugs.

In the meantime (or if you don't want to update) you can fix this by making sure the the & entity is not encoded in the purchase URL. The code that handles this is in your installation package for com_amazonws in the file site/controllers/amazonshoppingcart.php, and is right at the end of the file:-

if(! empty($purchaseURL))
{
$mainframe->redirect($purchaseURL);
}

Change this to

if(! empty($purchaseURL))
{
$purchaseURL = str_replace("&","&",$purchaseURL);
$mainframe->redirect($purchaseURL);
}

 And copy the file to this location on your site.

site/components/com_amazonws/controllers/amazonshoppingcart.php

 

Categories

Support Forum