Another Update (Sept. 3, 2004): I’ve added a category for the amazon plugin that’ll list all relevant posts so I don’t have to keep going back and adding these stupid updates. Be sure to read all posts in the category for complete details.
Update (Aug. 16, 2004): I’ve added some functionality and fixed a bug. Check here for details.
I’ve just written my first WordPress plugin. Actually, I had previously modified the acronym plugin to allow me to specify some common words that should always be associated with links (only later did I notice that the author of the original plugin had already done just this). Amazon Wishlist is my first original plugin, though, and even at that, the bulk of the code isn’t mine. I found a fairly concise script that interfaces with the Amazon API and another that actually handles making the connection, and I wrapped some code around the results to make it all into a nice configurable plugin for WordPress. Incidentally, there is another Amazon plugin here that allows you very easily to browse books and insert them into your entries. Very nifty, but it serves a different purpose.
Installation
You have only to download the plugin, stick it in your wp-content/plugins directory, edit a few variables, optionally add some style sheet definitions, and activate the plugin using your control panel. Straight from the code itself:
[php]
$aw_dev_token=”; //Get this from http://www.amazon.com/gp/aws/landing.html.
$aw_associates_id=”; //Optional; set to empty string if not applicable.
$aw_type=’lite’; //could also be heavy, though it doesn’t seem to make a difference in the search results.
$aw_wishlist_id=”; //The id of the wish list you wish to search. Hint: Search for (don’t simply go to) your wish list and copy the id from the end of the URL.
$aw_header=’Amazon Wish List’; //Used to label the box.
$aw_show_author = 1; //Set to 0 to suppress.
$aw_image_size = ‘Medium’; //’Small,’ ‘Medium,’ or ‘Large’
$aw_show_price = 1; //Set to 0 to suppress.
[/php]
Here’s hoping it’s not buggy and that it helps somebody out. You can see it in action in my sidebar.
Note the update line at the top. Additional notes available here.
hi, does this plugin work only for books or can i use it for any item on amazon? (cameras, printers, etc). thanks!
WordPress Amazon Wishlist Plugin
Daryl L. L. Houston has released a revision to his Amazon Wishlist plugin for WordPress. In looking at the XHTML generated by the plugin, I was a bit dissatisfied, so I’m going to modify it a bit—which I can do, since the plugin was released under …
[…] shlist slvShowNewIndicator(1092756710); Filed under: WordPress Plugins|Google it! Amazon Wishlist. Pull random items from Amazon Wishlist. slvShowNewIndi […]
Hi.
i`m trying to setup ur plugin, but a i didnt understand this line [ $aw_dev_token=‘’; //Get this from http://www.amazon.com/gp/aws/landing.html. ].
can you help me with that ?
Thanks.
In order to use Amazon’s API, you have to have a developer token. Presumably, this is in large part so that they can make sure you’re not abusing their system, though they no doubt use the token to track you for other reasons as well. You can apply for a developer token at the URL noted in the comment on the line in question. It’s just a matter of providing some contact information. Amazon will send you a string of characters in response. This is your developer token and is what you should place between the quotes in the line in question. I don’t provide my own developer token as part of the plugin because I don’t want to be at risk of having it revoked thanks to abuse on the part of others.
[…] uentas vale la pena Aqui esta el link de la pagina oficial del desarrolador del plugin: http://daryl.learnhouston.com/index.php?p=55 EOF…. Co […]
[…] uentas vale la pena Aqui esta el link de la pagina oficial del desarrolador del plugin: http://daryl.learnhouston.com/index.php?p=55 EOF…. Co […]
[…] wishlist and displays an item off of it. Perhaps this will force me to keep it updated. Link. Comments » The URI to TrackBack this entry is […]
Hello,
WHen using $aw_show_after_cats = 1, the amazon wish list gets stuck in the category loop, displaying itself under each category. That gives a quite ugly mess, I would advice you to have a look at it if you have some time!
Cheers,
J-M
Comment No. 19, I’m unable to duplicate this behavior. When I set the flag to 1 and don’t remove the function call to “get_amazon_wishlist()” from within my template, I do get one duplicate listing (that is, the Amazon block displays twice), but this is expected behavior. It sounds like what may be happening is you’ve put that function call inside a loop that generates categories. In any case, I’m unable to duplicate this with the information provided. Thanks for reporting it, though.
[…] WordPress — Jamie @ 11:26 am
I was having some trouble implementing the Amazon-Wishlist Plugin because when it imported the images from Amazon, the images overflowed into o […]
[…] « Countdown to Costa Rica Amazon Wish List The Amazon Wishlist plugin by Daryl at Two Ells is a breeze to use and configure. Now I can have all th […]
[…] ress update! Amazon Wishlist WordPress plugin The Amazon Wishlist plugin for WordPress still works ok on 1.5, you just need to remove the extra declaration for the sn […]
Very nice plugin… We use the plugin to inspire people reading books from our wishlist… but to make it even more inspirational we would like to show the cover in stead of the title… ANY CLUES HOW TO DO THAT?????
cheers,
Arjan
[…] Rebuilt Web Server Amazon Wishlist Plugin A reminder to add the Amazon Wishlist Plugin to my blog sidebar. This entry was posted […]
I am setting up my site in preparation of migration from Blogger and I am thinking of implementing the Amazon Wishlist plugin. It is working well on the webpage, but when it is running, I get an error on the admin page:
Fatal error: Cannot redeclare class snoopy in /home/thebloke/public_html/wp-includes/class-snoopy.php on line 40
I was told to remove the Snoopy section out of the plugin, and when I do, I get an error message where Amazon wishlist is supposed to be, but the dashboard works.
Can you please help?
[…] Wishlist Image Overflow Solution I was having some trouble implementing the Amazon-Wishlist Plugin because when it imported the images from Amazon, the images overflowed into o […]
I think I must just be particularly dense, but can this plugin display the entire wishlist, or just one item? Thanks for an excellent plugin. 🙂
Same issue as comment 26… removed the snoopy class, wishlist displays only a broken image, and multiple errors on admin > options. Hmm…
greSHam777
5667Ae