The Book module creates "Printer-friendly version" at the bottom of Book pages. If you hit that link from a page with child pages, Drupal creates a printer-friendly page from that page and its child pages. If you hit the link from the Book's top page, you get the whole book in a single page!
Checking out Amazon on Drupal 6, Part 1
How can you easily add Amazon product links to a Drupal site? If you've been working with Drupal at all, you can guess the answer: There's a module for that!
That would be the Amazon module. Yet... How do you use that module? As noted in this forum thread, the module contains nearly no documentation, and I failed to find anything among the Drupal.org handbooks.
There's a little documentation on Drupal.org for the Amazon Store module but not for the Amazon module itself. This finding is repeated inside a comment at comment at Drupal Modules.com: "It doesn't have any documentation on how to use it but I found a lot out by visiting the issue queue and reading the user posts."
I'm trying to get Amazon working on another site, just a simple way to display some Amazon offerings alongside a node, or even an in-site "store". One solution, of course, is to paste Amazon code directly into nodes or blocks, but that's somewhat static; I'm interested in seeing what a module can do to improve upon that. Some problems and in-progress solutions:
The Amazon module for Drupal 6
I experimented with the Amazon module under Drupal 5. I no longer have an operational Drupal 5 site with Amazon content to play with, but I recall (correctly?) that the module created "Amazon node" as a content type. It was like a Page or other standard content type, but populated its fields with info on an Amazon product, based on the ISBN or ASIN you input into the appropriate field. There was even a nifty interface letting you search Amazon products from within the admin page and mark specific products, which would then get imported en masse as Amazon nodes.
Here's what Amazon module 6.x-1.0-beta7 for Drupal 6 offers, according to the READ ME document:
1) A core API module that communicates with Amazon's web services and adds support for retrieving, displaying, and storing basic product information in Drupal as well as associating Amazon products with content nodes. [Views integration is still in progress, pending the completion of Views 2 for Drupal 6.]
2) A field type (and an accompanying set of formatters) for CCK that allows Amazon products to be explicitly added to any node type. [This portion of the package is still in progress, pending the completion of CCK for Drupal 6.]
3) An 'Amazon Media' module that adds support for Amazon's extended product information for several common product types (Books, Music, DVDs, and Software).
4) An 'Amazon Search' module that allows developers to conduct API-driven searches of the Amazon product database. This module also allows users to search Amazon's product database from Drupal's Advanced Search page.
Hmm. So it appears to be an API module that'll later allow other modules to handle most expected functions. The settings at admin/settings/amazon support this: there's a tab for your Amazon Associates-related information, a tab for setting a couple of product data parameters, and a tab for testing things, via a single field for a product ID. That's it. I see no mention of or interface related to Amazon nodes, or any interface for searching and marking Amazon products for import as nodes. (And as an API module, the lack of non-developer documentation isn't so unusual.)
There's not much to play with, but let's give the "Test" tab a spin. Input a valid product ID, click "Look Up Product", and... errors result, including...
warning: Invalid argument supplied for foreach() in .../modules/amazon/amazon.module on line 292.
...which persisted even after updating to the latest module version (mine was initially a version or two behind) and running update.php.
The problem was apparently in my Settings tab. Things have changed over at Amazon since my 5.x experiments, and I won't pretend to be up to speed. First, I had my Associate ID already input, as well as a value in the Amazon AWS Access Key ID field, left over from 5.x. These had both been obtained, to the best of my memory, from my account pages at https://affiliate-program.amazon.com/ .
But for the new field Amazon AWS Secret Access Key, it seems I needed to visit the site http://aws.amazon.com/ . That's a new one on me. My Amazon Associate ID worked there, which is good, and I found my way to the Security Credentials page that provided me with the Secret Access Key.
All of which I did when checking my setup, so why the errors? In the end, my old, leftover Access Key ID was likely the troublemaker. My Security Credentials page at https://aws-portal.amazon.com displayed a new Access Key ID, paired with the Secret Access Key; with both new keys in place, the Test tab did its thing with no error (I think; see below).
It's no surprise that the mismatched keys would generate some error, though rather than the above I would have expected some sort of "ID not verified" message. But maybe that's essentially what's happening under the hood.
(Shifting attention from Drupal to Amazon, it's also odd that I need to get some of my info from affiliate-program.amazon.com and some from aws.amazon.com; why aren't these integrated into one? Anyone out there have insights for this confused Amazon newbie?)
Anyway, back to that test: What was the result? The test returned a page that starts out looking good, but doesn't stay that way for long:

(Followed by more in that vein.)
Ahem. Is this what the test is supposed to return? Anyone know? Well, it may not be pretty, but it is information for the correct item. So far so good, I'll guess.
More soon
The above exhausts the immediate, interactive features of the Amazon module that I can see, but there's more to do, including checking out CCK Amazon fields and the Amazon Store module. I'll be back very quickly with more.
Relevant Content
The Drupal Ace logo has dealt these content suggestions from the deck.
- Checking out Amazon on Drupal 6, Part 2
- Back on track with Node Import
- How's that Ubercart review coming along?
- Testing Ubercart ecommerce: Please help with missing tabs!
- Coming up: Review of Packt Publishing's "Drupal E-commerce with Ubercart 2.x"
- Manhandle that database back into shape
- Module upgrades cause troubles
Learn Drupal, hands-on
Get the beginner-friendly ebook that teaches community site building via a live case study.








how did u get rid of the
how did u get rid of the above issue ... all the below info array .......
I cant seem to find a solution anywhere .. I tried using a set of new access keys ...but no use
I have the same issue as above
Please could you tell me how did you rectify the above issue. I have looked up everywhere on drupal i cant come across anyone having the above issue .
The information of the item is correct... but whats with all the array and info below ? how do i get rid of it ...
I did register for an AWS account ..did use an new set of keys but i still cant get rid of this shit ..
along with this right on the top ..in red i have this user warning: Unknown column 'invalid_asin' in 'field list'
query: INSERT INTO amazon_item (asin, title, detailpageurl, salesrank, publisher, manufacturer, studio,
label, binding, listpriceamount, listpricecurrencycode, listpriceformattedprice, productgroup, producttypename,
invalid_asin, timestamp) VALUES ('0195398610', 'Fixing Failed States: A Framework for Rebuilding a Fractured World', 'http://www.amazon.fr/Fixing-Failed-States-Framework-Rebuilding/dp/0195398610%3FSubscriptionId%3DAKIAJNODW3O3INJNDHIQ%26tag%3Dmelwyn.s@gmail.com
%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0195398610', 15082,
'Oxford University Press Inc', 'Oxford University Press Inc', 'Oxford University Press Inc', 'Oxford University
Press Inc', 'Broché', 1175, 'EUR', 'EUR 11,75', 'Book', 'ABIS_BOOK', 0, 1260964550) in
C:\wamp\www\usingdrupal\includes\common.inc on line 3468.
Amazon errors
In my case, getting the correct Amazon account info input was, to the best of my memory, the trick that cleared up the error. In addition, the error message I was receiving appears different from yours. So my guess is your problem has its cause somewhere else...
Regarding the error message you display, is it coming from the admin/settings/amazon form's "Test" tab? Or is this being generated somewhere else?
Amazon documentation needs you
The Amazon module documentation is in progress, at http://drupal.org/node/595464. Your contributions are welcome!
Amazon module documentation!
Hey, Amazon module documentation! I guess this is brand new, or I just missed it before under the "Commerce and advertising modules" header? Either way, excellent!
Looks like a great start. Let me read through, and I'll very happily add whatever I know that isn't in the text. Thanks!
Post new comment