Per amazon:

Dear Product Advertising API Developer,

On November 8, 2010 the Reviews response group of the Product Advertising API will no longer return customer reviews content and instead will return a link to customer reviews content hosted on Amazon.com. You will be able to display customer reviews on your site using that link. Please refer to the Product Advertising API Developer guide found here for more details. The Reviews response group will continue to function as before until November 8 and the new link to customer reviews is available to you now through the Product Advertising API as well.

Thank you for advertising products for sale on Amazon.com.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rfay’s picture

Title: Customer reviews no longer in Amazon API » Customer reviews no longer in Amazon API after 8 Nov 2010
the_g_bomb’s picture

First off not sure if it will make any difference but the we might need to change the version of the API being used:
define('AMAZON_ECS_SCHEMA', '2009-03-31');
current version is: Developer Guide (API Version 2010-09-01)
http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/Optional...

Not many changes required to ensure the data doesn't vanish in November as the IFrameURL is being pulled in at present. May need to change the amazon.views.inc file to remove the references to customer data that will not be available.

Ultimately, I think, we will need to grab and process the iframe page to extract the necessary customer review data, so that it can be saved to the database as it is currently.

rfay’s picture

Nice work on this. I don't think the schema ever ends up mattering, but it's fine to update it.

the_g_bomb’s picture

I just installed a fresh version of drupal and amazon (only) to trace the code and ensure I understood everything going on before attempting to resolve this.

The weird thing I discovered was that the iframeURL does not get pulled in if you use the test function or just look up the item. After you run cron, though the iframeURL gets pulled in.

the_g_bomb’s picture

Version: 7.x-1.x-dev » 6.x-1.1
FileSize
644 bytes

My bad, it isn't to do with cron. It was a clear cache and I had updated the AMAZON_ECS_SCHEMA, but it didn't take effect until I ran cron.

You do need the updated API VERSION to get the iFrameURL

the_g_bomb’s picture

Although the test still isn't showing up the iframeURL, which is due to the amazon_item_clean_xml

Perhaps if we actually passed some more values into the items array:
// from line 515 of amazon.module

<?php
  // And the customer reviews.
  if (isset($xml->CustomerReviews)) {
    $item['customerreviews'] = array(
      'AverageRating' => (string)$xml->CustomerReviews->AverageRating,
      'TotalReviews' => (string)$xml->CustomerReviews->TotalReviews,
      'IFrameURL' => (string)$xml->CustomerReviews->IFrameURL,
    );
    foreach($xml->CustomerReviews->Review as $data) {
      $item['customerreviews']['Review'][] = array(
        'rating' => (string)$data->Rating,
        'date' => (string)$data->Date,
        'summary' => (string)$data->Summary,
        'content' => (string)$data->Content,
      );
    }
  }
?>
rfay’s picture

Status: Active » Needs review
rfay’s picture

Thanks for blazing the trail on this, @the_g_bomb!

Here's the additional work I think needs to be done. Since they will no longer be providing any customer review data, we can drop the table, remove that stuff from the view, etc.

Could you test the upgrade path (and the fresh install path) and comment as needed?

Thanks,
-Randy

the_g_bomb’s picture

I'm struggling to get this patch fully applied other than manually and even then I am not 100% confident I have everything. The automatic patching I am trying seems to have an issue with:

CHANGELOG.txt
amazon.admin.inc
amazon.install

I am trying to upgrade from amazon (6.x-1.1).

The one thing that concerned me was that there doesn't seem to be an function amazon_update_6014() in anyof the versions I checkout, althought it is referenced in the patch file. Would prefer to get the patch properly applied before I actually test the module itself.

That being said, eyeballing the code, and from the couple of sweeps of the patch I have made, the code changes look ok to me.

rfay’s picture

Version: 6.x-1.1 » 6.x-1.x-dev

@the_g_bomb, patches are (almost) always against the tip, which in this case is DRUPAL-6--1, which is the same as the dev tarball most of the time. Please give that a try.

the_g_bomb’s picture

Wierd, using DRUPAL-6--1 only amazon.install and amazon.admin.inc gets updated

rfay’s picture

Well, in that case something is wrong with your process; the patch has changes for amazon.module. You can just look inside it and see that.

rfay’s picture

@the_g_bomb, I'm in IRC if you want to find me there for any help.

rfay’s picture

Here's #8 again rerolled against DRUPAL-6--1. Some other commits had in fact made it not apply.

Would appreciate your look-see at this, @the_g_bomb. Just realized that the Amazon deadline is almost here.

rfay’s picture

Status: Needs review » Fixed

#14 committed to DRUPAL-6--1.

rfay’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Fixed » Patch (to be ported)

Now this has to be done on D7.

rfay’s picture

Status: Patch (to be ported) » Needs review
FileSize
8.19 KB

Here's the D7 version.

rfay’s picture

Status: Needs review » Fixed

Committed to HEAD: http://drupal.org/cvs?commit=456522

Will very much appreciate D7 testers taking a look at these.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.