March 30, 2015 at 1:55 pm #12423faucetboyMember
I have a business model where we close most of our sales over the phone. I have about a dozen affiliates, each with a unique phone number assigned to them. My affiliates give these phone numbers out to people, and when calls come in we’re able to track which affiliate sent the call.
In WP Affiliate Platform, let’s say I create a new affiliate with ID (ap_id) 1234, and in the info fields for that affiliate I fill in the phone number field with the unique tracking phone number assigned to that affiliate.
When a website visitor visits our site through Affiliate 1234’s link, what php code could I use to retrieve that affiliate’s phone number from the database and display it on our site, so that if the website visitor calls us, the number the visitor will see displayed on our site to call will be the phone number assigned to that particular affiliate?
I’m using WordPress 4.1, and I can’t find the version of the plugin I’m using, but I purchased it 21 Feb 2015.
Thanks for any help anyone can provide!March 31, 2015 at 12:10 am #69340adminKeymaster
We have an API that you can use to retrieve affiliate’s details and do something with it:
We also have the following shortcodes and functions that you can use to show certain details of the referring affiliate:
If you are not a coder, we can potentially do a custom job for you too:April 2, 2015 at 4:35 am #69341faucetboyMember
Perfect, that shortcode was just what I needed, thanks! So for anyone else who might be looking for this functionality later, the shortcode to pull the affiliate’s phone number is:
[wp_affiliate_referrer_details info=”phone”]June 17, 2015 at 2:07 am #69342ZexMember
I try this shortcode and it’s working well but the problem is when visitor come without affiliate link (as example directly type xyz.com) it will show as “none”. How to change that “none” to admin’s phone no instead?June 17, 2015 at 11:52 pm #69343adminKeymaster
When there is no referrer, it will show none. You can customize that text to say something else (example the phone number of admin if you want).
The following post will show you how to customize that text:
- You must be logged in to reply to this topic.