If you’ve been looking to be able to add products from the Commission Junction affiliate network to your WordPress site, this plugin is for you. This plugin is intended as a tool for affiliate marketers to add products to their pages and posts quickly and easily. This is accomplished by means of CJ’s Product Search REST API. This page will be updated to reflect changes made to the plugin over time, as well as serve as a source for the latest documentation.
To use this plugin, you will first have to register for an account at Commission Junction web services. Once you’ve downloaded and activated the plugin, you can enter your CJ API key (from the web services account) and your site ID (from the CJ affiliate account). Enter in your preferred settings, and you’re ready to go. This plugin works in two different ways:
The first method is the post composer search box. This allows you to add an item like so:
The second method utilizes a shortcode to create a list of results, like so:
To use the search box method, once the plugin is installed and configured, you will find a search box in your post/page composition screen, like so:
Once you’ve hit the search button, you will be presented with a list of results, like so:
To unsure the best results, be sure to read up on the the guidelines for search strings (the “keywords” parameter) in the API documentation.
For the shortcode, you can use the “CJ” button that will appear in the TinyMCE editor to add the base shortcode, or enter it as follows:
The keywords parameter is entered in by default, but you can select other parameters as you see fit. These parameters are displayed in the following list. For more information on these parameters, please see the API documentation once again.
List of Search Parameters
The shortcode results are cached for the time period (in seconds) set in the “Result Cache Duration” section of the parameters. After this time has elapsed, the plugin will again query the CJ API to get the latest and greatest product results.
In this same screen, the default currency, region, and advertiser relationship status’s can be set. It is highly recommended that the “Advertiser Relationship” be set to “Joined,” so that the results returned will result in sales commissions.
To format the returned product results, the result template used can be modified to suit the proper display. By modifying the ”Result Row Template” field in the plugin settings, one can display the desired parameters in the search results. This is accomplished by means of a set of template tags which are substituted for the returned values in the search query. The list below shows the available tags for modifying this template. Once again, the API docs at CJ have the details of what each parameter contains.
List of Template Tag Search Result Parameters.
The “Result Row Style” parameter allows the user to style the table generated by the shortcode results. Modify the default CSS as you see fit to get the style of table that matches your own site.
This post will be edited and improved over time, so be sure to be sure to watch this space for changes. Please comment below and let me know how this plugin is working for you, what you might like to see in future revisions, and any other feedback you might have.