Hack 46 Allow Visitors to Search Through Your Auctions


Put an HTML search form in your auction
description to make it easier for your customers to find other items
you're selling.
The "View
seller's other items" link on
auction pages leaves a lot to be desired. Lacking the flexibility of
standard search results or category listings, it simply lists your
other running auctions with no convenient way for bidders to search
through the titles, and no way at all for bidders to search your
descriptions.[3] Since
you'll get more money for items that are easier to
find, a seller search box right in your description will help
advertise your other auctions. Figure 4-10 shows a
custom search-by-seller box preconfigured to show only your auctions.
[Hack #12] for a few tricks for bidders using
this page. Sellers can also open an eBay Store [Hack #72] to add some functionality to their
lists of running auctions at an added cost.
Figure 4-10. A search-by-seller box in your auctions helps promote your other items

To put this box in your auction, simply place the following code
somewhere in your auction description:
<table cellpadding=0 cellspacing=0 border=0 width=150><tr>
<td bgcolor="#ffcc00" rowspan=2 width=1%>
<img src="/image/library/english/10062_s.gif" width=2></td>
<td height=2 bgcolor="#ffcc00" valign=top width=98%>
<img src="/image/library/english/10062_s.gif"></td>
<td background="http://pics.ebay.com/aw/pics/listings/sliver_1x22.gif"
rowspan=2 valign=top align=right width=1%>
<img src="/image/library/english/10062_yellcurve_22x20.gif"
width=22 height=21 align=top></td></tr>
<tr><td colspan=3 bgcolor="#ffe680">
<font size=2 face="arial, helvetica, sans-serif">
<b>Search This Seller</b></font></td></tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width=150>
<tr><td bgcolor="#ffcc00" width=1%>
<img src="/image/library/english/10062_s.gif" width=2></td>
<td width=2> </td><td width=98%>
<form action="http://cgi6.ebay.com/aw-cgi/ebayisapi.dll" method=post> [1]
<input type=hidden name="MfcISAPICommand" value="SearchBySellerReDirect">
<input type=hidden name="include" value="1">
<input type=hidden name="sellerList" value="my_user_id"> [2]
<table cellpadding=1 cellspacing=0 border=0 width=100%>
<tr><td colspan=2>
<input maxlength=300 name="searchTitle" size=17 value="> [3]
</td></tr><tr><td valign=top>
<input type=checkbox name="descriptionSearch"> [4]
</td><td><font size=1 face="Verdana, Arial, Helvetica, sans-serif">
in titles & descriptions</font>
</td></tr>
<tr><td colspan=2>
<input type=submit value="Search">
</td></tr><tr><td colspan=2 height=3>
<img src="/image/library/english/10062_s.gif"></td></tr>
</table>
</form> [5]
</td><td bgcolor="#ffcc00" width=1%>
<img src="/image/library/english/10062_s.gif" width=2></td>
</tr><tr><td bgcolor="#ffcc00" colspan=4 height=2 width=1%>
<img src="/image/library/english/10062_s.gif" width=2>
</td></tr></table>
Simply replace my_user_id on line [2]
with your own user ID to confine the search results to your own
running auctions. The code can otherwise be used exactly as is.
Since this box has a genuine eBay look, complete with the yellow
lines and even the "in titles &
descriptions" checkbox, it's
somewhat more complicated than it needs to be. In fact, the actual
search form is comprised only of the code between lines
[1] and [5]. But the official eBay appearance
will make your bidders more comfortable using it, and will make your
auction look more professional.
4.15.1 Hacking the Hack
Naturally, you can customize your search box to suit the style of
your auctions by replacing all the code above line [1] and
below line [5] with a custom table, such as the one
described in [Hack #40]. Just be
careful about the code in the
<form></form> structure.
As it is, the box will appear left-justified in your auction
description. To center it, simply place a
<center> tag at the beginning and a
</center> tag at the end. Although you can
similarly right-justify the box by placing the code between
<p align=right> and
</p> tags, it's better to
place it all inside a floating table instead so
that the rest of your text wraps around it. Just place the following
code at the beginning:
<table cellpadding=0 cellspacing=0 border=0 align=right hspace=4>
<tr><td>
and then close this table with the following code at the end:
</td></tr></table>
Don't let your bidders forget where they came from.
Instead of the search results appearing in the same window, you can
have the search open a new window simply by adding the
target=_blank parameter to the
<form> tag on line [1], like
this:
<form action="http://cgi6.ebay.com/aw-cgi/ebayisapi.dll" method=post target=_blank>
To turn on the "in titles &
descriptions" checkbox by default, which will most
likely increase the number of search results your bidders see (and
improve the exposure of the corresponding auctions), just add the
checked parameter to the <input> tag on line
[4], like this:
<input type=checkbox name="descriptionSearch" checked>
Finally, if you have a lot of different auctions open concurrently,
you may want to help your bidders out by suggesting a search query.
For instance, if you're selling a wireless phone
product, you may want to pre-enter the search word
"wireless" in the search field
(line [3]):
<input maxlength=300 name="searchTitle" size=17 value="wireless">
Although this will likely reduce the number of search results your
bidders see, it will show them more targeted, relevant auctions that
are more likely to interest them. In this way,
you'll have a chance to sell multiple items to a
buyer who otherwise would've purchased only a single
item from you.