If you’re not already familiar with phpbay, I’ll give you a moment to slap yourself.
Go on. Right in the face.
Phpbay is an incredibly useful WordPress plugin (API is also available) that allows you to display relevant ebay listings on your websites to earn a commission. In order to use it, you’ll need to be signed up with the Ebay Partner Network. Some people have reported difficulty getting approved by EPN, but there are alternatives available. You can also join the Ebay affiliate program through the Pepperjam Network.
There’s a reason you’ve heard about Phpbay so much around various internet marketing portals: it’s awesome. But instead of just praising it like a lunatic in hopes that you will purchase it through one of my sneakily masked affiliate links, I will instead give you some other useful info that I myself use that will make your phpbay stores even more awesomer.
Ebay Search Results
Depending on the nature of your site, a lot of times users will land on your site and not realize that you’re simply serving them eBay results. As far as I’m concerned, this is a good thing. However, they may try to search for items that you don’t have listings for on your site. If you just have a regular old wordpress sidebar search bar, it’s not going to find what they are looking for unless you’ve included matching content on your site. Wouldn’t it be nice to display ebay results on your site that match their query?
All you have to do is go into search.php and replace some code. Starting with the line:
<?php if(have_posts()) : ?>
Delete everything up to:
<?php endif; ?>
(including that string) Replace with the following code:
<p align="center">Your search for '<strong><font color="#FF0000"><? echo $_GET["s"] ?></font></strong>' returned the following results:</p>
<p>
<?php
function phpBaySearch($term) {
$keyword = $term;
$category = "";
$text .= '[phpbay]' . $keyword . ',20,' . $category . ', ""[/phpbay]';
echo phpBayPro($text);
}
phpBaySearch($_GET["s"]);
?>
</p>
Ta-da. That piece of code is brought to you by Wade himself, creator of PhpBay Pro.
In some cases, your particular theme may not have a search.php, but rather a searchform.php. I have not yet devised a way to make this work with this sort of rogue theme, but as soon as I figure it out, you’ll be the first to know.
Make the Entire Listing Clickable
By default, only the text of your phpbay listings are clickable. Poo on that. Why not make the whole thing clickable? Depending on whether or not you are displaying results in rows or columns, you will need to make the following adjustment to the respective file.
If you’re using row results, you’ll want to edit the file called template.ebay.results, which is located in the “templates” folder inside the phpbay plugin folder. The original file looks like this:
<table width="100%" border="0" cellpadding="5" cellspacing="5" bgcolor="%%row%%" onmouseover="style.backgroundColor='%%hover%%';" onmouseout="style.backgroundColor='%%row%%'" style="font-size:12px;">
<tr>
<td width="100" align="left"><img src="%%image%%" alt="%%alt_title%%" border="0" /></td>
<td style="word-wrap: break-word;"><a href="%%link_url%%" target="_blank" rel="nofollow"><strong>%%title%%</strong></a></td>
<td width="20" align="right">%%paypal%%</td>
<td width="60" align="right">%%bid_or_bin%%</td>
<td width="100" align="right">%%currency%%%%price_or_bin%%</td>
<td width="80" align="right">%%date%%</td>
</tr>
</table>
The new, edited file should look like this:
<table width="100%" border="0" cellpadding="5" cellspacing="5" bgcolor="%%row%%" onmouseover="this.style.cursor='pointer'; this.style.cursor='hand'; style.backgroundColor='%%hover%%';"onmouseout="style.backgroundColor='%%row%%'" style="font-size:12px;" onClick="window.open('%%link_url%%');">
<tr>
<td width="100" align="left"><img src="%%image%%" alt="%%alt_title%%" border="0" /></td>
<td style="word-wrap: break-word;">
<noscript><a href="%%link_url%%" target="_blank" rel="nofollow"></noscript>
<strong>%%title%%</strong>
<noscript></a></noscript>
</td>
<td width="20" align="right">%%paypal%%</td>
<td width="60" align="right">%%bid_or_bin%%</td>
<td width="100" align="right">%%currency%%%%price_or_bin%%</td>
<td width="80" align="right">%%date%%</td>
</tr>
</table>
Now, for those of you using column results, you’ll want to be editing template.column.results, located in the same place as the other template file. The original file will look like this:
<td width="300" align="center" style="word-wrap: break-word;border: 1px solid #eeeeee;font-size:12px;" bgcolor="#ffffff" onmouseover="style.backgroundColor='%%hover%%';" onmouseout="style.backgroundColor='#ffffff'">
<img src="%%image%%" alt="%%alt_title%%" border="0" /><br />
<a href="%%link_url%%" target="_blank" rel="nofollow"><strong>%%title%%</strong></a><br />
%%paypal%% %%currency%%%%price_or_bin%%
</td>
Go ahead and replace all that with the following code:
<td width="300" align="center" style="word-wrap: break-word;border: 1px solid #eeeeee;font-size:12px;" bgcolor="#ffffff" onmouseover="this.style.cursor='pointer'; this.style.cursor='hand'; style.backgroundColor='%%hover%%';"onmouseout="style.backgroundColor='#ffffff';" onClick="window.open('%%link_url%%');">
<noscript> <a href="%%link_url%%" target="_blank" rel="nofollow"></noscript>
<img src="%%image%%" alt="%%alt_title%%" border="0" /><br />
<strong>%%title%%</strong><br /><noscript></a></noscript>
%%paypal%% %%currency%%%%price_or_bin%%
</div> </td>
There you have it. Now your auction results are completely clickable. Mo’ clicks = mo’ money. But beware, mo’ money = mo’ problems.
Removing Icons
On some sites, I like to go the extra mile to minimize the ebayness of the results displayed. To do this, I simply remove those pesky icons that are so reminiscent of ebay. I almost always get rid of the “But it Now” icons, and I sometimes get rid of the paypal logo. To do so is really simple. You’ll need to edit the same files talked about above, except all you’ll need to do is delete the line of code that calls that particular icon.
In template.ebay.results, you’ll see a string of text that says:
<td width="20" align="right">%%paypal%%</td>
Deleting that line entirely will remove the paypal logo from your listings and not adversely affect anything else. Similarly, deleting:
<td width="60" align="right">%%bid_or_bin%%</td>
will effectively remove the bid/buy it now logo.
In template.column.results, you’d simply need to delete
%%paypal%%
to remove the paypal logo, and so on and so forth.
In a future post I’ll go into detail about how to construct your Phpbay sites in such a way to minimize your bounce rate and maximize your CTR. But for now, it is time to open another bottle of Martinelli’s award winning apple cider.