Build Your Own Amazon Niche Store

amazon-logo Update: The Amazon Niche Store has been superseded by the Free WordPress Store for Amazon Associates. Redirecting you in 5 seconds…

Given that I recently had some success with my free eBay Store, I decided it would be a good idea to put together a similar WordPress plugin for I’m pleased to present the Amazon Niche Store plugin. So why should you consider building a niche store with Amazon instead of eBay?

I believe that my Amazon Niche Store plugin has the potential to make more money than my free eBay Store (or BANS, phpbay, and the like) for a few reasons:

  • If you sell eBay products, those that bid through your blog need to have the winning bid for you to get paid.  With the Amazon Niche Store, you are awarded the commissions as soon as they buy the product.  You don’t have to worry about them winning a bid for you to get paid.
  • If the items you sell are more than $75 or so in value, you will receive higher commissions selling them on Amazon than you would on eBay.  Amazon pays a flat minimum of 4% on the sale price, whereas eBay pays on a minimum of 50% on the fees collected for the listing.
    Sale Price Commissions
    eBay $150 50% of $8.57
    ($2.00 listing fee + $6.57 sale fee)

    = $4.28
    Amazon $150 4% of $150 sale price = $6.00
  • You can sell digital products on Amazon (downloadable music, video games, videos, books, etc.) and receive 10% commission on those sales.

You can display an Amazon Niche Store within posts, pages, as a widget, or any combination of the three.  For example, if you have a video game blog, you may want to display a post or page with Wii products.  You could use the following short code:

[amazon trackingid="yourtrackingid" keywords="wii" rows="3" columns="2"]

And here is what the store would look like:

[amazon trackingid=”gee0dd-20″ keywords=”wii” rows=”3″ columns=”2″]

There are two conditions you should be aware of when using the plugin:

  • The store displays a link back to this page.  This helps to spread the word about this great plugin so that others can take advantage of it.
  • Your tracking ID is used 90% of the time, and the other 10% my tracking ID is used.  This will allow me to be compensated for my efforts, and help me spend more time making even more great plugins.

These conditions are subject to change at any time. By downloading, installing, and activating the plugin you agree to these terms. If you do not agree to these conditions then do not use this plugin.

To get started, you will first need to sign up as an Amazon affiliate (this absolutely free).  Once you’ve signed up or if you’re already signed up, create a new tracking ID to use with your Amazon Niche Store.  Then download, install, and activate the plugin.

Download the Plugin

Once installed and activated, write up a post or page where you wish to display an Amazon Niche Store.  Use the following shortcode (put it all on one line):

[amazon trackingid="YourTrackingID" keywords="Product Keywords" rows="RowCount" columns="ColumnCount" pagination="yes" logo="white" customcss="someuniqueidentifier"]

trackingid and keywords are required parameters. Use spaces between the keywords. columns and rows are optional, and the store plugin will default to 2 columns x 5 rows (10 items in total). The product display on a single page is limited to 30 products (and 50 products in total, if pagination is used).

The pagination, logo, and customcss parameters are also optional. The pagination parameter will allow the display of multiple pages of products when set to yes. You can see this demonstrated on my Amazon Niche Store demo page. You can set the logo parameter to white, black, or none to customize the display of the Amazon logo.

The customcss parameter allows you to customize the look and feel of your store.  By default, the product display mimics that of  The product display uses custom css classes, and the customcss parameter you specify will be added to the custom class names.  For example, if you set customcss=”mycustomcss”, you can specify the CSS for the following classes:

  • amazon-store-mycustomcss : This is the style for div that encloses the entire store
  • amazon-store-mycustomcss-title : This is the style for the title
  • amazon-store-mycustomcss-manufacturer : This is the style for the manufacturer
  • amazon-store-mycustomcss-price : This is the style for the price
  • amazon-store-mycustomcss-view-details : This is the style for the view details link
  • amazon-store-mycustomcss-footer : This is the style for the footer displayed at the bottom of the store

The display of a store as a widget makes use of this feature, and the customcss parameter is set to sidebar.  So you will need to specify the CSS for amazon-store-sidebar, amazon-store-sidebar-title, amazon-store-sidebar-manufacturer, amazon-store-sidebar-price, amazon-store-sidebar-view-details, and amazon-store-sidebar-footer to customize the look and feel of the widget. The default css customizations for the widget are very similar to those for a regular store, but they have been tweaked a bit so that they will probably look a bit better for sidebar displays.

You can also set customcss=”none”.  This will prevent the customized CSS from being displayed inline on the web page.  If you’re displaying multiple stores on the same page, I would recommend you set customcss=”none” on all but one of the stores, to prevent repetitive CSS declarations.

If you set customcss=”none” you can specify the css for amazon-store, amazon-store-title, amazon-store-manufacturer, amazon-store-price, amazon-store-view-details, amazon-store-footer yourself.  You can also not specify them at all, in which case the store will take on the style of your blog.

Much of the plugin code for this plugin is based on the code I used for my Free eBay Store. The server-side code was a bit different since Amazon has their own API for retrieving product information. However, I did manage to find a great PHP library for Amazon called Tarzan.

Tarzan definitely helped to reduce the amount of time it took to develop the plugin. My favorite feature of Tarzan is the ability to make parallel requests to Amazon. If you are interested in developing your own Amazon applications in PHP, I highly recommend taking a look at the Tarzan library.

Good luck with your own Amazon Niche Store and happy affiliating! If you have any suggestions for the plugin or encounter any bugs, please feel free to comment on this post.

About GeekLad

Geeklad is a technology enthusiast and programming hobbyist. Occasionally he will put together useful little bits of code (be it JavaScript or PHP) and share them with the world. He also enjoys creating and sharing howtos, describing how to do the things people want to do with their computers.
Tagged , . Bookmark the permalink.
  • I have been thinking that an Amazon store could be a good idea for monetizing my social network for brides. thanks for the info

  • It definitely wouldn't hurt to try it out and see how you do. I think a
    niche like wedding planning is well-suited for monetizing with my niche
    store plugin.

  • Pingback: Plugin To:Maintain Your Amazon Product Sales..! |

  • Pingback: WordPress Plugin Releases on 06/24 | Weblog Tools Collection()

  • failman

    Can't say i'm down with you throwing up all that junk at the end of the widget

    “Powered By the Amazon Niche Store and Tarzan
    Amazon and the Amazon logo are trademarks of, Inc. or its affiliates” and the big huge banner too…

    it really makes the plugin useless as it's way too spammy on the “credits”

    You should make it an option to display all that information at the end of the plugin and not force it on everyone.

    This plugin could of been good, but due to this small fact, it's a huge fail.

    To anyone who wants to download this beware, you will have to live with a HUGE amazon banner + “Powered By the Amazon Niche Store and Tarzan
    Amazon and the Amazon logo are trademarks of, Inc. or its affiliates” all over your blog.

  • This might be a great way to make money. Seeing as Amazon already provides the means to sell stuff, all you need to do is just take care of the merchindise. Great tutorial.

  • You can disable the Amazon logo by using the parameter logo=”none”. The
    “Amazon and Amazon logo are trademarks of, Inc. or its
    affiliates” line must stay in order to remain in compliance with Amazon's
    affiliate program terms of service. I used the Tarzan Amazon API library in
    order to develop the plugin and they deserve credit for the good work they
    do. The Amazon Niche Store line is there for SEO purposes for my plugin.

    I'm sorry to hear you are displeased with these conditions, but I have
    stated them very clearly. If you don't like them then don't use it.

  • LOL you said in open that you have the links for SEO.

    I hope your site does not get sandboxed , as talking like that will grab attention.

  • I've already openly discussed using backlinks in widgets as an SEO strategy:

    It's not a big secret and I doubt if I'll get sandboxed. There are plenty of other sites out there that do it, many of them with simple HTML. To name a few:

  • Oh, and how could I have forgotten add Disqus to that list as well. LOL

  • By the way what's this code for in the plugin;

    $storeurl = “$trackingid&rows=$rows&columns=$columns$pagination$customcss$logo&keyword=$keywords”;

  • The store is generated on my server. All the parameters for the store display are passed from the plugin to my server. My server queries the Amazon Product Advertising API to retrieve the information according to the parameters passed to it, passes the store contents back to the plugin, and the store is displayed.

    You can actually see what the outputted HTML looks like if you visit a URL that will generate a store. For example:

  • I hope I say it nicer, but I'm unable to use this plugin for the same reasons. There's way to much going on in this plugin that encourages whatever readers I get to surf away from my site without me getting anything out of the deal.

    A small time blogger needs to focus on pushing her own site, and your links are just garishly blatant – it honestly makes my site look like a feeder for yours and not a separate entity. A big time blogger is probably not going to use your plugin at all.

    It's not at all fair that you're getting PAID (at least 10% of the amazon referrals will be with your aff id, so IF your plugin makes sales for us it will be making sales for you too), -and- you're able to steal my visitors (and get Pagerank). That's not usually how these things work. Frankly, that's why phpBay makes so much money.

    Also, from Amazon's operator agreement: 8. Identifying Yourself as an Associate (snip) We will make available to you a small graphic image that identifies your site as a Program participant. You must display this logo or the phrase “In association with Amazon” somewhere on your site. (snip)

    Amazon only requires that disclosure ONCE, not on every page and post. Which means I can include it on my Privacy Policy page, along with my Adsense Disclaimer.

    Then there's Tarzan. First, is Tarzan even still the name? I thought it was cloud something or other now. Second, it's open-source. I have not read the terms, but I do not think link love is REQUIRED. Give it credit in the admin section then.

    Isn't the point of this plugin for ME to make Amazon sales, and for you to get a cut? Not for every reader of my site to get distracted by your plugin credits and then LEAVE my site and get a copy for themselves? Or go to Amazon directly? Or go to the Tarzan site? I can't make referrals if my readers leave, which means that out of you, me, Amazon and Tarzan, I'm the biggest loser. I lose a visitor, I lose a sale, I give my competition a new tactic, and maybe all three.

    This plugin can either make both of “us” money, or it can give YOU pagerank and 10% of whatever's left over.

    I'm willing to consider trading 10% of my potential sales for the sake of convenience, but part of my potential sales and potentially a major part of my miniscule traffic?

    That's not convenient at all.

    And I'm not accusing YOU of this at all, but there have been problems in the past with other plugin writers who hosted code on their own servers that “skimmed off the top” a bit more than they said they would.
    Have you considered an either/or setting? Either you get dofollow linklove OR you get a cut?

    I hope you can understand my concerns, and know that I don't mean at all to be offensive. But these are things that we all have to consider; both you as the plugin provider and the rest of us as potential customers or even “partners.”

  • Thank you taking the time to share your concerns and suggestions, I do
    appreciate them. First let me address the issues you mentioned regarding
    the Tarzan and Amazon terms and conditions.

    I do not believe that Tarzan requires any link love or even mention of its
    use, but I felt compelled to do so. Without the Tarzan library, it would
    have taken a bit more work for me to develop my own library for
    communicating with the Amazon API. The code probably would not have been as
    efficient without it either. Now that you mention it, there is currently no
    mention in this post that I used Tarzan to develop the plugin. I will be
    sure to update it accordingly.

    Of course one could make the argument it is much easier to share link love
    when it someone else's link love you are sharing, and I wouldn't dare
    dispute that. However, I decided that if I was going to share your link
    love with my site, it would only be fair to share some with Tarzan as well
    since it also played a part in the development of my plugin.

    According to the Amazon terms, you are correct, the logo or phrase only
    needs to be placed on one page within the website. However, given that I
    will be splitting 10% of the impressions with other blogs, I need assurance
    that it will indeed be displayed each time my ID appears.

    As to the issue of displaying backlinks as well as taking 10% of the
    impressions, I've decided it is worth doing so at this point in time. I do
    realize there are many such as your and fallman that will be unwilling to
    accept these terms. However, I believe it is worth the risk of losing some
    plugin users when there are others willing to accept my conditions.

    The either/or option is a good suggestion, but it is not something I'm
    considering at this point in time. However, you do have me considering the
    development of a competitor to phpbay and BANS and undercutting them by
    offering a less expensive alternative. Essentially it would function in the
    same manner, but without the backlinks and 10% impressions. You may have
    just given me my next project. 🙂

  • Pingback: Build Your Own Amazon Niche Store | WordPress News - New WordPress Themes()

  • how can i have the plugin show the german store ?

  • Currently only the US is supported, but I will likely add other locales in
    the near future.

  • Pingback: Plug-In of the Day (#0008) | WordPress of the Day()

  • Hope this works for you people!

  • privendo

    How can I put the post category in the keyword as a parameter.
    This way I can use it in the single_post.php

  • You can use the amazon_store_display() function to display a store. It accepts an associative array with the following parameters: trackingid, keywords, rows, columns, pagination, customcss, and logo. Example:

    “trackingid” => “yourid”,
    “keywords” => “whatever you want to sell”,
    “rows” => 3,
    “columns” => 4,
    “pagination” => “yes”,
    “customcss” => “mycustomcss”,
    “logo” => “none”

    I believe you should be able to use the get_the_category() function to obtain the category.

  • privendo

    as I'm new to this:

    a. how should I use this function call within the php?
    b. should I use the keywords like this: “keywords” => get_the_category() ?


  • privendo


    before the call:

    $category = get_the_category();

    and then in the keyword line

    “keywords” => $category[]->cat_name

  • This should work, but you will need to select an index when you assign the keywords. Like this:

    "keywords" => $category[0]->cat_name

  • hovesh07

    Can't seem to get it to work with WP 2.8.2

  • I'll have to upgrade to 2.8.2 soon and do some debugging.

  • Hey there!

    Say is it possible to include items from other Amazon sites like ?

  • It is working on 2.8.2 for me. It may be your host does not allow loading remote files, which is necessary for the plugin to work properly.

  • Tim

    Hi there,

    I get the following error, any idea what I need to do?

    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/bluedigi/public_html/ on line 60

    Warning: file_get_contents( [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/bluedigi/public_html/ on line 60

  • It may be that your host does not allow loading remote content. I tried
    visiting the store page generated directly (…)
    and it appears be generating without any issue.

  • tim1231

    Thanks for the reply. I'm no programmer, but the bit of code suggests a setting can be disables/enabled, any ideas what this would be? I use Cpanel, so a fairly common set up.

  • Unfortunately it isn't something you can enable within cPanel (as far as I know). You may want to contact your hosting provider and show them the error, and ask if they can install/enable the appropriate PHP modules for retrieving remote content.

  • tim1231


    I got in contact with my host, and they had disabled some php settings for security reasons. It's working a treat, many thanks for your help.

  • Chris

    Thanks for the plugin! How do you make the links load into a new page?

  • Just follow the instructions here. You'll need a WordPress blog to use the

  • thank you for download file..
    stop dreaming start action

  • Name

    is this plugin ok to use with the new rules of amazon in august on the the access keys you have to have
    thank you

  • Yes, I perform the authentication and everything with my own application ID.
    This makes it easier for my users to install and use the plugin, as they do
    not need to apply for an Application ID and provide authentication
    credentials. All they need to do is supply the tracking ID, which I pass
    through to the store output 90% of the time.

  • Name

    cool thanks for the fast response so i just have to sign up to amazon associaties and get my id no access keys and use your plugin
    thank you

  • That's right. All you need to do is sign up for an <a href=””>Am… Associate account to get a tracking ID.

  • Name

    thanks alot will do

  • Pingback: Top 1000 WordPress Plugin Authors « Metode de promovare()

  • Barry

    Is it possible to run this together with the ebay store on one page?

  • It shouldn't be a problem at all. Try it out and let me know if you run
    into any issues.

  • Jeremy

    Hi there. Congrats on the great plugin, it's useful and simple… and free!
    I have a question: is it possible to search for multiple keywords? Like for example to put the top 5 products of your choice. Putting up a separate search for each brings up the footer every time, and showing the same footer 5 times in a row isn't exactly nice.

  • No, unfortunately it is limited to a single search at a time.

  • Jeremy

    Thanks for the quick reply. I managed to put god old fashioned images with links – little extra work but managed.
    Thanks anyways, still a great plugin for a free one!


  • barry


    i have set the amazon store up on a 3 or 4 diff. blogs without issue. But today, using same blog theme, same copy of plug in, smae servers, it refuses to wok. Nothing shows either as a widget or in post. What could be wrong?

  • I'm not sure. There may be an issue between your host provider and my host.
    Is the plugin generating any kind of error? Can you provide me with a URL
    for one of the blogs?

  • barry