2. Table of Contents
Introduction.........................................................................................................................................................4
Installation...........................................................................................................................................................4
1. Unzipping........................................................................................................................................................4
2. Files to Upload.................................................................................................................................................6
3. Installing with Wordpress' "Install Plugin" feature..................................................................................................7
4. Upload Files Using FTP......................................................................................................................................8
5. Upload Files Using File Manager..........................................................................................................................8
6. Activate the phpBay Pro® Plugin.......................................................................................................................10
Upgrading from phpBay Pro 3.x..........................................................................................................................11
1. Download and backup your existing files............................................................................................................11
2. Remove existing files.......................................................................................................................................11
3. Upload new files.............................................................................................................................................11
4. Login to Wordpress Admin................................................................................................................................11
5. Update your .htaccess file................................................................................................................................11
5. Check your site..............................................................................................................................................12
6. Troubleshooting..............................................................................................................................................12
6. Restoring phpBay Pro 3.x.................................................................................................................................12
7. Mass updating your sites.................................................................................................................................13
phpBay Pro Dashboard Settings..........................................................................................................................13
1. phpBay Pro® Settings.....................................................................................................................................13
2. Affiliate Settings Tab.......................................................................................................................................14
3. Product Search Tab.........................................................................................................................................15
4. Legacy Tab.....................................................................................................................................................16
5. Paging Options Tab.........................................................................................................................................17
6. SEO Options Tab.............................................................................................................................................18
7. .htaccess Code...............................................................................................................................................20
phpBay Pro Widget.............................................................................................................................................21
1. Setting up the global phpBay Pro Widget............................................................................................................21
Adding phpBay Pro Search Results to a Post or Page..........................................................................................23
Adding phpBay Pro Widget to a Post or Page......................................................................................................27
phpBay Shortcodes.............................................................................................................................................32
keywords..........................................................................................................................................................32
num.................................................................................................................................................................32
exclude.............................................................................................................................................................33
availableto.........................................................................................................................................................33
bestofferonly......................................................................................................................................................33
campaignid........................................................................................................................................................33
category............................................................................................................................................................33
columns............................................................................................................................................................34
condition...........................................................................................................................................................34
currency............................................................................................................................................................35
customid...........................................................................................................................................................35
datetype...........................................................................................................................................................35
debug...............................................................................................................................................................36
descriptionsearch...............................................................................................................................................36
displaylogo........................................................................................................................................................36
Page 2 of 49
4. Introduction
Thank you for purchasing phpBay. phpBay Pro® 4.x is a major upgrade and departure from it's original release.
phpBay Pro has evolved over the past 4.5 years into the longest surviving plugin for Ebay affiliates. This latest version is
completely rewritten, from the ground up, incorporating features and options that customers have requested.
Kev, Robert, Quinn, Jim, Dan, Sonjay, Jarb, Magoo and all of the forum members that take time out of your day to help
others, thank you! Your help is greatly appreciated and I am blessed to have such a great community on our support
forums. It is you, that make it possible for me to keep trying to raise the bar!
Kind regards,
Wade Wells
ServInt - Preferred Web Hosting for phpBay Pro
Installation
1. Unzipping
After downloading the .zip file, use a Zip program to extract the contents to a folder on your hard drive. Be sure "Use
Folder Names" is checked, when unzipping the archive.
Mac users, please use the free version of Stuffit Expander to unzip files. The phpBay Pro .zip file is created, on the
fly, as downloaded, and the php based .zip class creates a .zip file, that for some reason, the Mac OS cannot extract.
However, just about any Mac tool that can handle a .zip file, works fine.
After unzipping the archive, you will have a folder called phpBay which contain all files and folders. In 4.x versions, there
are no longer files and folders "outside" of the phpBay plugin folder. In other words, where in the 3.x versions there was
an /images folder along with wp-content/plugins/phpBay folder, in 4.x, everything is contained in the primary plugin
folder phpBay/ as seen below.
Page 4 of 49
6. Inside the phpBay/ folder are the files that make up the plugin, as seen below:
2. Files to Upload
The file structure for phpBay is enclosed in the phpBay/ folder. In versions prior to 4.x, there was an /images folder,
however beginning in 4.x, all files belonging to the plugin are now contained in the phpBay/ folder.
Upload the phpBay/ folder to your Wordpress site, in the following folder:
wp-content/plugins/
ServInt - Preferred Web Hosting for phpBay Pro
Page 6 of 49
7. Note: If you have changed your plugin folder name within Wordpress, phpBay Pro® will recognize your custom plugins/
folder. Simply upload the phpBay/ folder to wherever your plugins/ folder resides.
.htaccess – Depending on options used in the phpBay Admin settings page, phpBay will generate the necessary code
needed for your .htaccess file.
3. Installing with Wordpress' "Install Plugin" feature
Because phpBay Pro® 4.x is now contained with a single folder structure (phpBay/), you can now use Wordpress' "Install
Plugin" feature.
Login to your Wordpress Admin Dashboard.
On the left menu, find and click on "Plugins"
At the top of that page, find and click on the "Add New" button
Use the "Browse" button and locate the phpbay_plugin.zip file (see Note below) on your computer's hard drive, then click
the "Install Now" button
Note: If you have a previous version of phpBay Pro® already installed, you will need to remove the existing
wp-content/plugins/phpBay folder first, or you will not be able to install the new version using this method.
ServInt - Preferred Web Hosting for phpBay Pro
Page 7 of 49
8. 4. Upload Files Using FTP
Use a free FTP Program, such as FileZilla, to upload the phpBay/ folder to your wp-content/plugins/ folder as
illustrated above, to your website. If you are unfamiliar with how to use FTP, this tutorial on using FileZilla may help
you better understand how FTP works.
5. Upload Files Using File Manager
If you are not comfortable using FTP and would prefer to use your web host's File Manager, upload phpbay_plugin.zip to
your site's wp-content/plugins/ folder. Login to your host cpanel or other web app used to manage your site. Go to the
"File Manager." Navigate to your site's main folder, then to wp-content/plugins/ folder. Next, click on the "Upload" button
to upload phpbay_plugin.zip file to the wp-content/plugins folder.
Page 8 of 49
9. Once the .zip file finishes uploading, select the phpbay_plugin.zip file, then click on the "Extract" button. Again, it's
absolutely imperative to ensure the phpbay_plugin.zip file is uploaded to your site's wp-conent/plugins/ folder, or it will
not extract to the proper folder structure. If you have renamed your plugins/ folder in Wordpress, be sure to uploaded it
to the directory you have renamed your plugins/ folder to.
This will extract the .zip file onto your server with all the files in the proper location.
Please be sure to delete phpbay_plugin.zip from your server once it's installed.
ServInt - Preferred Web Hosting for phpBay Pro
Page 9 of 49
10. 6. Activate the phpBay Pro® Plugin
Login to the Admin panel of your Wordpress Blog. On the left side of the "Dash Panel," locate and click on the "Plugins"
link, as illustrated below. This will list your installed and uninstalled plugins. Locate the phpBay Pro® plugin, as
illustrated below and click on the "Activate" link, to activate the phpBay Pro® plugin.
Page 10 of 49
11. Upgrading from phpBay Pro 3.x
Upgrading phpBay Pro 3.x should be relatively painless, following these directions:
1. Download and backup your existing files
Before replacing/updating phpBay Pro, first, download your current /phpBay folder from wp-content/plugins/phpBay/ Be
sure to download the /images folder and the auction.php file at the root folder, so that you have a complete backup of
your files in case you need to restore them.
2. Remove existing files
Remove the /phpBay folder at wp-content/plugins/
Remove the /images folder at the site root
Remove auction.php at the site root
Note: In phpBay Pro 4.x, the /images folder and auction.php file now resides in the /phpBay folder.
3. Upload new files
Upload the new /phpBay folder to wp-content/plugins/
Page 11 of 49
12. 4. Login to Wordpress Admin
Login to your Wordpress admin. Go to Settings -> phpBay Pro which will open the phpBay Pro Dashboard.
You should see your existing settings and a message in red: License is Active
Click the "update" button. This will update all the settings and store them in Wordpress.
5. Update your .htaccess file
This is extremely important! The .htaccess file MUST be updated.
Go to the .htaccess Tab in the phpBay Pro Dashboard
Copy the new .htaccess code
Download your site's .htaccess file
Replace the existing phpBay Pro .htaccess code with the newly generated .htaccess code.
Save the file and upload it back to your server's root folder
Page 12 of 49
13. 5. Check your site
Be sure to check your site. Check your links to make sure they go to Ebay correctly. It's always best to install your first
site and double check to make sure everything is working correctly. If so, continue forward with updating your other sites.
6.Troubleshooting
The very first thing you want to do, is verify that next to the license key in the phpBay Pro Dashboard, it shows in red:
License is Active
If the license is not active, then you should attempt to update with your license key. Your license key is located in your
store account. Login to your store account here:
http://www.phpbay.com/store/member.php
If the license key is present, but the License is Active text does not appear next the license key field in your phpBay
Pro Dashboard, do the following:
In the license key field, enter: unregister
Click on the "update" button. This will unregister phpBay Pro so that you can enter your license key again.
6. Restoring phpBay Pro 3.x
We've spent quite a bit of time beta testing phpBay Pro 4.x on the support forums, in anticipation for the latest EPN
changes. Many users have downloaded and participated in the beta, reported bugs, and we've worked through to get this
release to a point where no one was seeing any issues.
Having said that, and having done this for four and half years now, it is virtually impossible to catch all bugs on a major
update like this. phpBay Pro 4.x was completely recoded from the ground up. Not withstanding, there are so many
different servers out there configured in many different ways. It's very possible you may run into a bug that others did
not experience.
Should you need to restore your site to phpBay Pro 3.x, follow these steps:
Remove the /phpBay folder from wp-content/plugins/
Upload your saved files, from step 1. The /phpBay folder, /images folder to the site root and the auction.php file to the
site root.
Login to your Wordpress admin. Go to Settings -> phpBay Pro which will open the phpBay Pro Dashboard.
You will need your license key.
Enter your license key and click the "update" button.
Copy the .htaccess code.
Download your site's .htaccess file
Replace the existing phpBay Pro .htaccess code with the 3.x .htaccess code.
Save the file and upload it back to your server's root folder
Page 13 of 49
14. 7.Mass updating your sites
Have a lot of sites to update? It's not fun when these "mandatory" updates come along. The stress of getting the update
out to customers, the stress you have in getting your sites updated. One of our fellow phpBay Pro users, Jarb, has
created a mass auto-updater tool that I highly recommend you take a look at:
http://www.yousearch4.com/autowp
Jarb developed this unique tool with phpBay Pro in mind and the challenges we all face in doing a mass update. Using his
tool, you can enter your site's details and setup an auto-update sequence that will update your plugins automatically. If
you've ever updated 20 or more Wordpress sites with a new plugin, you know how time consuming this process can be.
Days, even weeks for some that have over 100 sites. This tool will have that time down to a few hours.
phpBay Pro Dashboard Settings
1. phpBay Pro® Settings
In your Wordpress Admin, on the left side of the screen, locate the "Settings" tab and click it. Then click "phpBay Pro®"
as illustrated below:
Page 14 of 49
15. 2. Affiliate Settings Tab
License Key - Enter your phpBay Pro license key, available in your store account on phpbay.com
Ebay Campaign ID – Each site that you operate, will have it's own Campaign ID. Login to your EPN account and click
on the "Campaigns" tab, on the yellow tab bar. This will show the Campaign ID for each site.
Custom ID – Custom ID is an additional value you can setup, for tracking specific sites or pages/posts.
Default Country - EPN currently supports 13 different countries. Select the country your site intends to target. In other
words, the country you anticipate the most visitors from and will be offering products from.
Default Language - Currently there is only an English translation file, however, I have developed phpBay Pro® with an
external language file for all text objects used. If you are fluent in one of the countries that Ebay supports and would like
to contribute a language file, please contact me.
Click on the "Update Options" button to save these settings.
Page 15 of 49
16. 3. Product Search Tab
The Settings Tab controls the default global settings for both how Ebay is queried and what displays on a page or post.
Move your cursor over the ? for additional information. Use the "Select Recommended" button to set the most common
options automatically. You can revisit this Tab to turn on/off parameters to suit the output.
Click on the "Update Options" button to save these settings.
ServInt - Preferred Web Hosting for phpBay Pro
Page 16 of 49
17. 4. Legacy Tab
If upgrading from a previous 3.x version of phpBay Pro, version 4.x will import global settings from prior versions and
those values are available in this Tab. If you are doing a fresh installation for the first time, it is recommended not to
use these settings.
These settings affect legacy [phpbay] tags. It is better to use the menu builders (covered later) for more flexibility.
Click on the "Update Options" button to save these settings.
Page 17 of 49
18. 5. Paging Options Tab
In phpBay Pro 4.x, pagination styles have been introduced. The Paging Options Tab lets you pick the style for paging
results that will best work with the Wordpress theme being used. How paging works and some caveats of paging are
discussed later in the manual. For now, select the preferred style.
Click on the "Update Options" button to save these settings.
Page 18 of 49
19. 6. SEO Options Tab
Godaddy - Is your site hosted on Godaddy.com? If so, select this option. godaddy.com uses a proxy server to make
outbound connections and this setting will enable the proper settings in phpBay Pro to properly connect to ebay.com and
retrieve results.
mod_rewrite - phpBay Pro can make Ebay images appear to be hosted on your server, rather than Ebay. Some users
prefer this, so that products and images appear to be on their site, rather than ebay.com.
SEO URLs
Use SEO URLs - This option will rewrite outbound Ebay urls so that they appear to go to your site. Many
users prefer to use this option. If using this option, you will need to update your site's .htaccess file with the
code generated in the next Tab (see below for instructions). Keep in mind, this is an "option" and is not
necessary for the program to work. If you wish not to edit the .htaccess file, use the Default Ebay URLs
setting.
Default Ebay URLs - This uses the Ebay url, exactly as returned from the Ebay XML feed, for all outgoing
links to ebay.com.
Page 19 of 49
20. URL Prefix - When using SEO URLs option, you can specify the beginning of the url. By default, this is set to "item-"
Here's an example of what the url looks like, when "item-" is used as the prefix:
http://www.website.com/item-morley-fxb-optical-outboard-variable-fx-loop_123456789_US.html
Notice the url has "item-" in the url. This is the url prefix. Be sure to use it like: keyword-
Important! - If you change the URL Prefix, AFTER you have updated your .htaccess file, you will need to update your
.htaccess file again. Any time the URL Prefix changes, you MUST update your .htaccess file (copy the .htaccess code
generated), or your urls will no longer work.
Click on the "Update Options" button to save these settings.
ServInt - Preferred Web Hosting for phpBay Pro
Page 20 of 49
21. 7..htaccess Code
First, be sure you saved the settings from the SEO Options Tab. SEO Options MUST be saved first, as it will check to see
if using mod_rewrite and/or SEO URLs and automatically generate the .htaccess code for you.
After saving/updating options and if SEO URLS are selected and/or mod_rewrite images is selected, this box will
appear with code that you can copy/paste to your site's .htaccess file:
This feature can be quite powerful, very simplistic to implement, yet can often times be confusing. Your Wordpress site
may have a .htaccess file already. If you use permalinks in Wordpress, most likely it will exist at your site's root/home
folder. This file, if exists, would be at the same folder as wp-config.php.
Download your .htaccess file from your site's home/root folder. Use Notepad.exe or Wordpad.exe and open it. Copy the
code from the box (as illustrated above) and paste it at the top of your .htaccess file. Save it. Then upload it back to
your site's root/home folder where wp-config.php is.
Page 21 of 49
22. If your site does not have a .htaccess file, you can create one with Notepad.exe or Wordpad.exe. Create a new text file.
Save it as: .htaccess (note the . is the starting character).
Next, add the code from the .htaccess box (as illustrated above) and paste it at the top of your .htaccess file. Save it.
Then upload it back to your site's root/home folder where wp-config.php is.
If your Wordpress blog is located in a subdirectory of your main site (example: /blog/ then you will need to edit the line
where RewriteBase/ is, in the code, to: RewriteBase /blog/
If your Wordpress blog is on a subdomain, then you can typically leave it as: RewriteBase /
If your Wordpress blog is on a subdomain in a subdirectory (example: /blog/ then you will need to edit the line where
RewriteBase/ is, in the code, to: RewriteBase /blog/
phpBay Pro Widget
phpBay Pro 4.x adds powerful widget capabilities. It's important to first understand how the widget works. We setup the
global widget, that will be displayed on your Wordpress site. Once we've setup the global widget, then for each page or
post that you add, you can specify a per page/post widget that will override the global widget. This new feature makes it
possible for you to control the sidebar widget products displayed for each page/post on your Wordpress blog.
The global widget will display products throughout the site, but on pages or post where it encounters a widget override, it
will then display those unique products per the page/post widget.
1. Setting up the global phpBay Pro Widget
To use either the global widget or the per page/post widget, we must first activate the global phpBay Pro Widget. Before
setting up the widget, be sure you have setup the main phpBay Pro options above.
In the Admin Dashboard, click on the "Appearance" menu, then click "Widgets"
Page 22 of 49
23. Locate the phpBay Pro Sidebar Widget and click/drag to your sidebar.
A menu will appear with settings for the global sidebar widget.
Fill in the Title (this is the title for the Sidebar container the widget will appear in), keywords, etc. You can fine tune your
listings by Category, Sort and min/max price if desired. If your Wordpress theme offers an option of where to place the
widget, select the location and "Save Widget."
Now we're ready to begin adding phpBay Pro to our Wordpress pages or posts.
Page 23 of 49
24. Adding phpBay Pro Search Results to a Post or Page
Open or create a new post or page in Wordpress. For each page or post in Wordpress, you can add phpBay Pro listings.
Wordpress has two page/post editing modes. One is Visual, the other HTML. Previous versions of phpBay Pro required
using the HTML mode to add listings, however beginning with version 4.0, we need to be in Visual Mode.
First, click in the content window of the editor where you want your Ebay listings returned. Next, locate the phpBay Pro
dropmenu on the visual editor tab, as illustrated below, and select "Search Results."
Page 24 of 49
25. A popup menu will appear for settings.
Keywords - Enter the keyword(s) for the products you want to display. Short, brief keywords should be considered.
Number of Results - The total overall number of results to display, up to 100. See more information below for Page
Results.
Custom Id - Your default Custom ID will be inserted, from the global settings in the Affiliate Settings Tab. You can
override this tracking id with an alternate custom id if desired.
Minimum Price - To help fine tune results and filter out certain products, you can specify a minimum price. This is
important - when entering a minimum price (for example: $32.00), the actual value entered is: 32
No decimal separators or currency values are used. $5.00 would be: 5
Page 25 of 49
26. Maximum Price - You can use either/or a minimum price and/or a maximum price. To use one does not mean you have
to use the other. Enter the Maximum Price the same as the minimum price. For example, to set a maximum price of
$175.00, you would enter: 175
No decimal separators or currency values are used.
Seller ID - To display only items from specific Ebay seller(s), enter the seller id in this field. Multiple seller ids can be
inserted, separated by a space.
Items w/Free Shipping - Select this checkbox to display items that are available, based upon your keyword search,
with free shipping. Keep in mind that this setting will greatly reduce the number of possible listings. If you are using a
keyword that has minimal results on Ebay, and select this option, it will reduce that list even more.
Template Name - phpBay Pro will automatically display templates available from the /templates folder. If a template
used for column based results is selected, an additional drop down menu will appear directly to the right of this option to
set the number of columns.
This is important! When using a column based template, keep in mind that while you can set more columns, some
themes only have so much available space in the content area. You can set a higher number of columns, however, there
will be "straggler" products at the bottom of the listings. Also important for consideration here, is the "real estate" in the
content area of your theme. If you have a narrow them, it's impractical to try and "stuff" five columns into the display.
It's best to set columns to 2, if using a columns based template.
Page Results? - Select yes or no. This will turn paging on or off. If set to "yes," a new drop menu will appear.
Items Per Page - If Page Results is set to "yes," this drop menu will appear. Ideally you would set this, so that your
columns number will match this setting, for an even listing of products. For example, if you set two columns, then setting
Items Per Page to 10 would give five rows, two columns of items.
If columns were set to 3, then you might list 12 products per page, giving four rows of three columns for twelve items per
page.
Country - The default Country will be selected, from the global settings in the Affiliate Settings Tab. You can select a
different country. For example, if you want to create a page or post with product search results for US, then later want to
create a page/post with product search results for DE (Germany), simply change the country. You do not have to use the
default Country selection, it can be changed per page/post.
Category - Enter a specific Ebay category to display results from. Up to three categories can be specified. If more than
one category is used, use a "space" to separate each category, like: 6801 49856 2873
Page 26 of 49
27. This is important! Each country has it's own set of Categories. Using a category is not recommended when using GEO
IP Targeting because the category of one country will not necessarily be available in another country. It's very
important to understand that Categories are very dependent upon the Country selection and that a Category
available in one country, may not be available in another country.
Sort Order - Generally "EndTimeSoonest" is the most commonly used Sort order. Select the appropriate sort order for
your listings.
Once your selections have been made, click on the "Submit" button. A [phpbay] shortcode will be inserted where your
cursor was previously placed in the content window.
Let's take a look at an example form completed for illustration:
Page 27 of 49
28. We want to display products based on the keyword "steering wheel." United States is selected as the country. We
selected 100 for the overall result count. Of course, there could be less results, but if at least 100 results are available,
they will return.
Tracking ID was auto-populated from the global settings in the phpBay Pro dashboard. min or max price was not used.
The template selected is columns, which then displayed the "Number of Columns" dropmenu, which is set to 2. Page
Results? is set to Yes.
Sort order is set to "Best Match." You can experiment with the Sort Order for best results.
Columns is set to 2, Page Results is turned on, and we set Items Per Page to 10.
To edit a shortcode, after is has been created, either manually edit the tag, or delete it and use the menu builder to
create a new tag.
Adding phpBay Pro Widget to a Post or Page
In version 4.x, you can now add a sidebar widget on a per page/post basis. In order to do this, you must first setup the
global phpBay Pro Sidebar widget, covered earlier.
Locate the phpBay Pro dropmenu on the visual editor tab, as illustrated below, and select "Sidebar Widget."
ServInt - Preferred Web Hosting for phpBay Pro
Page 28 of 49
29. A popup menu will appear for settings.
Title - Enter the title that will display above the results.
Keywords - The keyword or phrase to be used to return results.
Number of Results - Select between 1 and 10
Custom Id - Your default Custom ID will be inserted, from the global settings in the Affiliate Settings Tab. You can
override this tracking id with an alternate custom id if desired.
Minimum Price - To help fine tune results and filter out certain products, you can specify a minimum price. This is
important - when entering a minimum price (for example: $32.00), the actual value entered is: 32
No decimal separators or currency values are used. $5.00 would be: 5
Page 29 of 49
30. Maximum Price - You can use either/or a minimum price and/or a maximum price. To use one does not mean you have
to use the other. Enter the Maximum Price the same as the minimum price. For example, to set a maximum price of
$175.00, you would enter: 175
No decimal separators or currency values are used.
Seller ID - To display only items from specific Ebay seller(s), enter the seller id in this field. Multiple seller ids can be
inserted, separated by a space.
Country - The default Country will be selected, from the global settings in the Affiliate Settings Tab. You can select a
different country. For example, if you want to create a page or post with product search results for US, then later want to
create a page/post with product search results for DE (Germany), simply change the country. You do not have to use the
default Country selection, it can be changed per page/post.
Category - Enter a specific Ebay category to display results from. Up to three categories can be specified. If more than
one category is used, use a "space" to separate each category, like: 6801 49856 2873
This is important! Each country has it's own set of Categories. Using a category is not recommended when using GEO
IP Targeting because the category of one country will not necessarily be available in another country. It's very
important to understand that Categories are very dependent upon the Country selection and that a Category
available in one country, may not be available in another country.
Sort Order - Generally "EndTimeSoonest" is the most commonly used Sort order. Select the appropriate sort order for
your listings.
Items w/Free Shipping - Select this checkbox to display items that are available, based upon your keyword search,
with free shipping. Keep in mind that this setting will greatly reduce the number of possible listings. If you are using a
keyword that has minimal results on Ebay, and select this option, it will reduce that list even more.
Replace Existing Widget - Select the sidebar widget to replace with this widget. In order to use the phpBay Pro
Sidebar Widget on a per page/post basis, the global sidebar widget must be setup first. The "title" given to the global
sidebar widget will appear in this field. Select the phpBay Pro Sidebar Widget to replace with this new widget.
Once your selections have been made, click on the "Submit" button. A [phpbaysidebar] shortcode will be inserted where
your cursor was previously placed in the content window.
Page 30 of 49
31. Let's take a look at an example menu, where a Sidebar widget is prepared:
Page 31 of 49
32. After clicking "Submit," here is what the [phpbaysidebar] tag looks like:
For the time being, using the menu builder is only a one way process. Once it makes a tag, to make an edit, either
manually edit the tag, or delete it and use the menu builder to create a new tag.
Page 32 of 49
33. phpBay Shortcodes
There are additional short codes that can be added to the [phpbay] tag. The most commonly used short codes are built
into the menu builders, however, there are times when these additional short codes can play an important role.
For extended information about EPN specific parameters, EPN has made documentation available here.
phpBay Pro shortcodes use the convention of shortcode="value"
Example: [phpbay keywords="craftsman socket set" num="6"]
The shortcode name is case sensitive and must be in all lower case. Following are a list of available shortcodes and
acceptable values.
keywords
Keywords are perhaps the most important shortcode. Keep your keyword(s) short and specific to get the best results.
Up to five keyword or keyword phrases can be used, separated by a comma.
Example: keywords="craftsman socket set"
Example: keywords="craftsman socket set, matco socket set, snap on socket set"
num
The number of results to return. Important - as of this writing, there is no field that contains the number of results
available for a query or the number of pages. As such, if paging is turned on, phpBay Pro will query ebay for the max
results and build it's internal pagination based upon the number of total results returned.
If paging is turned off, then phpBay Pro will query ebay with the number of results requested, though through any
number of filters, the number of items can be less than required.
Page 33 of 49
34. exclude
exclude represents keywords to exclude from the search results. Up to five keyword or keyword phrases can be used in
the exclude field, separated by a comma. For example, if you wanted to list socket sets, but wanted to exclude "matco"
from the results:
Example: exclude="matco"
Example: exclude="matco, craftsman"
availableto
Limits items available to specified two-letter country code. The locatedin shortcode cannot be used in conjunction with
availableto, per EPN's documentation. Items that are available to the two-letter country code specified are shown.
Example: availableto="DE"
bestofferonly
If true, the search results are limited to only items that have Best Offer enabled.
Example: bestofferonly="true"
campaignid
campaignid, as a shortcode, probably would not be used but is available. Generally with EPN, a campaignid represents an
individual site, so it would be rare to need to change the campaignid on a per page/post basis. By default, phpBay Pro
uses the campaignid set in the phpBay Pro Dashboard settings. If this shortcode is set, it will override the default global
campaignid set in the dashboard.
Example: campaignid="8675309"
category
Up to five categories can be specified to request results from based on the keyword. In past versions, only one category
could be used, however, with 4.x, up to five categories can be used, separated by a space.
Example: category="6168"
Example: category="6168 6169 8192 7632"
This shortcode is optional.
Page 34 of 49
35. columns
Columns should only be set, if using a column based template. This is important! When using a column based
template, keep in mind that while you can set more columns, some themes only have so much available space in the
content area. You can set a higher number of columns, however, there will be "straggler" products at the bottom of the
listings. Also important for consideration here, is the "real estate" in the content area of your theme. If you have a
narrow them, it's impractical to try and "stuff" five columns into the display. Let common sense prevail. It's best to set
columns to 2, if using a columns based template.
Example: columns="2"
condition
Limits items to those that have a matching condition. Up to five condition parameters can be entered, separated by a
comma.
Parameter Description Parameter
New = New
New = 1000
New other (see details) = 1500
New with defects = 1750
Used, refurbished, or for parts = Used
Manufacturer refurbished = 2000
Seller refurbished = 2500
Used = 3000
Very good = 4000
Good = 5000
Acceptable = 6000
For parts or not working = 7000
Unspecified = Unspecified
Example (New): condition="New"
Example (Used): condition="3000"
Example: condition="Used, 2000, 2500, 3000"
ServInt - Preferred Web Hosting for phpBay Pro
Page 35 of 49
36. currency
Limits results to items listed with the specified currency only. Most likely this parameter would not need to be used.
Currency of results are automatically determined by Ebay based on the siteid.
Parameter Description Parameter
Australian Dollar = AUD
Canadian Dollar = CAD
Swiss Franc = CHF
Euro = EUR
Pound Sterling = GBP
US Dollar = USD
Example: currency="CHF"
customid
customid is generally used for tracking individual sites or pages/posts.
Example: customid="Tools"
datetype
datetype represents how the end date/time is displayed in results. There are two options: "enddate" will show the full
date, as returned in the xml query results from Ebay. "timeremaining" will show the date as time remaining, in days,
hours and minutes. This setting can be set in the dashboard, and then if you need to override the global value, can use
this shortcode to change on a per page/per post basis.
Example: datetype="timeremaining"
Page 36 of 49
37. debug
debug is a powerful shortcode that can help you isolate potential problems, check your outbound links and much more.
For example, many users start off with a "shared" hosting server and it is hard to accept that at some point down the
road, as traffic grows, you are going to have to update to a viable server (many phpBay Pro customers use a basic VPS
setup with ServInt for Web Hosting). With debug on, you can check the time it takes to query Ebay and return
results. This can help determine if your current server is lagging.
Debug prints a considerable amount of information to the screen. Do not be alarmed. This information is there to assist
in trouble shooting and once through, debug can be removed from the shortcode.
You can also check your outbound links, if using SEO URLs, with this shortcode. Once debug is turned on, you can click
one of your outbound links (in the actual listing...not the raw xml output), and it will pass the debug parameter to the
auction.php, which in turn will output the destination url to Ebay. This is a great way to validate your outbound links.
Example: debug="true"
descriptionsearch
descriptionsearch will force EPN to return results, by the keyword, from searching both titles AND descriptions. By
default, EPN returns results from a search based upon the title only. Generally this is the best method. However, on very
specific niches with very few results, this shortcode can be used to expand the search to the description to yield more
results. Generally this setting is not recommended for normal searches.
Example: descriptionsearch="true"
displaylogo
displaylogo will turn the Ebay logo on or off. This is a global setting in the phpBay Pro Dashboard, where you would
normally control this. However, if you want to display the logo on a per page/post basic, this shortcode can be used to
override the global value.
Example: displaylogo="true"
displaysortbox
displaysortbox will turn the sort drop down menu on or off. This is a global setting in the phpBay Pro Dashboard, where
you would normally control this. However, if you want to display the sort drop menu on a per page/post basic, this
shortcode can be used to override the global value.
Example: displaysortbox="true"
Page 37 of 49
38. excludecategory
Up to five categories can be specified to exclude results from. For example, if you want to pull items from other
categories, but want to exclude items from certain categories on Ebay, use this shortcode. Multiple categories are
separated by a space.
Example: excludecategory="6160"
Example: excludecategory="2556 2334 1221"
freeshipping
freeshipping, when set to "true", will show only items available with free shipping. Keep in mind that this setting will
greatly reduce the number of possible listings. If you are using a keyword that has minimal results on Ebay, and select
this option, it will reduce that list even more.
Example: freeshipping="true"
geotarget
geotarget will turn the Geo IP Targeting on or off. This is a global setting in the phpBay Pro Dashboard, where you would
normally control this. However, if you want to display the country drop menu on a per page/post basic, this shortcode
can be used to override the global value.
Geo Targeting is built-in to the code. This setting also controls whether the country drop menu appears or not. If Geo IP
Targeting is disabled, the country drop down menu will not appear.
Example: geotarget="true"
getitfastonly
If true, results are limited to only those that are set to Get It Fast Only.
Example: getitfastonly="true"
Page 38 of 49
39. itemsperpage
itemsperpage controls the number of items displayed, when paging is turned on. Ideally, when building a [phpbay]
shortcode, a user would utilize the menu builders (popup boxes) when constructing a page/post, where this is one of the
options. Consider that when paging is on, that the itemsperpage represents how many items will display on that
particular page of the results. Also consider, that if columns are used, you want to try to match the itemsperpage with
the number of columns, to give uniform listings. In other words, if using 3 columns, itemsperpage would be best suited
at 9, 12 or 15 to give a uniform list of products.
Example: itemsperpage="12"
Page 39 of 49
40. listedin
The site on which item(s) were originally listed in. This would probably not be a common parameter to set.
Parameter Description Parameter
Ebay Austria = EBAY-AT
Ebay Australia = EBAY-AU
Ebay Switzerland = EBAY-CH
Ebay Germany = EBAY-DE
Ebay Canada (English) = EBAY-ENCA
Ebay Spain = EBAY-ES
Ebay France = EBAY-FR
Ebay Belgium (French) = EBAY-FRBE
Ebay Canada (French) = EBAY-FRCA
Ebay United Kingdom = EBAY-UK
Ebay Hong Kong = EBAY-HK
Ebay Ireland = EBAY-IE
Ebay India = EBAY-IN
Ebay Italy = EBAY-IT
Ebay Motors = EBAY-MOTOR
Ebay Malaysia = EBAY-MY
Ebay Netherlands = EBAY-NL
Ebay Belgium (Dutch) = EBAY-NLBE
Ebay Philippines = EBAY-PH
Ebay Poland = EBAY-PL
Ebay Singapore = EBAY-SG
Ebay United States = EBAY-US
Example: listedin="EBAY-US"
Example: listedin="EBAY-MOTOR"
Page 40 of 49
41. listingtype
listingtype specifies the type of results returned. There are three possible choices: "All" will show listings from all types.
"BIN" will show only "Buy It Now" items. "Auction" will show only items that are available as auctions.
Example: listingtype="BIN"
(this would show only "Buy It Now" items)
localpickuponly
If true, the search results are limited to only items which have a local pickup available.
Example: localpickuponly="true"
locatedin
Limits item result set to just those items located in the specified two-letter country code. availableto shortcode cannot
be used together with the item filter locatedin. Two letter country code must be used. Up to twenty country codes can be
specified, separated by a comma.
Example: locatedin="US"
Example: locatedin="US, CA, DE, IT"
lotsonly
If true, the search results are limited to only matching listings for which the lot size is two or more.
Example: lotsonly="true"
minbid
The minimum bid number for results to return. For example, to filter out all items that have zero bids, set minbid="1"
Example: minbid="1"
maxbid
Te maximum bid number for results to return. For example, to filter out all items with more than 5 bids, set maxbid="5"
Example: maxbid="5"
Page 41 of 49
42. minfeedback
Specifies the minimum feedback score of a seller whose items can be included in the results returned. For example, if
you wanted to list items from sellers who have at least a feedback score of 50, set minfeedback="50"
Example: minfeedback="50"
maxfeedback
Specifies the maximum feedback score of a seller whose items can be included in the results returned. maxfeedback
score must be equal to or greater than the minfeedback score. For example, if you wanted to list items from sellers who
have no more than a feedback score of 2000, set maxfeedback="2000"
Example: maxfeedback="2000"
maxhandlingtime
Specifies the maximum number of handling days the seller requires to ship an item. Only items with a handling time less
than or equal to this number will be returned. The handling time is the amount of time, in days, required by the seller to
get the item ready to ship and handed off to the actual carrier who does the delivery. It does not include the time
required by the carrier to deliver the item.
Example: maxhandlingtime="4"
minprice
minprice helps to fine tune results and filter out certain products. This is important - when entering a minimum price
(for example: $32.00), the actual value entered is: 32
No decimal separators or currency values are used. $5.00 would be: 5
Example: minprice="32"
maxprice
maxprice helps to fine tune results and filter out certain products. This is important - when entering a maximum price
(for example: $100.00), the actual value entered is: 100
No decimal separators or currency values are used. $25.00 would be: 25
Example: maxprice="100"
Page 42 of 49
43. minquantity
Limits results to items that have a minimum quantity listed. For example, many items have more than one available for
purchase.
Example: minquantity="3"
maxquantity
Limits results to items that have a maximum quantity listed.
Example: maxquantity="25"
maxdistance
maxdistance is used in conjuction with the postalcode shortcode. Both should be used together. postalcode specifies a
valid postal code (zip code) as a base for where to return items from. maxdistance would specify the max distance from
the postalcode. For example, if you have a site that caters to residents in San Antonio, Texas and wanted to list items
available within a 50 mile radius:
Example: postalcode="78201" maxdistance="50"
postalcode
postalcode is used in conjuction with the maxdistance shortcode. Both should be used together. postalcode specifies a
valid postal code (zip code) as a base for where to return items from. maxdistance would specify the max distance from
the postalcode. For example, if you have a site that caters to residents in San Antonio, Texas and wanted to list items
available within a 50 mile radius:
Example: postalcode="78201" maxdistance="50"
paging
paging turns on pagination controls under listings. When paging is turned on, make sure itemsperpage is set to indicate
how many items per page are to be used. The pagination controls in phpBay Pro use javascript to navigate through
pages of results, up to 100 (if 100 results are available).
Example: paging="true"
paypalonly
paypalonly is added, simply because it's available from EPN. It's probably not a shortcode you would typically use.
Basically, when set to "true" it will display only results that are available with Paypal as the payment option. However,
this generally is true of all auctions anyway.
Example: paypalonly="true"
Page 43 of 49
44. removeduplicates
removeduplicates will filter out items that have the exact same name and are in the results more than once. Often times,
ebay sellers will list multiple items with the same item description, resulting in duplicate items taking up space in the
listings. This is NOT an EPN setting. The filtering for this takes place AFTER results are returned from Ebay. phpBay Pro
takes the xml result set, and runs through it removing duplicate items.
For example, if a query returned 100 results and removeduplicates is true, and there were six items that had duplicate
results, then phpBay Pro would prune out those six results leaving 94 total results. This is important to understand
because often times users will think that phpBay Pro is not returning the max number of listings, when in fact, it's simply
pruning out those duplicate results.
Example: removeduplicates="true"
returnsacceptedonly
Limits items returned to those that accept returns. Some vendors do not accept returns, others do. To list items only,
where the seller accepts returns, set this value to true.
Example: returnsacceptedonly="true"
sellerid
sellerid is used to list items by a specific seller id. When this shortcode is used with a valid sellerid, it will list results the
seller has on Ebay (not Ebay stores). Up to ten seller id's can be used, in one single shortcode tag, separated by by a
space.
Example: sellerid="gt_recycler"
Example: sellerid="gt_recycler purepony abad71camaro"
Page 44 of 49
45. siteid
siteid is the country code that EPN assigns to each country that it supports. Please note that if you have used version(s)
of phpBay Pro prior to 4.x, the siteid values that EPN assigns to countries of have changed.
Listed below are valid siteid numbers by country:
USA - 1
Australia - 4
Austria - 3
Belgium - 5
Canada - 7
France - 10
Germany - 11
Ireland - 2
Italy - 12
Netherlands - 16
Spain - 13
Switzerland - 14
United Kingdom - 15
Example: siteid="12"
(this would set Italy as the default country)
skimlinks
At the request of a number of users, I've added support for SkimLinks to phpBay Pro 4.x. Skimlinks is an alternative
network where you can signup as an Ebay affiliate. Skimlinks is getting tougher to get into, however, if you find yourself
in a position where you can no longer make use of EPN (I'm stating this delicately...can you tell?!), you might consider
creating an account with SkimLinks.
This setting enables skimlinks in phpBay Pro. For SEO URLs, it will go through the auction.php file and through to your
skimlink url/id. For default ebay urls, you will need to use the SkimLinks plugin. phpBay Pro will remove your affiliate
information from the links, so that SkimLinks can affiliate them and monetize them.
Example: skimlinks="true"
Page 45 of 49
46. sortorder
Displays results, sorted by the value indicated. Valid sort orders are: "BestMatch", "EndTimeSoonest",
"StartTimeNewest", "PricePlusShippingLowest", "PricePlusShippingHighest"
Example: sortorder="EndTimeSoonest"
templatename
Normally this would be set when using the menu driven builder to create a [phpbay] shortcode. phpBay Pro has a
template folder. Each template is contained in it's own folder. Specify the folder name of the template to be used, as the
templatename.
Example: templatename="columns"
topratedseller
topratedseller will list items only from sellers that are designated as Top Rated by Ebay. Top rated sellers have an above
average rating and usually offer very competitive pricing and shipping.
Example: topratedseller="true"
worldofgoodonly
If true, the search results are limited to only items listed in the World of Good marketplace.
Example: worldofgoodonly="true"
Page 46 of 49
47. Modifying Templates
phpBay Pro has two templates, however, you can create additional templates for specific use based any of these two.
To create a custom template, copy the folder for one of the existing templates, paste it, rename the folder with a unique
name. Then you can begin editing the actual template files.
phpBay Pro for Wordpress (4.x) will automatically scan the /templates/ folder and retrieve the folder name for each folder
present. It will then dive down into each folder and determine if the template is based on default or columns.
If you want certain queries to display only certain values, you can create new templates as described above, and edit the
%%variables%% (or other data) on a per template basis. Just be sure to name the template folder something you can
easily remember.
Template Variables
phpBay includes a wide variety of %%variables%% that contain product information and can be used within the
templates. Templates are already setup with most of these, however, below is a complete listing of these variables to
help make modifying the templates to your personal preference.
%%Link%% - A link to the item. This will either be a default ebay url, or an seo url, depending on settings. It
contains a valid http link to the item listing.
%%Image%% - Contains the item image link. This will be a direct link to the image on ebay, or if seo urls is used, the
mod_rewrite link.
%%Title%% - Title of the current Ebay item.
%%Price%% - Current price of the item.
%%NumBids%% - Number of bids an item has, if any.
%%EndDateTitle%% - The title displayed before the end date or time remaining.
%%EndDate%% - The end date, represented either as the end date or time remaining, depending on the datetype
setting.
%%BINTitle%% - The title displayed before the BIN (Buy It Now) Price. Will only display if there is a BIN associated
with an item.
Page 47 of 49
48. %%BINPrice%% - BIN Price of an item, if it has one. Will only display if there is a BIN associated with an item.
%%Separator%% - Used between the various links as a separator. | (space | space)
%%BINLink%% - Link to the BIN for an item, if it has a BIN. Note, this is really just the same as %%Link%%
because the default ebay url for a BIN is the same as the standard link to the item.
%%BidLink%% - Link to place a BID on an item, if it is an auction item with bids. Note, this is really just the same as
%%Link%% because the default ebay url for a BIN is the same as the standard link to the item.
%%WatchLink%% - A link to add an item to the WatchList. This url is very different from the other links to Ebay.
%%ItemNumber%% - The Ebay item number for an item. Typically this would not be used, but I try not to discount
what a customer may need access to, so it's included.
Language File
phpBay Pro is setup for future use of language files. English is the only language I know, so if you know one of the other
supported languages and would like to create the language file, please let me know.
The current language file is english.php. In this file, are all label and title references. The english.php contains a wealth
of settings that can be changed, though I recommend not doing this unless you really understand what you are doing.
Most anything relating to visual language is included, including other countries for the basic texts like "Buy It Now."
If you would like to create a new language file, simply copy and paste english.php, then rename the copied file to the new
language, like: french.php
Then upload the french.php file to the /lang/ directory and phpBay Pro will automatically pick it up in the list.
GEO IP Targeting
phpBay Pro uses maxmind.com's free GeoLite Country database, which is included with the download of the .zip file. In
the /phpBay/includes/ folder, these two files: geoip.inc and GeoIP.dat will need to be updated periodically. Note the
proper case of the file names. Do not alter the filenames or the case of the filenames.
Page 48 of 49
49. You can download the latest GeoLite Country database file here:
http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
The .gz extension can be opened up with virtually an program that can handle .zip files. To update your database (I
recommend at least twice per year), download the .gz file at the link above, open and extract geoip.inc and GeoIP.dat.
Upload those to your server at: wp-content/plugins/phpBay/includes/ overwriting the existing two files. This will keep
your database up to date with the latest IP/Country information.
To setup the files in a central location on your server, for all sites to access on repository, is possible. Open the
/lang/english.php file and find the following line, at the very bottom:
define("PB_GEO_IP_PATH", "");
Specify your server path to the Maxmind GEO IP folder. For example:
define("PB_GEO_IP_PATH", "/home/myhostingaccountusername/geoip/");
For linux based servers, the path must start and end with /
Support
For support, please join the members only forum for phpBay Pro users. Check your order receipt email for the
current registration code needed to join. This code changes frequently for security purposes, so be sure to signup on
the support forum as soon as possible after purchase.
We have an active community with many posts containing tips, tricks, and previously answered questions that you may
have. It's a valuable resource that can save you time and provide a world of knowledge to help you get going. Check
your receipt email for the forum registration code.
ServInt - Preferred Web Hosting for phpBay Pro
Page 49 of 49