psirek
Forum Replies Created
-
Forum: Plugins
In reply to: [Amazon Link] Http links when running a https siteI only had the problems with my “Add to cart” links, so I just changed the “Add to cart” template, the https:// to https:// and that just worked fine for me. It was a while ago, so now I use this template where I point to locally downloaded images of the buy buttons:
<form method=”GET” action=”https://www.amazon.%TLD%/gp/aws/cart/add.html” style=”display:inline”>
<input type=”hidden” name=”AssociateTag” value=”%TAG%”/>
<input type=”hidden” name=”SubscriptionId” value=”%PUB_KEY%”/>
<input type=”hidden” name=”ASIN.1″ value=”%ASIN%”/>
<input type=”hidden” name=”Quantity.1″ value=”1″/>
<input type=”image” name=”add” value=”Buy from Amazon.%TLD%” border=”0″ alt=”Buy from Amazon.%TLD%” src=”//cdn.odd-one-out.serek.eu/wp-custom/amazon/%MPLACE_ID%/buy-from-tan.gif”>
</form>Notice the last src=”// line which used https if the rest of the site runs https. Not sure what the standard template does here
I am seeing the same problem, all my https links. I manually checked 25 links and they all work just fine. I did just upgrade to PHP7 which might influence things
Forum: Plugins
In reply to: [Amazon Link] Custom locale ("EU")Hi Paul
That worked perfectly! Thanks for the help
/Poul
Forum: Plugins
In reply to: [Amazon Link] Http links when running a https siteI bypassed the problem by editing the templates and forcing https on my troublesome links
Forum: Plugins
In reply to: [Amazon Link] Http links when running a https siteI think you are right, some links can be changed to https, but not all. For example
https://ecx.images-amazon.com/images/I/41LXbuuMjwL.jpg
Prompts the user because the hostname on the certificate does not match the url. But some links works fine.
It would be great to have some way to force a specific link to switch blindly to https, something like
[amazon asin=12345678 forceHttps=true]
Then every existing link is untouched and it is the link creators responsibility to check if the link works. Having a global property is too risky in my opinion. But if you know of certain link types that always works with https then it would be great to have a global property for just those types, e.g. “Force https for add to cart links”.
Maybe it should not be forceHttps at all but “Match URL property” setting, so if one has a site with mixed http / https content the links would match
What are you thoughts on the above?
/Poul
Forum: Plugins
In reply to: [Amazon Link] Experiences with Cache Plugins (WP Total cache ..) ?Hi Paul
Yes, the initial preload is just looping every post URL and for every post URL loop the country locales and request the localized post URL to create the cache entry using ?spoof_locale=XX. A simple solution that works fine for small sites, but for large sites the cache will get very large.
It is possible to define in the geo cache plugin which countries to create localized cached page for. Every other country not defined here will get the same default cache entry. So if one only uses Amazon Link to create localized links to US, UK and DE and everything else defaults to US, then one can get away with only 4 cache entries per post (the 3 localized and one default which is the same as the US)
/Poul
Forum: Plugins
In reply to: [Amazon Link] Experiences with Cache Plugins (WP Total cache ..) ?I am on the same quest, i really like this plugin, but found it difficult to use with caching plugins. As Paul mentions it is possible. I have successfully created a setup that makes the cache locale aware and i made a small preload script. The plugins used are
- WP Super Cache – The actual caching plugins
- Country Caching Extension for WPSC – The extension for WP Super Cache that makes it locale aware
- Category Country Aware Goodies – Plugin that updates the same ip to location database that the Country Caching Extension uses. Keeps the location info up to date
- Amazon Link – To create the localised links
- Amazon Link Extra – Spoof Locale – Needed by the preload script to create the localised cache entries
- WP-CLI – Used to extract blog post urls and status from WordPress
A quick step by step guide can be found on my blog at this post: https://odd-one-out.serek.eu/2015/05/amazon-affiliate-link-wp-super-cache-preload/
It is by far perfect, it will create a cache entry for each country that visits your post or that is defined in the preload script. Until i find a better way this is what i use.
@paulstuttard: Is it possible to add an option for Amazon Link to create these links using javascript so that the actual localised links are created on the fly? It could store all link variants in the html file itself. I am not sure this is a feasible way to go.
/Poul