Forum Replies Created
Source code is freely available on the Developers Tab:
Cool, glad you managed to migrate okay, makes my fingers itch doing global search and replace in mysql!
Probably too late now, but there is an ‘extras’ plugin that is available that will convert your shortcodes into static content if that is any use?
Thanks Jihad, Looks a lot more compact than Amazon’s offering, if I do migrate I’ll probably make use of this.
I note Amazon have pushed back the deadline for migration to January next year.
Trouble is I no longer maintain any websites, so I don’t actively use the plugin. Although I did not mind doing small tweeks for reported problems, a wholesale migration to another API is another matter altogether.
After looking into this a bit more, Amazon have indeed created a V5 of the API, and not actually advertised this to people using v4, which I find astounding.
So it looks like the plugin will not work after 31st October. Unfortunately I do not have the time to port the plugin to the abomination that is the v5 API.
If someone wants to take on this task then let me know.
The latest version of the plugin (3.2.10) does not specify a version for the AWS requests so it will use the default. The previous version (3.2.9) did specify the version, however it is in the form of a date “2011-08-01”.
The plugin works okay on my sites so compatibility is not an issue.
In reply to: [Amazon Link] “Amazon Link Extra – Images” plugin is breaking WP on install
Sorry about that, not sure how that version got published with that bug.
Have fixed it in the development branch. Which can be downloaded from here:
Or you can apply the change manually, it’s detailed here:
In reply to: [Amazon Link] Amazon Links Stopped Displaying on Page
Template looks fine, works on my test site: (https://lazyfox.org.uk/wp/2019/08/02/31/)
If amazon is throttling your requests then the first div will be expanded as:
Which will cause the whole block to be hidden, removing this div will show that all the values are ‘null’ or defaults as Amazon has not returned any data.
This is a common problem (Amazon blocking requests) with a lot of associates at the moment, I think Amazon is trying to get rid of us low sales affiliates.
If the cache is enabled there is not a lot more you can do.
The first one did not work as the content of “AmazonAsin” should have just been the arguments e.g.:
Which is what the second version used, not sure why it did not render correctly, but have to admit I have not tested that particular part of the plugin in a while.
If you put that shortcode into the body of a post, does it work?
Ideally on the same page, try and render your dynamically created one. If you have the Amazon Link cache enabled that would rule out any AWS access problems.
I have to admit I do not have any knowledge of how KeyCDN works, if you’re lucky it will cache a version of the site as if viewed from the CDN’s locale. But I doubt it.
I don’t know if there are any plugins that work in this way.
I did include support for that database about 4 years ago, but decided not to progress it, can’t remember why…
Can look into it if you want?
Not a lot of work has gone into that part of the plugin, if you want to come up with a cool scheme let me know and I can add it to the plugin.
Your understanding of how the plugin works is pretty spot on, so:
1) This is correct
2) They should be sent to Germany, but as you probably guessed they get went to the US site.
3) Chile is not in the current mapping, so again they get sent to the US site.
There are 257 locales in the ip2nation database, so probably best to focus on the countries your site attracts and do specific mappings for them, and I can add them to the plugin.
The code that currently maps the countries uses the following map:
$country_map = array( 'uk' => 'uk', 'ie' => 'uk', 'im' => 'uk', 'gi' => 'uk', 'gl' => 'uk', 'nl' => 'uk', 'vg' => 'uk', 'cy' => 'uk', 'gb' => 'uk', 'dk' => 'uk', 'gb' => 'uk', 'fr' => 'fr', 'be' => 'fr', 'bj' => 'fr', 'bf' => 'fr', 'bi' => 'fr', 'cm' => 'fr', 'cf' => 'fr', 'td' => 'fr', 'km' => 'fr', 'cg' => 'fr', 'dj' => 'fr', 'ga' => 'fr', 'gp' => 'fr', 'gf' => 'fr', 'gr' => 'fr', 'pf' => 'fr', 'tf' => 'fr', 'ht' => 'fr', 'ci' => 'fr', 'lu' => 'fr', 'mg' => 'fr', 'ml' => 'fr', 'mq' => 'fr', 'yt' => 'fr', 'mc' => 'fr', 'nc' => 'fr', 'ne' => 'fr', 're' => 'fr', 'sn' => 'fr', 'sc' => 'fr', 'tg' => 'fr', 'vu' => 'fr', 'wf' => 'fr', 'de' => 'de', 'at' => 'de', 'ch' => 'de', 'no' => 'de', 'dn' => 'de', 'li' => 'de', 'sk' => 'de', 'es' => 'es', 'it' => 'it', 'va' => 'it', 'cn' => 'cn', 'ca' => 'ca', 'pm' => 'ca', 'jp' => 'jp', 'in' => 'in', 'br' => 'br', 'au' => 'au', 'mx' => 'mx');
If the visitor’s country code is not in the map then they get sent to the US site.
If you have not enabled the locale that they have been mapped to (e.g. ‘jp’ is not enabled), then they get sent to the default locale.
Easiest thing to do for me would be to add a two stage filter:
The existing mapping but with a bit more thought, e.g. add Portugal => Spain
Then if certain locales have been disabled by the admin, map them to ones that are enabled.
Yes this is possible, just need to create a new Template e.g.
Template Name: US Link
Template Description: Example Link & Flag Template
Template Type: Product
Buy now on %LINK_OPEN%us# Amazon U.S. <img style="height:10px" src="%FLAG%us#">%LINK_CLOSE%
Then in the shortcode:
[amazon asin=0123456789&template=US Link]
- This reply was modified 3 years, 5 months ago by paulstuttard.
In reply to: [Amazon Link] AWS Request Failed – You are submitting requests too quickly.
Has anyone tried the ‘Amazon Link Extra – Cache Manager’ plugin? This refreshes stale data using a different mechanism (cron) so should be kinder on the request rate.
It also provides a page to see which links have valid entries in the cache, so over time the number of valid entries _should_ grow.
I’ve updated the development version of the plugin to only add the parameter if the keys have been entered. It will go live in the next version.
You can download the development version here: https://downloads.wordpress.org/plugin/amazon-link.zip