This post is a continuation of the phpBay Pro Extended Manual. You can use Table of Contents below if you want to start from the beginning or jump to a different section.
Table Of Contents
- Introduction
- Installation/Activation
- Configuration
- Testing
- Per-Post/Per-Page Settings
- Geo-Targeting
- Making The Images Clickable
- Replacing WordPress Search With eBay Search
- Inserting phpBay Code Into Theme Files
- Buy phpBay Pro (20% off coupon: DA9CD69F42)
- From Picking A Market To Building/Managing Your phpBay (Or BANS) Site
There is a free plugin available that will automatically display auctions for the country of your visitor when they arrive on your site. Note: This is different than the WordPress Geo-Targeting Script that can be used for displaying any type of content to visitors from other countries. This one is specific to phpBay.
The plugin was created by Alan (a phpBay Pro user) and is available free (donation-ware) from his blog after opting-in to his newsletter. Let's get the plugin now...
- Visit http://www.psp-tubes.net/wordpress/phpbay-plugin
- Scroll to the very bottom because it is mostly an out-dated post.
- Enter your name and email and click 'Send me the plugin'. You may be brought to a page that says 'Whoops! That Page Isn't Here'. Don't worry, there is just something funky going on with his subscription pages. Perhaps he should switch to Aweber ;) At any rate, you should quickly get an email with the Subject: 'ACTION REQUIRED: Confirm your subscription.'. Click the link in the email to confirm your subscription. You will again probably be brought to a page that says 'Whoops! That Page Isn't Here'. Again, don't worry. You should be receiving another email shortly with the link for the plugin.
- Open the email with the Subject: 'phpBay plugin download details'.
- Click the 2nd link in the email to download the plugin.
Now that we have the plugin, let's get it installed...
- Unzip the file
- Upload 'geo.php', 'combo.php', 'country.php' and 'geoip.inc' to '/wp-content/plugins/phpBay/includes/' on your server. Note: You will be overwriting 2 files, 'geo.php' and 'combo.php', so you may want to backup the ones on the server first. Renaming them on the sever before uploading the new ones will work.
- Download the free database file from maxmind.com. Click here. Under the 'Binary Format' section, click the link 'Download the latest GeoLite Country Binary Format' to save the database to your computer. It will be compressed in .gz format. The free tool WinRAR can decompress the file, much like unzipping a file.
- You will be left with a file called 'GeoIP.dat'. It needs to be uploaded to '/wp-content/plugins/phpBay/includes/' in Binary mode. If using FileZilla to upload, go to Transfer > Transfer type > Binary. You can check maxmind.com for a new version each month. I, myself, just update it every 6 months. When updating, just overwrite the existing file on the server.
That should do it! To be certain it works, switch the default country in the phpBay settings to one other than your own temporarily. Make sure the sorting options or the eBay logo is displayed (discussed earlier) because having one or both of those turned on will also turn on the country dropdown box. Now visit the test page that you created earlier. You should be now viewing auctions in your own country rather than the default country. If you still see the default country it might be because the page is cached. If using Firefox you can usually press Ctrl+F5 to fix that.
Notice something about the auctions? The darn images aren't clickable. We'll get to that next.
Related posts:














Enter your first name and email address below to receive exclusive money making tips.
.jpg)





July 22nd, 2009 at 5:42 am
Ah!
I thought that the phpBay geotargetting features were something you had to pay extra for!
I ended up writing my own WP plugin that does the same, but then shows Amazon items at the bottom too or alternatively shows Amazon listings if there are no eBay items available.
I might splash the cash for phpBay one day, but my plugin works at the moment!
July 22nd, 2009 at 11:32 pm
Nope, they are free.
Sounds like a cool plugin man.. I hear ya, just use what works. If I had php skills I’d be drumming up all kinds of plugins.
July 30th, 2009 at 11:00 am
I tried turning on both the ebay logo and sorting options but I still don’t get the drop down box. Any suggestions?
Thanks
July 30th, 2009 at 12:19 pm
Not sure to be honest, It’s always just worked for me. Reply to my email and I can have a look…
Actually, a cpl things come time mind..you didn’t do any major editing of the files other than the suggested ones did you? Also, do you have the latest version from the phpBay site? Some people are downloading torrents (illegally) and the source code has been altered maliciously and sometimes doesn’t work properly. In the cases where it does work properly, the hacker is getting the commissions.
Anyway, reply to my email and we’ll try to sort it out..
November 2nd, 2009 at 6:42 pm
Hey Keith,
Is there a way we can modify the code of this to only show geo-targeted ebay links for US, CA, UK and AU?
If anyone comes to my sites from countries other than those 4, I want them to see US links.
I set everything up the way you have outlined above but when I check my sites from IPs in countries like France a lot of my ebay links disappear and the “No products were found matching your keywords” message appears.
It’d be great if I could just have it show these people the US links instead of it trying to find products specific to non-english-speaking countries.
Does what I’m asking make sense to you?
Thanks in advance for any input, and I just purchased your wordpress geotargeting script for my sidebar ads, and so far it seems to be working great
November 2nd, 2009 at 6:52 pm
Hi Steve,
First you set your default in the phpBay admin to U.S. which I’m sure is already the case. Then download /wp-content/plugins/phpBay/includes/combo.php and near the top you will see the countries that show up. Delete lines for each country that you want to remove. Make a backup first :)
And…thanks for purchasing the script…
Let me know if you run into issues…
November 2nd, 2009 at 8:04 pm
Thanks for the great tip bro
At first it wasn’t working but then I went into the country.php file as well and deleted the countries in there too and then it worked perfectly.
Good looks
November 2nd, 2009 at 8:48 pm
oops, oh ya.. well, now other ppl have the solution, but in two parts :) thanks Steve