Amazon Link

February 7th, 2012 Leave a comment Go to comments

Provides a facility to insert Amazon product links directly into your site’s Pages, Posts and Widgets and Templates.

Description

This plugin is used to quickly add Amazon products to your WordPress posts and pages. The products can be simple text links, thumbnail images, fullsize images, complex templates or full-blown Amazon flash widgets.

The product links that the plugin generates can be for any of the Amazon domains (UK, US, Canada, China, Germany, Spain, France, Italy and Japan).

The content of the products can be statically entered by the Author, when the link is created, or dynamically refreshed when displayed using the Amazon site that is most appropriate for the nationality of the reader.

The products to be displayed can be specified when the link is created, using the built in Amazon search widget, or dynamically generated by searching the content of the site.

All product links will contain the Amazon affiliate ID of the site author and will be the relevant one for that locale, allowing the author to collect commission on any products purchased through the links.

Key features
  • Search Tool to assist authors to create links in posts and pages
  • Simple [amazon] shortcode used to generate product links
  • Localisation of all links based on the nationality of the reader
  • Optional multinational popup to allow the reader to choose which Amazon site to visit
  • Global options to update the behaviour of all the links on your site
  • Ability to locally override the global options using the shortcode content
  • Affiliate Tracking IDs for User or by user specified ‘Channels’.
  • Flexible template facility to enable the author to quickly create complex content quickly and consistently
  • Includes built in templates for the major Amazon widgets (Carousel, My Favourites, etc.).
Quick Start

To quickly add a simple text link add the following lines into an entry (page, post or text widget): [amazon asin=<ASIN Number>&text=<link text>]

Where ASIN Number is the unique amazon number used to identify products e.g. “1405235675″. The Link Text is simply what you want to be shown for the link, e.g. “Mr. Good”.

To utilise one of the templates simply specify the template option with the name of the template to use. For example: [amazon asin=<ASIN Number>&title=<link text>&template=thumbnail].

To generate a list of products relevant to the content of your site use the ‘cat’ option, to specify where the plugin should search for Amazon product links. This option can be either ‘local’ to search the current content or a list of category ids to search specific sections of your site. For example I use this feature to provide friends and family some ideas for presents. This feature is based on the Amazon Web Service API and uses the ‘CartSimilarities’ feature to generate the list of items.

This is created by either putting the line amazon_recommends(<Category>,<Number of Posts>) in your template. Or putting the line [amazon cat=<Category>&last=<Number of Posts>] within a post or page. Where ‘Category’ is a list of category ids to search within (e.g. as expected by the ‘cat’ argument of query_posts function. The ‘last’ parameter is the number of posts to search through.

Latest Version – Development
  • New Feature – Amazon search links for non-local links
  • Bug Fix – Fix so that searches from all Search Indices return valid results.

Installation

Simply:

  1. Download the amazon-link plugin from the Plugin Directory.
  2. Unzip the amazon-link.zip file into your WordPress `/wp-content/plugins/` directory.
  3. Activate the plugin through the ‘Plugins’ menu in WordPress.
  4. Update the settings (at the very least enter the default Affiliate Tags)
  5. If you wish to use the advanced functionality: Wishlists, Search or Media Upload facilities or the live data option you must also set up an Amazon Web Services account. So that you can update the AWS Public and Private key settings.
  6. Insert links and wishlists into your content using the [amazon] tag as described above, or using the Amazon Link box on the Page/Post edit pages.

More Info

If you have any questions about the plugin, please check the Frequently Asked Questions section then either post a comment to this post or check the WordPress Forums.

Further information on the Plugin can be found on these pages:

Screenshots

1. This is the example wishlist taken from www.HouseInDorset.co.uk

2. This shows the multinational Amazon link popup.

3. This shows the Amazon Link Metabox that can be used to insert shortcode links into Posts or Pages.

4. This shows the Template editor available on the Plugin’s Settings page.

  1. November 7th, 2011 at 23:03 | #1

    @Matthew
    Hi Matthew, That template should work fine and I don’t think its a problem with the plugin itself.

    I’ve had a look on the Amazon Web Services forum and it appears this is a known problem with the Amazon API. There is a work around and I will try and put a bug fix version out shortly. This will at least give you some sort of price for the items you have on your site. The only item I can’t get working is the Kindle, no matter what I try I can’t get a price back for this item!

    Cheers, Paul

  2. November 10th, 2011 at 17:48 | #2

    Is there a way to wrap text around the iframe box? Thanks.

  3. November 10th, 2011 at 22:08 | #3

    @Kimberly
    Hi Kimberly,
    You should be able to style the iframe in the same way as you might an image, so one way to achieve what you want might be to make the iframe float to the left or right then the text will wrap around it as appropriate.

    You can do this by entering the Amazon Link Settings page, then go down to the ‘iframe image’ template and select ‘Copy’. This should create a new template ‘iframe image1′. Change the name to something more meaningful like ‘iframe left’. Then edit the content of the template:

    There should be something like: style="width:120px;height:240px;" in the template. Just change this to read style="width:120px;height:240px;float:left;" and when you use this template your paragraph should wrap around the iframe.

    There’s probably lots of better ways to do this but I know this works for me!

    Cheers,

    Paul

  4. November 21st, 2011 at 14:12 | #4

    I LOVE this plugin (though I’m not currently using it) – this is EXACTLY what I am looking for to get Amazon products onto a new site I started just last night – wesleyanbooks.net

    I know enough code to get by, but not enough to really be dangerous (unless breaking my blog every month or so qualifies as ‘dangerous’). I would LOVE to find a repository of template-ideas for this plugin. I had to give up after midnight last night trying to create a template that suited my site-design. If there was a code & screenshot page that listed user-created templates, I would leap for joy!

  5. November 22nd, 2011 at 01:13 | #5

    @Paul
    Thanks for looking into that, I’ve come to the same conclusion myself, Amazon doesn’t publish kindle e-book prices via the API. Phoey.

  6. November 22nd, 2011 at 02:51 | #6

    @Paul, it would be wonderful if we were able to choose what to display if the price is not available (currently set with amazonSearch.php:260-263). If it’s not high on your priority list, I’d be happy to code it myself and send you a patch. Just let me know. Thanks!

  7. November 22nd, 2011 at 08:56 | #7

    @Stevan Sheets
    Hi Stevan,

    A template gallery is a really good idea, but I’m not sure how large a user base there is to support it. I don’t have the time to set it up myself, but you could always start a WordPress forum Topic at: http://wordpress.org/tags/amazon-link?forum_id=10.

    I was intending to improve the template aspect of the plugin at some point (mainly for when I update or add new templates to the default set). Any suggestions in this area are always welcome.

    Thanks,

    Paul

  8. November 22nd, 2011 at 09:07 | #8

    @Matthew
    Hi Matthew,

    You can already set the price manually if you want by putting any keywords in the shortcode, these should override what Amazon returns. For example [amazon asin=B004IK8MAI&price=£3&template=wishlist] should set the price to ‘£3′.

    Thanks,

    Paul

  9. November 29th, 2011 at 20:02 | #9

    Don’t get on with plugings, mostly to complicated for me but this one, It’s simple and it works , what more can you want, good work, thank you.

  10. Christopher Welle
    December 3rd, 2011 at 00:34 | #10

    Hi! Thanks for the great easy plugin. I was wondering if there was a way for this plugin to alter the RSS feed to show the iframe code instead of the Plugin Callout for the iframe?

  11. January 3rd, 2012 at 17:35 | #11

    Hello, I’m trying to get a link inserted with either a thumbnail or an iframe, but the link continues to come out as Text only. I’ve tried to access your technical info and settings & shortcode info pages, as linked above, but when I click on them, I receive an Error 404 every time. Have the help files been moved?

  12. January 3rd, 2012 at 19:55 | #12

    @Gayze
    Hi Gayze,

    I can’t see a problem with the help page links, do you mean the ones pointing to: http://www.houseindorset.co.uk/plugins/amazon-link/other_notes (for the settings & shortcodes link)?

    How are you generating your shortcodes? Using the ‘Add Amazon Link’ helper box, or manually?

    The shortcode in your post should contain the item 'template=thumbnail' at least, for example: [amazon asin=1409308847&template=thumbnail&live=1]

    Can you cut and paste the shortcode content you are using?

    Paul

  13. January 17th, 2012 at 11:55 | #13

    Hi Paul,

    thanks for building this plugin!
    Maybe it’s just me but where do I find the search tool?

  14. January 17th, 2012 at 13:23 | #14

    @debjay
    Hi debjay,

    I’ve been having some problems with the search results not coming back, so I’m currently bug fixing it. It should work for music & books though.

    On the page or post edit pages in WordPress there should be a box called ‘Add Amazon Link’, in that box the second section is ‘Search Amazon for Products’. Fill in the author/artist/manufacturer/brand and/or title, select a Product Index, then hit the Search button (do not hit enter as this is taken as Publish Post by WordPress).

    It should produce a page of 10 results, select + or – to navigate to the next or previous page of results.

    Cheers,

    Paul

  15. January 17th, 2012 at 14:00 | #15

    Hi Paul,

    thanks for getting back to me so quickly!
    Unfortunately, the search option isn’t there. Here is what I get below my post box:

    Enter the following settings for a simple Amazon Link
    ASIN

    Link Text

    Template

    Channel

    Enter the following settings for an Amazon Wishlist
    Post Category

    Number of Posts

    Wishlist Type

    Advanced settings
    Use Defaults

  16. January 17th, 2012 at 15:32 | #16

    Also localization is not working, it keeps sending me to amazon.com and I’m in germany.

  17. January 17th, 2012 at 16:31 | #17

    @debjay
    Hi debjay,

    The search box only works if you have entered valid Amazon AWS Keys in the settings page, you can get these from http://aws.amazon.com/.

    Localisation only works if you have installed the ip2nation database, you should see a prompt at the bottom of the settings screen if this is not installed.

    Cheers,

    Paul

  18. debjay
    January 17th, 2012 at 19:20 | #18

    thanks, inserting the AWS key did the trick.

    I did install the ip2nation database earlier and it didn’t work. clearing the cache seems to have solved that though!

    thank you very much for your help and this wonderful plugin.

  19. January 18th, 2012 at 00:07 | #19

    Amazon product links directly into the Page, works well, thank you,

  20. February 7th, 2012 at 23:20 | #20

    I’m having trouble figuring out how to fix an issue that I inadvertently caused. I accidentally enabled the localization function without installing the ip2nation db and now the plugin is hosed. I can’t even update the settings without installing ip2nation, which I’m trying to avoid. Where are the settings stored? I’d like to be able to edit a file or database table to remove the localization option but I can’t figure out where to find the settings.

  21. February 8th, 2012 at 09:00 | #21

    @scottb

    That really shouldn’t have stopped the plugin working, I shall look into it…

    In the mean time if you a re confident working around mysql, you need to find the item in the ‘_options’ table in your wordpress database that has the ‘option_name’ = ‘AmazonLinkOptions’.

    If you have phpmyadmin install you could try editing the option, just change the “1″ after “localise” into a “0″. Or delete all the options with something like:

    DELETE FROM `DB_options` WHERE `option_name` = 'AmazonLinkOptions'

    You need to change the ‘DB_’ in ‘DB_options’ to suit the name of your wordpress installation.

    EDIT:

    I can’t recreate the problem with my version of the plugin, if I remove the ip2nation database it just defaults to the ‘US’ domain all the time. I have tightened up the error checking in the ip2nation part of the plugin to resolve this problem. Any more info you can give would be helpful, thanks!

    Paul

Comment pages
1 2 841
  1. July 14th, 2011 at 17:27 | #1
  2. August 16th, 2011 at 11:35 | #2