The plugin Settings page is where the author can modify the behaviour of all the links embedded in their site.
Note any changes here will affect all existing links that do not explicitly set these options via the shortcode content. These options can be viewed as the ‘default’ behaviour any of which can be overridden locally by adding the appropriate parameter to the shortcode.
The Settings are split into 5 sections dealing with different aspects of the plugin:
- Display Options
- Localisation Options
- Amazon Associate Information
- Amazon Data Cache
- Advanced Options
These options affect the default appearance and behaviour of standard text links and the type of Amazon Wishlist that is displayed.
Allows the author to change the default class used when the plugin inserts a thumbnail or image into a post. This option is equivalent to the ‘image_class’ shortcode argument, and the %IMAGE_CLASS% keyword in the template.
This is the default template used by the plugin when it auto generates a list of products using the wishlist facility. This option can be overridden in the shortcode by specifying a valid template using the ‘template’ argument.
This is the maximum number of items to display in a wishlist. This option can be overridden in the shortcode by specifying the ‘wishlist_items’ argument.
Note: Amazon only returns a maximum of 5, for the ‘Similar’ type of list.
This sets the default type of wishlist to generate. A wishlist of type ‘Similar’ will show items similar to the ones found in the content. A wishlist of type ‘Random’ will show a random selection of the ones found. A wishlist of type ‘Multi’ simply lists the items in the order they were found. This option can be overridden in the shortcode by specifying the ‘wishlist_type’ argument.
New Window Link
If this option is enabled then when generating links, the plugin will ensure that if they are clicked on it will open it in a new browser window. This option is equivalent to the ‘new_window=1’ shortcode argument.
Link Title Text
This is the text that will appear in the link ‘title’ attribute for the Amazon links, it may contain any of the usual template keywords e.g. %TITLE% or %TEXT%. Leave blank to not have a title attribute.
Use Media Library
This option adds the ability to upload images for products from the Amazon site to your local WordPress media library. Once uploaded the plugin will always use these local images for all shortcodes for that product.
Add Amazon Link – Form Options
These options affect the default values that are shown in the ‘Add Amazon Link’ helper box that is used to insert Amazon Link shortcodes into Posts.
If you do not specify the ‘text’ argument in your [amazon] shortcode, then this text will be used by default. This option is equivalent to the ‘text’ shortcode argument, and the %TEXT% keyword in the template.
Use this setting to pre-select the template to use when inserting new Amazon Links into posts.
Use this setting to pre-select the channel to use when inserting new Amazon Links into posts. If nothing is selected then the ‘Default’ channel is always used.
Default Search Index
Use this setting to pre-select which search index should be used when searching for Amazon products.
The localisation options control how the plugin deals with visitors from countries other than your default locale. The majority of these options require the ip2nation database to be installed.
At the top of this section is the current status of the ip2nation database and buttons to allow you to Remove, Update or Install the database.
If localisation is not enabled, or has failed for some reason, then this is the default Amazon site to use for the link.
Localise Amazon Link
If this option is selected and the ip2nation database has been installed then the plugin will attempt to use the most appropriate Amazon site when creating the link, currently supports www.amazon.co.uk, www.amazon.com, www.amazon.com.br, www.amazon.ca, www.amazon.cn, www.amazon.de, www.amazon.es, www.amazon.fr, www.amazon.in , www.amazon.it and www.amazon.co.jp.
When creating Amazon Links the plugin will use data provided in the shortcode in preference to data retrieved from Amazon (e.g. Setting the ‘
Title=My Favourite Book‘ in the shortcode will override the Title retrieved from Amazon). If you have localisation enabled, by default the data in the shortcode will only override your default locale. Enable this option if you want shortcode data to override the Amazon data in all locales.
Create Search Links
If localisation or the Multinational popup are enabled then the plugin will create links to Amazon sites other than your default locale. Sometimes these links either do not work – for example that exact product ASIN is not available in that country. Or is not suitable – for example it is an incorrect region DVD or a book in the wrong language.
Selecting this option will force the plugin to generate links to non-local Amazon sites that search for your product rather than an exact ASIN link. The exact terms of the search are determined by the next option.
This option can be overridden in the shortcode by specifying the ‘search_link=1’ or ‘search_link=0’ argument.
Default Search String
If the ‘Create Search Links’ option is enabled then this string determines what keywords are used to create the search link. Any of the keywords used in the Templates can be used to generate the term, for example the keyword ‘%ARTIST%’ will be expanded by the plugin to the Author/Artist/Director of the linked item.
This option can be overridden in the shortcode by specifying the ‘search_text=Specific Search String’ argument.
If this option is selected then the plugin will enable a small popup menu of country specific links whenever the user’s mouse rolls over the Amazon link, enabling them to select the site they feel is most appropriate.
Amazon Associate Information
To get the most out of the Amazon Link plugin it is highly recommended that you have access to the Amazon Product Advertising API and populate the ‘Amazon Web Services’ (AWS) key settings.
This will enable a number of features of the plugin that require access to Amazon Web Services (AWS). These include the generation of live data when displaying the links, providing a product search facility on the post/page edit admin screens, and the ability to generate product wishlists & recommendation.
If you wish to use any of these features then you must have the appropriate AWS Access IDs and enter them in these two settings. To get these keys simply register with the Amazon Web Service – Advertising API site and this will provide you with the appropriate strings. Note you must also enable the Product Advertising API in your AWS account for this to work correctly.
See the ‘Getting Started‘ section for a guide to joining the various Amazon Affiliate programmes & the Amazon Advertising API.
AWS Public Key
Enter the ‘Access Key ID’ found in your AWS Account under ‘Security Credentials > Access Credentials’
AWS Private Key
Enter the ‘Secret Access Key’ found in your AWS Account under ‘Security Credentials > Access Credentials’
Once you have entered your AWS Access keys and updated the options the AWS Keys Validated checkbox should be ticked. If it is not the Error Message displayed should provide a clue to why the keys are not working.
If this option is enabled then the plugin will attempt to retrieve up to date (and localised) information on the product when generating the product link. For this to work the AWS Access keys in the global settings must be configured with valid keys. If not enabled then the plugin will only use the information included in the shortcode. This option can be overridden in the shortcode by specifying the ‘live=1’ or ‘live=0’ argument.
Note this option also changes the behaviour of the Amazon Search Tool. When the tool is used to insert shortcodes into the post it will automatically prefill the keywords needed for the selected template. It will only do this if live data is not enabled.
Change the condition of the items returned when making Amazon Web Service requests, this affects the items returned on the search box as well as the pricing and offers returned when getting details about a specific item. The Amazon website notes on the ‘Condition’ parameter:
Use the Condition parameter to filter the offers returned in the product list by condition type. By default, Condition equals “New”. If you do not get results, consider changing the value to “All…
ItemSearch returns up to ten search results at a time. When condition equals “All,” ItemSearch returns up to three offers per condition (if they exist), for example, three new, three used, three refurbished, and three collectible items. Or, for example, if there are no collectible or refurbished offers, ItemSearch returns three new and three used offers.
Normally the plugin will not fetch data from the Product cache or via AWS unless it needs to populate a keyword. This means that for simple text links the plugin is much faster. However if all your shortcodes are complex and require data retrieved from the AWS then enable this option to improve template parsing.
User Affiliate IDs
This options enables all users of the WordPress site to have their own set of Affiliate IDs. This allows each post author to collect Amazon commission on posts for which they are the Author. The IDs (one for each locale) are accessible on the User’s profile page.
Amazon Product Cache
If you use the plugin to its full extent and display a lot of content retrieved from the Amazon Web Service it is recommended that you enable the Amazon Product Cache.
This will improve page load times for pages that retrieve live data from the Amazon Web Service by keeping a local copy of the data.
At the bottom of this section are buttons to Enable, Disable (and remove) and Flush the content of the Amazon Data Cache.
Cache Data Age
Amazon recommend that data is not stored in caches for too long, especially price and availability information. Adjust this setting depending on the volatility of the data you display (e.g. Titles, List Prices and Artist information rarely change, however Offer prices may change more frequently).
If you have a site with high levels of traffic, then it may be worth while enabling the ‘Shortcode cache’. This stores the expanded template in the site database rather than evaluating it for every visitor. You are trading off extra Database access and storage against Server CPU load. This option is currently experimental and has not been properly evaluated to see if it does actually reduce server load.
If you are already using some other form of WordPress content cache then this will add no additional benefit.
SC Cache Data Age
The number of hours data is kept in the shortcode cache without being refreshed. Keep this low to ensure that the latest product details are always displayed.
This setting only affects the Template Previews in the Template Manager section of the Amazon Link Settings page. Change this list of ASINs to change which ASIN(s) are used to generate the Template Previews.
If you are having problems with the plugin and need to contact me, it may be helpful if you could enable this option briefly. It causes the plugin to put extra hidden output in your sites pages that are displaying Amazon Links. I can use this information to diagnose any problems.
It is not recommended that this option is enabled for any length of time as it will show your AWS access keys in the page HTML source.
Purge on Uninstall
If you want to permanently uninstall the plugin then select this option before uninstalling on the ‘Installed Plugins’ page. This will ensure that all Amazon Link Settings, Templates, Associate Tracking IDs, Cache Data and the ip2nation data are removed from the WordPress database.
The main arguments available when creating a shortcode are listed below, enter each argument separated by a ‘&’. It is also possible to override settings on the global options page, or elements used in the product templates:
The text used to generate the amazon link, Enter any plain string e.g. ‘text=My Text’.
The css class used when displaying the image in the post.
The unique Amazon product ID or IDs, of the form ‘1405235675,1234567890’. Enter as ‘asin=1405235675,1234567890’. It is also possible to specify different ASINs per local using the form ‘asin[us]=1405235675,1234567890&asin[uk]=1840347839,0123456789’.
Which template to populate and display with product data, must be one of the templates listed on the Amazon Link > Templates Settings page.
It is possible to manually select which set of tracking IDs the link uses by specifying the ‘chan=channel_id’ option. This will override the user specific affiliate ids.
When creating a wishlist you must specify the post category(s) through which to search for other Amazon links. Enter as ‘cat=4,7’. Alternatively enter ‘cat=local’ to search the content on the current page.
When creating a wishlist you can specify how many posts to search through for Amazon links. Enter as ‘last=30’.
Overides the ‘Localise Amazon Link’ setting. 0 to force the default country, 1 to force localisation.
Overides the ‘Multinational Link’ setting. 0 to disable the popup, 1 to enable the popup.
Overrides the ‘Create Search Links’ setting. 0 to force direct links by ASIN, 1 to force search based links.
Overrides the ‘Default Search String’ setting. A more specific search string can be used to generate the links.
Overrides the ‘Default Country’ setting. Must be one of ‘uk’, ‘us’, ‘ca’, ‘cn’, ‘de’, ‘es’, ‘fr’, ‘in’, ‘it’ or ‘jp’.
Overides the ‘AWS Public Key’ setting.
Overides the ‘AWS Private Key’ setting.
Set the number of items in this particular wishlist. Overides the ‘Wishlist Length’ setting.
Set the type of this particular wishlist. Overides the ‘Wishlist Type’ setting.