Menu

#62 Amazon Lookup for 0.6.1

open
nobody
None
5
2015-11-09
2010-03-08
Kees
No

This the fixed amazon lookup add-on. I changed two files: amazon.php and amazon.conf.php, you should just be able to replace the old ones if you had the add-on installed before or follow the install instructions if you install it from scratch.

Discussion

  • Kees

    Kees - 2010-03-08

    Amazon Lookup for 0.6.1

     
  • Marie

    Marie - 2010-12-09

    Does the service at Amazon cost. I could not figure it out at a quick glance....

    Sr Marie

     
  • Marie

    Marie - 2010-12-09

    Also I could not figure out how to find my id with the instructions given. I have signed up for an account, but which service to sign up for?

    Sr Marie again

    Ps. How to install - open the php-files in an editor - I use Notepad++ and copy and paste according to the (excellent) instructions.

     
  • Kees

    Kees - 2010-12-09

    Hmmm, I seem to remember struggling with the same question, but now I can't remember the answer. I think you just create an account, don't sign up for any services and then follow the instructions in amazon.conf.php.
    Maybe you can confirm that if it works, just so that people who have the same question in future can look it up here.

    I am sorry I did not notice the installation question before. There are installations instructions in the tar archive. These are the original ones. I did not write them, but they still work.

     
  • Marie

    Marie - 2010-12-09

    I can confirm that this version vorks with the current 0.7.0 (tip) version of OpenBiblio as well. Thank you so much for this plugin!

    Here's how to find the Amazon Access Key ID:

    Create account at
    https://aws-portal.amazon.com/gp/aws/developer/registration/index.html

    Do not sign up for any services!

    Go to:
    http://aws.amazon.com/

    Click "Sign in to the AWS Management Console" at the top middle of the page.

    Click "Account" top middle of the new page
    Click "Security Credentials"
    Click "Access Credentials"

    And there's your info! Just copy and paste the codes Access Key ID and Secret Access Key into the amazon.conf file as per instructions and you are on your way...

    Marie

     
  • Kees

    Kees - 2010-12-17

    Where did you find openBiblio 0.7.0? I had a look at the website (http://obiblio.sourceforge.net/) and only can find the old 0.6.1.

     
  • Kees

    Kees - 2011-11-09

    Recently my amazon lookup stopped working again. Probably due to this:

    https://affiliate-program.amazon.com/gp/advertising/api/detail/api-changes.html

    Won't have time any time soon to change the script, so if anyone wants to have a go, please feel free.

     
  • Reini

    Reini - 2011-12-29

    This diff should fix it. You just need to get an Associate ID from Amazon from http://affiliate-program.amazon.com and fill it in into the amazon.config.php

    diff -rupN old/amazon.conf.php new/amazon.conf.php
    --- old/amazon.conf.php 2010-03-08 12:11:42.000000000 +0100
    +++ new/amazon.conf.php 2011-12-29 09:50:01.000000000 +0100
    @@ -11,9 +11,9 @@
    * header, mouse over 'Your Web Services Account' and click
    * 'View Access Key Identifiers'.
    */
    -$access_key_id = 'enter key';
    -$secret_access_key = 'enter key';
    -
    +$access_key_id = 'enter key';
    +$secret_access_key = 'enter key';
    +$associate_tag = 'enter key';

    /**
    * Choose most relevant AMAZON site. Default to main US site.
    diff -rupN old/amazon.php new/amazon.php
    --- old/amazon.php 2010-03-08 23:29:54.000000000 +0100
    +++ new/amazon.php 2011-12-29 09:55:00.000000000 +0100
    @@ -80,9 +80,10 @@ class CAmazon
    var $_collection = ''; // And in what collection
    var $_language = '';
    var $_access_key_id;
    - var $_secret_access_key;
    + var $_secret_access_key;
    + var $_associate_tag;

    - function CAmazon($access_key_id, $secret_access_key)
    + function CAmazon($access_key_id, $secret_access_key,$associate_tag)
    {
    if(strlen($access_key_id) < 20)
    {
    @@ -95,7 +96,8 @@ class CAmazon
    exit;
    }
    $this->_access_key_id = $access_key_id;
    - $this->_secret_access_key = $secret_access_key;
    + $this->_secret_access_key = $secret_access_key;
    + $this->_associate_tag = $associate_tag;
    }

    function form()
    @@ -157,7 +159,8 @@ class CAmazon
    // additional parameters
    $params = array();
    $params["Service"] = "AWSECommerceService";
    - $params["AWSAccessKeyId"] = $this->_access_key_id;
    + $params["AWSAccessKeyId"] = $this->_access_key_id;
    + $params["AssociateTag"] = $this->_associate_tag;
    $params["Operation"] = "ItemSearch";
    $params["SearchIndex"] = $collection;
    $params["Keywords"] = $search;
    @@ -461,7 +464,7 @@ class CAmazon
    }
    }

    -$amazon = new CAmazon($access_key_id, $secret_access_key);
    +$amazon = new CAmazon($access_key_id, $secret_access_key,$associate_tag);
    $amazon->set_language($text);

    switch($action)

     
  • Anonymous

    Anonymous - 2012-04-28

    Have there been any changes to this script now that we are in version 0.7.1? Thanks.

     
  • elsev7

    elsev7 - 2014-11-07

    Hi

    long time no update here.. Is the amazon lookup still working in 0.7.2 version. Any other changes required beside the ones mentioned in the diff?

    Thanks for your feedback

     

Log in to post a comment.