I have setup the Comparison Theme and added a few products with buy url’s but when I click on the Visit Store I receive “can’t open the page localhost because Safari cannot connect to the server (I tried IE, FF, GC without luck as well).
On the product page the buy_url and affiliate link fields are populated.
Looking at the link properties it cloaks the like like – https://mydomainname/out/127/buy_url/
Permalinks is set to use %postname%.
How is your website set up? If it mentions ‘localhost’ it would suggest that your site is not running on a live server, but locally on your computer. Is that the case?
This runs on a live server (hostgator shared hosting). All other links work except for cloaked outbound (visit store) links.
Have you set up your site locally, and then moved it onto your live server?
No, this was a fresh install on the live hostgator server. I looked at the theme properties and database but I could not determine where it inserts the buy_url links. Is this part of WP posts?
Anyone know how to turn off cloaking of outbound “Visit Store” links as I believe this may be my issue.
its cloaked on the Visit Store shortcode. You can edit that.
Where do I edit this at? I looked a the theme options but I don’t see a list of custom shortcodes.
The shortcode is at Page setup > conent setup > search result
and the shortcode is made on theme/framework/class/default_comparison.php
If you want to modify the shortcode, you need to edit there.
Although, edititng on core files are not recomended. So, you can modify and add your own shortcode in your functions.php
And thats the only way to chnage that outbound link click.
Same problem here. For now i use the non cloaked link with the shortcode [buy_link]. But a fix would be nice.
cloaked links wouldnt be the issue, make sure the outbound link is the same as the custom field you have your affiliate link assigned too.
buy_link or buy_url ?
What is the shortcode for the cloaked url?
there are no shortcodes for this.
I ran across the same problem where the “Visit Store” button gives me a 404. I think it is something to do with permalinks.
My permalink structure is /index.php/%category/%postname%/
When the theme adds the visit store button it will have the url as /out/XXX/buy_link/ apparently for it to work it needs it to be /index.php/out/XXX/buy_link/
I’m not sure what is causing the re-write to not have index.php but when you append it manually it does resolve the link correctly. (Not sure how to fix that in the code personally)
Actually after poking around and doing some research, here is the fix:
FTP/SSH into your server and under /wp-content/themes/CM/framework/class open ‘defaults_comparison.php’
In there you’ll find a comment section // AFFILIATE LINK which will read:
$link = home_url().”/out/”.$p[‘ID’].”/buy_link/”;
You’ll want to have this changed to:
$link = home_url().”/index.php/out/”.$p[‘ID’].”/buy_link/”;
Re-upload that to the server and your links will be working again (including those imported via the Amazon plugin).
Copyright © 2010-2020 PremiumPress Limited.