PHPBay: Start to Finish Tutorial

by trigatch4 on May 30th, 2008

This tutorial documents the process, from start to finish, of creating EddieBauer.org. Here is what the final product looks like:

homepage.jpg

Requirements:

Foundation Steps (Non-Beginners may want to skip this):

Step 1 – Modify the Nameservers for your Domain

Make sure your registered domain names point to the proper name servers designated by your host. Contact your hosting provider if you need help but usually you’ll use something such as NS1.YourHost.com and NS2.YourHost.com – you must use at least 2 nameservers and they usually always start with NS1 and NS2.

With Dotster, login using My Account and navigate to My Domains, click the box next to the domain whose nameserver you want to change and at the bottom select “Modify Nameservers”.

nameserver.jpg

Make the necessary changes and lets be on our way.

Step 2 – Add the Domain to your Hosting Account

Login into your hosting account. If you have Made2Own that means you also have cPanel. Once in cPanel click the Addon Domains button, do what ya gotta do and click Add Domain.

add-domain.jpg

Step 3 – Create a MySQL Database for WordPress

In cPanel click on the MySQL Databases, give the database a name so you know what it is for future reference and click create.

If you don’t already have a User created, make one now and create a password. Then, in the same area (MySQL Databases) add the user you just created to the database you just made for WordPress and make sure you give them ALL PRIVELEDGES.

Step 4 – Installing WordPress

This should be easy enough if you follow the directions from WordPress.org. But essentially, you’ll want to fire up FileZilla and connect to your website’s FTP. Again, you’ll want to contact your hosting provider if you don’t know how to do that but chances are it will be ftp.YourMainDomain.com with your cpanel login information serving as user/password.

Highlight the wp-admin, wp-content, wp-includes and all the other files in the wordpress package from your home computer (left side of FileZilla) and drag them into the folder you created for your domain (right side of FileZilla).

ftpfiles.jpg

Edit the wp-config-sample.php file you just uploaded onto your server and change the 2 lines at the top containing define(‘DB_USER’, ‘prefix_username’) and (‘DB_PASSWORD’, ‘YourPassword’), changing them to the user/password you added to they MySQL database in the last step.

Rename the file from wp-config-sample.php to wp-config.php (delete the -sample part for you whiz kids).

Visit http://YourDomain.com/wp-admin/install.php where YourDomain is filled in with (duh) your actual domain for this project. If you didn’t screw up, you’ll see something similar to this (click to enlarge):

wpsuccess.jpg

It should guide you through a few easy installation steps. As SOON as you gain access to the admin panel, create a new User with the login/password you prefer so you don’t get locked out by forgetting the ridiculous password they give you.

Okay… now we’ve got wordpress set up!

Most people can get to this point unassisted. Here is where we do a little more nitty gritty work.

Customizing WordPress

Find a WP theme you like and copy it to your wp-content/themes folder using FileZilla. Then in WordPress, click on the “Design” tab and activate it.

We’re using LimauOrange by Bob and think it’s awesome for the purpose of PHPBay… you can download it here. It was initially suggested to us by rgordon on the wickedfire forums.

Customizing and Replacing Image Files

The main things we want to change are the header and the colors but we also might want to mess with the index, page, post and category templates so they don’t show things like post/page date.

For this theme, we’ll want to edit the logo.gif, bullet.gif and hr.gif found in the theme’s images folder. Here is what ours look like after editing the files:

logo.gif

hr.gif

bullet.gif

Notice the second square dot is actually hr.gif which is the horizontal rule. It is the stripe below the logo and gets repeated horizontally. This is the color we want to base our theme on (personal preference).

We chose a forest green because Eddie Bauer is a more masculine brand image and borderline outdoorsy following… the forest green works really well giving that “official” look. It kind of just fits.

We want to use this green throughout our site with elements such as links, so we copied and pasted the hex code (#077721) for later use. This is how we can identify the color to be used in the style.css file within wordpress.

But first, here is a look at what we’ve got thus far:

ss1.gif

Editing the Style.CSS File

We decided, based on the above pic, to:

  • Searchbar Colors
  • Change all links to the color green
  • Remove the dotted lines for sidebar headings
  • To make each container border khaki colored.

We accomplished this by editing the style.css file found in the wp-content/themes/limauorange folder and making the following changes:

  • Replacing the HEX numbers in the line starting with “input#searchsubmit” with our preferred colors will alter our search box display
  • Changing the HEX numbers in the line starting with “a:link,a:active,a:visited” with our preferred colors will change the colors of all our links
  • Find lines starting with “.middle h2″, “.left h2″, “.right h2″ and “middle2 h2″ and change the “1px” in the property “border-bottom:dashed 1px” to “0px”. This will removed the dotted line.
  • Change the HEX number in the line beginning with ONLY “.left”, “.right” and “.middle”…. with the property “border:3px solid #??????”…. obviously changing the ? to the HEX for the color you want.

The best method for customizing your style is trial and error. It’s also the best way to learn. For example, we also decided to change our sidebar headings by adding “color: #??????” to the beginning of the lines starting with “.left h2″ and “.right h2″.

I wasn’t completely happy with the color scheme but I didn’t want to get hung up on it. Here is what I have so far… I’ll go back and alter the colors later (maybe):

ss2.gif

Altering your WordPress Templates

We don’t want that huge, default Text Link Ads banner in the way and things like date, posted by, time, categories, etc… might be good for a blog, but not for our PHPBay site.

The files we want to edit are found in the limauorange folder and are named:

  • index.php
  • page.php
  • single.php
  • lsidebar.php
  • rsidebar.php
  • sidebar.php

First lets open the index.php file – the file that is loaded when you visit the site’s homepage. Find this at the top:

<script type=”text/javascript”>
/* <![CDATA[ */
function affiliateLink(str){ str = unescape(str); var r = ''; for(var i = 0; i < str.length; i++) r += String.fromCharCode(2^str.charCodeAt(i)); document.write(r); }
affiliateLink('%3Ec%22jpgd%3F%20jvvr8--uuu%2Cvgzv/nkli/cfq%2Camo-%3Dpgd%3F%3B2407%20%3C%3Ekoe%22qpa%3F%20jvvr8--uuu%2Cvgzv/nkli/cfq%2Camo-kocegq-vgzv%5Dnkli%5Dcfq%5DC%5D64%3Az42%2Cekd%20%22%60mpfgp%3F%202%20%22cnv%3F%20Vgzv%22Nkli%22Cfq%20%3C%3E-c%3C');
/* ]]> */
</script>

Delete it. That’s the Text Link Ads banner. Nice…. now it’s gone. A bit further down, after the h2 tags are opened and closed, you’ll spot this:

<p><small><?php the_time(‘F jS, Y’) ?> <?php the_author() ?></small> Posted in <?php the_category(‘, ‘) ?> | <?php comments_popup_link(‘No Comments »’, ’1 Comment »’, ‘% Comments »’); ?> <?php if(function_exists(‘the_views’)) { the_views(); } ?> <?php edit_post_link(‘Edit’, ”, ‘ | ‘); ?></p>

Delete that, too. That’s all the extra info about the post time and stuff. Yucky and gone. Man we’re trigger happy… and we’re about to delete more. Find this:

<?php if ( function_exists(‘the_tags’) ) { the_tags(‘<p>Tags: ‘, ‘, ‘, ‘</p>’); } ?>
<!– AddThis Bookmark Post Button BEGIN –>
<?php echo “<div class=\”addthis\”><a href=\”http://www.addthis.com/bookmark.php?pub=blogohblog&url=”.get_permalink().”&title=”.get_the_title($id).”\” title=\”Bookmark using any bookmark manager!\” target=\”_blank\”><img src=\”http://s9.addthis.com/button1-bm.gif\” width=\”125\” height=\”16\” border=\”0\” alt=\”AddThis Social Bookmark Button\” /></a></div>”; ?>
<!– AddThis Bookmark Post Button END –>

Delete it all. That takes out the display of “tagged” posts and the stupid bookmarking tool that would look super spammy on a shopping site. Gone.

For sites with lots of posts, blog style, it’s nice to navigate between posts but no-me-gusta for this site. Soooooo…. delete this:

<div>
<div class=”alignleft”><?php next_posts_link(‘« Previous Entries’) ?></div>
<div class=”alignright”><?php previous_posts_link(‘Next Entries »’) ?></div>
</div>

Now you’ll notice if you click on the first post, Hello World!, you still get a bunch of garbage including the stuff we just deleted. That’s because the posts use the single.php template. Rather than go in and edit all that again, we’re simply going to copy our index.php and rename it page.php and single.php and overwrite them on the server.

We’re going to use pages rather than posts for our content, but change both just for the sake of it. It takes 2 extra seconds.

So that takes care of the first three. Now lets scan the sidebar templates to see if there are any changes we need to make. It appears that lsidebar.php is the only one we care to change, and the Google Adsense ads the designer pasted in are the culprit. Remove them by deleting the following:

<li>
<ul>
<script type=”text/javascript”><!–
google_ad_client = “pub-9312294701485395″;
google_ad_width = 125;
google_ad_height = 125;
google_ad_format = “125x125_as_rimg”;
google_cpa_choice = “CAEQ6fqXhAIaCO_mwRos0nIlKK2293M”;
google_ad_channel = “2887620906″;
//–>
</script>
<script type=”text/javascript” src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>
</ul>
</li>

That’ll do for now. We can tweak things as we like afterwards, but lets get the meat of this bad boy up and running.

Quick Search Engine Optimization

Oops… almost forgot to optimize WP. All you really need to do for the time being is change your permalinks. In your admin panel go to “Settings > Permalinks” and choose a custom structure. In the box type “%postname%” without the quotes of course.

Copy the code that it spits out at the bottom, paste it in a notepad file, save it as “.htaccess” without the quotes and, yes, with a period to start. Put this in the main folder for your domain.

Now download the “All In One SEO Pack” plugin and install that bad boy.

Installing PHPBay Pro

First you’ve got to buy it. Then all you have to do is copy the phpbay folder to your wp-content/plugins folder. Make sure it is copied as an entire FOLDER and you are not simply copying the files. Then, copy auction.php to your root… your actual domain folder.

In your admin panel go to PLUGINS and activate PHPBay Pro and All In One SEO Pack.

plugins.gif

Note: phpBay 3.0 was released. The installing/upgrading is a bit different than in version 2.5.1. Getting the files to your server is still simple but “verifying your license” might be somewhat confusing so I’m showing how to do this below:

Once you have bought phpBay you can login to your member area by visiting this link: http://www.phpbay.com/store/member.php

Find the text box as seen below and copy THE ENTIRE THING, INCLUDING the —-LICENSE FILE DATA ——- part and lines at the end.

license.jpg

Paste this into a blank notepad file and save it as “license.key”. Upload it to your /wp-content/plugins/phpBay folder.

If you were previously “locked out” of wordpress and getting error messages, this should fix the problem. But now you need to “verify” your license to make it work. Go back to your phpBay member area and copy the following code:

licensekey.jpg

Visit the phpBay settings page in your wp-admin panel and paste the code here:

licensepaste.jpg

Update your options and it should tell you that your license is verified. If not, stop trying to hax the systems and buy your freaking copy on the intarwebz!

Strategic Setup of WordPress Pages Utilizing PHPBay

We want our website to offer a good user experience. Think about it… if you were shopping on a website how would you want to find and browse products to buy?

  • Product Categories
  • Price Ranges
  • Popular Products

So that’s exactly what we’re going to do. The most important feature for us is the “popular products” section. Why? Because we’re going to use a keyword research tool to find the most commonly searched for Eddie Bauer products and make a separate page for each search term, optimizing our page for each individual one.

Keyword Research

So hit up your keyword research tool of choice, we’ll demonstrate using our preferred service: Wordze.

Do a broad search for your main term (in our case Eddie Bauer) and copy any keyword that sounds remotely good to a simple .txt file. Just make a list of the top 20 or so… you’re going to be creating a page for each one so you don’t want to get too out of hand. Eddie Bauer actually had less searches than we hoped for, but that’s another issue altogether.

Here were our top Wordze results:

wordze.gif

And here is the list of keywords we made:

POPULAR SEARCHES
Eddie Bauer Outlet
Eddie Bauer Outlets
Eddie Bauer Outlet Stores
Eddie Bauer Coupons
Eddie Bauer Promotional Codes
Eddie Bauer High Chair
Womens Eddie Bauer Blouses
Eddie Bauer Deluxe Convertible Car Seat
Eddie Bauer Strollers
Eddie Bauer Watch
Eddie Bauer Sport Shorts
Eddie Bauer Womens Swimsuits
Eddie Bauer Tents
Eddie Bauer Bicycle
Eddie Bauer Sunglasses
Eddie Bauer Clothing
Eddie Bauer Baby Furniture
Eddie Bauer Flannel Shirt
Eddie Bauer Car Seats and Strollers
Eddie Bauer Catalog

You might notice that some of the top keywords are missing… that’s because they fall into our “categories” rather than keywords.

Selecting your main “Categories”

Not to be confused with WordPress Categories, we’re going to make a list in the same TXT file, right below the keywords we chose, of main shopping categories to browse.

All we did was go to EddieBauer.com and pick some of the areas we thought would be best for users to browse:

ebsite.gif

And here are the categories we decided to use:

CATEGORIES
Eddie Bauer Accessories
Eddie Bauer Backpacks
Eddie Bauer Bedding
Eddie Bauer Business
Eddie Bauer Furniture
Eddie Bauer Handbags
Eddie Bauer Home
Eddie Bauer Jeans
Eddie Bauer Kids
Eddie Bauer Luggage
Eddie Bauer Men
Eddie Bauer Pants
Eddie Bauer Shirts
Eddie Bauer Shoes, Boots & Sandals
Eddie Bauer Socks
Eddie Bauer Sweaters
Eddie Bauer Swimsuits
Eddie Bauer Underwear
Eddie Bauer Watches
Eddie Bauer Women

Choose Price Ranges for Easy Browsing

Depending on the product, niche or whatever it is you’re promoting on your site, your product ranges are going to change. But for Eddie Bauer, we selected the following price ranges and put these in our .TXT file for easy reference:

Price Ranges
$1-$25
$25-$50
$50-$75
$75-$100
$100-$150
$150-$200
$200-$300
$300+

Making Your WordPress Pages

It’s easy to lose track of things. If you count the above, we have our work cut out for us: we need to make 48 pages for each of our targets above.

We’re going to use our TXT file as our TO DO LIST, creating a seperate page for each item on our list. We’ll be using 3 Text Widgets to organize our navigation… one for Shop By Categories, one for Shop By Price, and one for Popular Searches. Each time you’ve completed a page, add a link to it from the appropriate widget using an unordered list with a hyperlink.

(Note: Before you start making pages, go to your PHPBay settings tab in WP Admin and make sure the settings are to your liking.)

Example: Making A “Shop By Category” Page

Create a new Page in WP and make the title the exact name of your category. Our Page Title is “Eddie Bauer Backpacks”. However, we’re going to CHANGE the permalink manually. Because we set the permalinks as %postname% it will default to EddieBauer.org/eddie-bauer-backpacks. But that seems spammy, especially for a category page.

So instead, we alter the permalink to read EddieBauer.org/backpacks:

change-slug.gif

Now, using your best gimmicky, salesy writing talent, write a paragraph about your category, explaining why the customer should click through and purchase right away! You’ve got 40+ more after this, so don’t spend your whole life doing it… make it snappy.

Here is what we came up with for Eddie Bauer Backpacks:

Whether you’re looking for a stylish backpack for school or you’re planning your next hiking expedition, an Eddie Bauer backpack will have you looking great while weathering the elements of nature. Check out our latest deals on backpacks and make sure to return frequently for updates:

Now add your PHP Bay code below this in the required format:

[phpbay]eddie bauer backpack, 10, “”, “”[/phpbay]

The first word is our keyword, the second is the number of searches to display and the two blank values WOULD have been ebay category to search and negative keywords.

Now scroll down to the All-In-One SEO Pack and fill in the details for the page. Usually, leaving the description blank will suffice since our paragraph at the top of the page is pretty much what we would use as a description anyways. The WP Excerpt will include this by default with All-In-One SEO Pack.

Not all the pages display perfectly with the exact products you want, but we kind of steam rolled through everything, understanding there would be imperfections that we could come back and fix later. Why spend more time on the site than we have to if it doesn’t get any traffic anyways?

After rigging up all of the Shop By Category pages, here is how the site looked while viewing the “Watches” Category:

category.gif

(Note: Screen shot was taken in phpBay 2.5.1 and our we’ve since chosen to use 3 column product display, a feature enabled in phpBay 3.0)

You’ll noticed the anchor text for our categories, seen on the left, don’t have “Eddie Bauer” in them. Some will claim this isn’t optimal for SEO but I think it’s important to find the balance between humans and search engines. All those redundant Eddie Bauer’s just look spammy.

Example: Making A “Shop By Price” Page

In our right hand sidebar we’re going to feature a Shop By Price section using Pages and a Text Widget as we did with Shop By Category.

It’s a repetitive process…. make a page for each price range, include a fun, marketing intro for each page… whatever hits your mind at the moment and move on. The code to only display products between price ranges is in the 7th and 8th variables of the PHPBay code.

So, to only display items priced $0 to $25, we used the following code:

[phpbay]Eddie Bauer, 25, “”, “”, “”, “”, “0″, “25″[/phpbay]

And our page for this section, after adding a text widget to the right hand sidebar, looked like this:

byprice.gif

(Note: Screen shot was taken in phpBay 2.5.1 and our we’ve since chosen to use 3 column product display, a feature enabled in phpBay 3.0)

Example: Making A “Popular Keywords” Page

We thought about including our “Popular Keywords” right under the search bar in the upper right, but it simply looks to unorganized since we plan on including “Eddie Bauer” in each search term.

Spammy isn’t the word because in reality, this isn’t spammy at all. Our records show that these OUR popular searches and we’re helping users find exactly what they’re looking for… who knows, perhaps our visitors have the same thing in mind?

Take out that list we made from Wordze and make a page for each keyword you recorded. Drop a link to each of these pages in the “Popular Searches” widget.

Some searches will yield very, very similar results and you’ll need to use your discretion. For example, “Eddie Bauer Outlet”, “Eddie Bauer Outlets” and “Eddie Bauer Outlet Stores” had decent search volume. Should I make a seperate page targeting each keyword?

Some would, but I won’t. Instead, make one page that targets all three keywords by creatively writing the content and adding the most inclusive term as the Page Title. I bet some of you are thinking, “How the hell are you going to sell an Eddie Bauer Outlet Store through PHPBay that makes no sense?”

Don’t fret. It’s all in spinning the content, directing the user towards your ultimate goal of showing them the awesome prices that EBay has to offer for the targeted Eddie Bauer products they’re looking for.

Here is our content from our page targeting the Eddie Bauer Outlet Stores as mentioned above:

outletstores.jpg

Wow… we’re done with pretty much everything now. Except our HOME PAGE.

Making a Sick Homepage

The product pages are great for just displaying phpBay listings, but it just looks straight up wack to use that as your homepage.

Go to any actual shopping site and the homepage is usually much more artistic, graphically appealing, etc… the downside is that the homepage has less monetization streams. I don’t really care. I passed on monetizing the homepage (besides a little adsense) in favor of making a home screen that looks legit, official and visually appealing.

In addition, I target some of the most searched for products (found using wordze) and display them to appear as “features” of the site. This is helpful for visitors because these are the areas they probably want to see anyways.

Take a look at the homepage we created:

homepage.jpg

Kind of sexy, yeah?

Making this page within wordpress would be a huge pain in the ass. So, instead, we chose to pop open Dreamweaver and use tables.

Make sure that your table width is a few pixels narrower than the width of your main content area. We just made one table, 2 columns and 1 row each, for each of the “features” above. Yeah, it might be a little heavy on code and we’re sure it could be done with less dead weight, but ask me if I care.

I don’t… k thx bye.

Now copy/paste that code to into the HTML writing portion of your WordPress Page and you’ve got yourself a winner. Make sure you upload your pictures to your web host and that the code in your wp page points to the proper image location.

Each of the pictures is the same size (for the most part) to give a sense of organization and unity. The text is purposefully written at around the same length so the page flows smoothly. The images are offset so it looks somewhat more abstract and less contrived.

If you want to do the same thing, just look at the source code for the EddieBauer.org homepage and copy the content area with the tables, filling in your own information and pictures.

Damn, Gina… how you like the home page now?

Make this page your Homepage!!!!

Don’t forget to go to WP Admin > Settings > Reading to make this page your homepage.

Adding a Disclaimer

The inevitable question everyone is going to ask is about using Eddie Bauer in my domain name. Over and over and over again you’ll see questions about using trademarked words in your domain name.

I added a DISCLAIMER in my footer, seen on every page in the site, that explains I do not intend to infringe on the copyright or trademark of EddieBauer. I also let them know that EddieBauer.com is the official location name for the EddieBauer website.

This doesn’t guarantee anything, but it DOES show the people at EddieBauer (should they take a look at my site) that I’m not trying to deceive visitors, I DO tell them that the site is independently owned.

On at least 2 occasions I’ve been contacted by corporations asking me to transfer my domain to them. I keep my whois privacy open so they can contact me if they please. Instead of being combative, I kindly respond to their emails and explain my position.

So what is my position? Well, essentially I am an EddieBauer fan (I do love EB Gear) who put together a site helping others like me find Eddie Bauer stuff at a discount. I’m presenting Eddie Bauer in a positive light and when it comes down to it, promoting and marketing their brand at no cost to them.

This is all 100% true.

I’d also explain that if they have specific issues with the site, I’d be happy to comply with requests to alter it’s presence. Perhaps adding “Fan Site” somewhere in the header. Whatever. Make them feel good about what you’re doing. Show them you’re providing value. Explain that you don’t want to step on their toes and would be happy to work with them.

In the end, if they demand you turn over the domain, make sure it’s really someone from the corporation. The only way to really ensure that is to ask them to send a formal request in the mail that will properly identify them. I’ve had random idiots try to scam me out of domains before.

If EddieBauer really wanted my domain… I would give it to them… I’d probably have to, actually. But, I would love to have a conversation with them first to show that I’m acting in good faith. My Disclaimer at the bottom is a good first step in showing them that I have good intentions.

Other Notes

  • You’ll notice there is no sitemap. Well, links to every single page are on the homepage anyways.
  • Some details are left out and I’m sure there are plenty of mistakes. We made this site quickly and would revisit those if the site started to pull in traffic. No need to spend a ton of time if there is no potential.
  • I might add to this if I feel like it, but for now, I’m tired of writing this post so this is all you get!

That was quick… you already get more:

Make Searches on your site display phpBay listings for the search term

It’s a simple copy/paste.

Open up search.php located in wp-content/themes/theme-you-are-using/search.php

Highlight everything from “” to “” and MAKE SURE YOU INCLUDE THOSE TWO LINES in what you highlight. Paste the below code overtop of it:

<p align="center">Your search for '<strong><font color="#FF0000"><? echo $_GET["s"] ?></font></strong>' returned the following results:</p>
<p>
<?
function phpBaySearch($term) {
    $kw = trim(urldecode($term));
    # set the number of results to return here.
    $num = 20;
    $cat = "";
    $excl = "";
    if ($kw) {
      # turn error reporting off in case of a server timeout when connecting to ebay
      # if you are having troubles, set error_reporting to (1)
      error_reporting(0);
      include(ABSPATH . "wp-content/plugins/phpBay/ebay.php");
      $ebay = new ebay();

    # set the number of auction listings to display
    if (intval($num) > 0) {
      $ebay->eb_frpp = intval($num);
    } else {
    # if number of auction listings to display is not set, then default to 10
      $ebay->eb_frpp = 10;
    }

    # if there are words to exclude in the search, assign them here.  ie "word1 word2 word3"
    if ($excl > "") {$ebay->eb_exclude = $excl;}

    # Set all global options that are stored in the phpBay Pro Admin Panel
    $ebay->eb_saaff = unhtmlentities(get_option("PB_aff_type"));
    $ebay->eb_pid = unhtmlentities(get_option("PB_ebay_pid"));
    if ($cid > "") {$ebay->eb_custom_cid = "_" . urlencode($cid);}
    $ebay->eb_cid = urlencode(get_option("PB_ebay_cid"));
    $ebay->site_url = get_bloginfo("wpurl") . "/";
    $ebay->encode = unhtmlentities(get_option("PB_encode"));
    $ebay->url_prefix = unhtmlentities(get_option("PB_url_prefix"));
    $ebay->eb_salic = unhtmlentities(get_option("PB_eb_salic"));
    $ebay->eb_saatc = unhtmlentities(get_option("PB_eb_saatc"));
    $ebay->mod_rewrite = unhtmlentities(get_option("PB_mod_rewrite"));
    $ebay->eb_aff_text = unhtmlentities(get_option("PB_aff_text"));

    # Set Country Code Information
    $ebay->eb_siteId = get_option("PB_eb_siteId");
    if ($PB_eb_siteId == "") {$PB_eb_siteId = "0";}
    if ($ebay->eb_siteId == "0") {$ebay->eb_language = "en-US";}
    if ($ebay->eb_siteId == "15") {$ebay->eb_language = "en-AU";}
    if ($ebay->eb_siteId == "16") {$ebay->eb_language = "de-AT";}
    if ($ebay->eb_siteId == "123") {$ebay->eb_language = "nl-BE";}
    if ($ebay->eb_siteId == "2") {$ebay->eb_language = "en-CA";}
    if ($ebay->eb_siteId == "71") {$ebay->eb_language = "fr-FR";}
    if ($ebay->eb_siteId == "77") {$ebay->eb_language = "de-DE";}
    if ($ebay->eb_siteId == "201") {$ebay->eb_language = "";}
    if ($ebay->eb_siteId == "203") {$ebay->eb_language = "en-IN";}
    if ($ebay->eb_siteId == "205") {$ebay->eb_language = "";}
    if ($ebay->eb_siteId == "101") {$ebay->eb_language = "it-IT";}
    if ($ebay->eb_siteId == "146") {$ebay->eb_language = "nl-NL";}
    if ($ebay->eb_siteId == "212") {$ebay->eb_language = "";}
    if ($ebay->eb_siteId == "216") {$ebay->eb_language = "";}
    if ($ebay->eb_siteId == "186") {$ebay->eb_language = "es-ES";}
    if ($ebay->eb_siteId == "193") {$ebay->eb_language = "de-CH";}
    if ($ebay->eb_siteId == "3") {$ebay->eb_language = "en-GB";}

    $PB_sort_order = get_option("PB_sort_order");
    if ($PB_sort_order == "1") {$ebay->eb_fsop = "1";$ebay->eb_fsoo = "1";}
    if ($PB_sort_order == "2") {$ebay->eb_fsop = "2";$ebay->eb_fsoo = "2";}
    if ($PB_sort_order == "3") {$ebay->eb_fsop = "3";$ebay->eb_fsoo = "1";}
    if ($PB_sort_order == "4") {$ebay->eb_fsop = "3";$ebay->eb_fsoo = "2";}

    $PB_eb_fcl = unhtmlentities(get_option("PB_eb_fcl"));
    $PB_eb_fts = unhtmlentities(get_option("PB_eb_fts"));
    $PB_eb_saprclo = unhtmlentities(get_option("PB_eb_saprclo"));
    $PB_eb_saprchi = unhtmlentities(get_option("PB_eb_saprchi"));
    $PB_eb_sabdlo = unhtmlentities(get_option("PB_eb_sabdlo"));
    $PB_eb_sabdhi = unhtmlentities(get_option("PB_eb_sabdhi"));
    $PB_eb_fspt = unhtmlentities(get_option("PB_eb_fspt"));
    $PB_eb_fpos = unhtmlentities(get_option("PB_eb_fpos"));
    $PB_eb_sadis = unhtmlentities(get_option("PB_eb_sadis"));
    $PB_eb_sasl_cb = unhtmlentities(get_option("PB_eb_sasl_cb"));
    $PB_eb_sasl = unhtmlentities(get_option("PB_eb_sasl"));
    $PB_eb_fbfmt = unhtmlentities(get_option("PB_eb_fbfmt"));

    # search items with free shipping
    $ebay->eb_ffsh = unhtmlentities(get_option("PB_eb_ffsh"));

    # ebay logo
    $ebay->logo = unhtmlentities(get_option("PB_logo"));

    # sort drop down
    $ebay->sort_by = unhtmlentities(get_option("PB_sort"));

    # alternating rows
    $ebay->row_alter = unhtmlentities(get_option("PB_row"));
    $ebay->row_odd = unhtmlentities(get_option("PB_row_odd"));
    $ebay->row_even = unhtmlentities(get_option("PB_row_even"));
    $ebay->row_hover_cb = unhtmlentities(get_option("PB_row_hover_cb"));
    $ebay->row_hover = unhtmlentities(get_option("PB_row_hover"));

    # columns
    $PB_columns_cb = unhtmlentities(get_option("PB_columns_cb"));
    if ($PB_columns_cb > "0") {$ebay->columns = unhtmlentities(get_option("PB_columns"));}

    # buy it now items
    if ($PB_eb_fbfmt == "1") {$ebay->eb_fbfmt = "1"; $ebay->eb_sabfmts = "2";}

    # items with photo only (if set to 4)
    if ($PB_eb_fcl == "4") {$ebay->eb_fcl = "4";} else {$ebay->eb_fcl = "3";}

    # search titles and descriptions (if set to 2)
    if ($PB_eb_fts == "2") {$ebay->eb_fts = "2";} else {$ebay->eb_fts = "";}

    # items by min/max bid price
    if ($PB_eb_saprclo > "") {$ebay->eb_saprclo = urlencode($PB_eb_saprclo);} else {$ebay->eb_saprclo = "";}
    if ($PB_eb_saprchi > "") {$ebay->eb_saprchi = urlencode($PB_eb_saprchi);} else {$ebay->eb_saprchi = "";}

    # items by min/max number of bids
    if ($PB_eb_sabdlo > "") {$ebay->eb_sabdlo = urlencode($PB_eb_sabdlo);$ebay->eb_fbd = "1";} else {$ebay->eb_sabdlo = "";}
    if ($PB_eb_sabdhi > "") {$ebay->eb_sabdhi = urlencode($PB_eb_sabdhi);} else {$ebay->eb_sabdhi = "";}

    # list items by zip code
    if ($PB_eb_fspt == "1") {
      $ebay->eb_fspt = urlencode($PB_eb_fspt);
      $ebay->eb_fpos = urlencode($PB_eb_fpos);
      $ebay->eb_sadis = urlencode($PB_eb_sadis);
    }

    # list tiems by specific seller id
    if (($PB_eb_sasl_cb == "1") && ($PB_eb_sasl > "")) {$ebay->eb_sasl = urlencode($PB_eb_sasl);$ebay->eb_fss = "1";} else {$ebay->eb_sasl = "";}

    # search items with free shipping
    if ($PB_eb_ffsh == "1") {$ebay->eb_ffsh = "1";}

    # pagination form
    $ebay->paginate = unhtmlentities(get_option("PB_paginate_cb"));
    $ebay->paginate_per_page = unhtmlentities(get_option("PB_paginate"));
    $ebay->page = 1;
    # each instance of the paging javascript must be unique
    $js = $ebay->jsText($kw);
    $js = str_replace("-", "", $js);
    $js = "pagenum_" . $js;
    if ($_POST["$js"] > "") {$ebay->page = intval($_POST["$js"]);}

    # sort order form
    $ebay->sort_by_value = 1;
    if ($ebay->sort_by == 1) {
      $js = $ebay->jsText($kw);
      $js = str_replace("-", "", $js);
      $js = "sortnum_" . $js;
      if ($_POST["$js"] > "") {$ebay->sort_by_value = intval($_POST["$js"]);}
      if ($ebay->sort_by_value == 1) {$ebay->eb_fsop = "1";$ebay->eb_fsoo = "1";}
      if ($ebay->sort_by_value == 2) {$ebay->eb_fsop = "2";$ebay->eb_fsoo = "2";}
      if ($ebay->sort_by_value == 3) {$ebay->eb_fsop = "3";$ebay->eb_fsoo = "1";}
      if ($ebay->sort_by_value == 4) {$ebay->eb_fsop = "3";$ebay->eb_fsoo = "2";}
    }

      # call the main ebay function, receive the listings in html and replace the phpbay tags with the content
      $ebay->listings($kw, $cat);
      $text = $ebay->html;
    }
  echo $text;
}
phpBaySearch($_GET["s"]);
?>
</p>

That should work with most themes.

19 Comments

  1. 1. 8 » PHPBAY START TO FINISH Tutorial (ebay affiliate plugin for wordpress) wrote on June 20, 2008

  2. 2. 8 » Create Ebay Affiliate site how? wrote on June 23, 2008

    [...] bans site, or a blog with tips and tricks. The only one i have found so far in my hunt is this one: http://buildandearn.com/139/phpbay-st…inish-tutorial [...]

  3. 3. No More Excuses - Part 2 - Coming Soon - WickedFire - Affiliate Marketing Forum - Internet Marketing Webmaster SEO Forum wrote on July 2, 2008

    [...] out or needed a boost in the right direction (me on both accounts). Regarding phpbay there’s an excellent tutorial already out there and this site ain’t bad either. I can’t imagine there would be all that much more [...]

  4. 4. Use PhpBay To Make An eCommerce Type Site | Melissa Eaton wrote on July 11, 2008

    [...] In my phpBay Pro Site Build Series, I said that I would include a second tutorial to make your site look like an e-commerce site. I could go ahead and create this series however there is already a great tutorial online for accomplishing this over at Eureka Diary located here: http://buildandearn.com/139/phpbay-start-to-finish-tutorial [...]

  5. 5. No Excuses - Part 2 - Page 2 - WickedFire - Affiliate Marketing Forum - Internet Marketing Webmaster SEO Forum wrote on July 11, 2008

    [...] if you’re trying to be a ‘shop’ vs. a blog (have to do that by editing the theme). Check this tutorial for good ideas – you don’t have to follow it exactly, but he explains why you’re taking out the [...]

  6. 6. eBay affiliate / Wordpress question - Thirty Day Challenge Forums wrote on July 23, 2008

    [...] customizable. Options 2: Ebay Affiliate WordPress Plugin Tool Increases Revenue Option 3: PHPBay: Start to Finish Tutorial : eurekadiary.com Options 4: This looks most interesting: TWP Auctions v3.0 beta Theres quite a few options so I [...]

  7. 7. Building A phpBay Pro Site : Succeed With phpBay wrote on August 11, 2008

    [...] The phpBay Building Tutorial [...]

  8. 8. Chuck wrote on August 24, 2008

    Very helpful tutorial. It may be best not to use trade marked names in the domain name even if they are available for purchase.

  9. 9. Alan wrote on August 25, 2008

    Fantastic!! Thank you for this information. While I have already built three phpBay stores, your post gave me a few extra ideas that I will definitely use for future sites. Thanks again, this was a great tutorial!

    -Alan

  10. 10. Frank wrote on September 10, 2008

    Great tutorial except I think I may be missing something or misreading the following part of the instructions above?

    Highlight everything from “” to “” and MAKE SURE YOU INCLUDE THOSE TWO LINES in what you highlight. Paste the below code overtop of it

    Shouldn’t there be something between the two sets of quotation marks?

    I’m lousy at coding but follow directions well so if someone could point out what those “THOSE TWO LINES” should be I’d greatly appreciate it.

  11. 11. Jay wrote on October 22, 2008

    I just bought Phpbay through your link on wickedfire. I’m fairly new to all this but im determined to make it work. Thank you for this tutorial, it has already helped me a great deal. However, I seem to be stuck at editing the header. Any chance you could go into some more detail regarding that part. Thanks

  12. 12. andrew wrote on November 7, 2008

    which lines does that search code go between?

  13. 13. Frank wrote on November 16, 2008

    Andrew

    Check out this link:

    http://www.bwjohnson.co.uk/category/phpbay-pro-specific/page/2

    I think it answerers our question. Haven’t had a chance to try it yet but I’m guessing it will.

  14. 14. Janet Lloyd wrote on November 18, 2008

    Thanks Frank, that worked.
    Brilliant Tutorial

  15. 15. Frank wrote on November 21, 2008

    Always happy to help out.

    Good luck!

  16. 16. Lane wrote on November 29, 2008

    Thanks for the incredibly detailed and comprehensive explanation about setting up a phpBay site. I have been using that same theme on a phpBay site using version 3.0.8. My text doesn’t display as nicely as yours.

    You mentioned that your site looked a little different because it was using phpBay 2.5.1. I like the way your watched section displayed the information. I’ve only seen that layout on the API version, not on the WP plugin version.

    How are you able to have your auctions displayed as they are in the Watches section. I like that layout much better than the way mine is displayed. Mine shows the P (for pay pal), the Buy It Now logo, and the explanation of the auction text is poorly displayed (all scrunched together). Do you have any suggestions for better display (besides using columns)?

    thanks

  17. 17. jbin2009 wrote on April 9, 2009

    If you are using the LimauOrange theme, have phpBay 3.0 and have WP 2.7.1 installed, you can get the search function to work by pasting the following code into the search.php file:

    (IMPORTANT NOTE: Overwrite the entire file with the following code, save and go back to your store page. Refresh the page and enter your search term or item name. You will see the search results. Good Luck!)

    Search Results

    Your search for ‘‘ returned the following results:

    No posts found. Try a different search?

  18. 18. jbin2009 wrote on April 9, 2009

    That was wierd, the code is between the hash marks….

    ////////////////////

    Search Results

    Your search for ‘‘ returned the following results:

    No posts found. Try a different search?

    ////////////////////

  19. 19. Jackson wrote on September 2, 2009

    Thanks for the awesome tutorial. I’ve been looking for something like this for a while, that has a step by step. You’ve really helped me out, thank you so much!

Sorry, the comment form is closed at this time.