Industry guru Dave Taylor offers free tech support on a wide variety of technical and business topics, including HTML, Apple iPhone, online advertising, Cascading Style Sheets, Web design, management, Unix, Linux, search engine optimization, online dating, Mac OS X, shell script programming and Microsoft Windows.

How do I make a "Search my eBay Store" search box?

I wanted to implement a similar thing to what you show on add a custom eBay search box to your site on my eBay store site, but I'd rather have a neat little box in a position of my choice, instead of using the ugly default eBay side menu. Is there a way to customise the search form so it only searches within my eBay store? Thanks in advance for any help you can offer!


Dave's Answer:

Great question, and I have done a lot of digging and reverse engineering of the eBay search forms. The reality is that this is perhaps the most complicated form I've seen on eBay because they don't do anything simple like have the merchant shown by name or even a merchant ID, but instead have a cryptic "sasel" value that does uniquely identify eBay merchants, but is darn hard to figure out.

Here's what I did...

I started by going onto the eBay site and doing a search for something, anything. I picked "casablanca". Then I clicked on the "Stores" tab so that I was looking at matches from eBay Store merchants.

Now I clicked on one of the matching entries, taking me to a merchant called "signedpictures". On any eBay listing from an eBay Store merchant, there's:

ebay meet the seller

Click on the "Visit seller's Store" link and you'll now see all of their current listings.

On that merchant page, there's a search form:

ebay search merchant store

What we want to do here is do a search, any search. Now, from the search results page, search again. (I warned you this was pretty darn complex!). For example, when I searched - twice - for "photo" on "signedpictures" account, the resultant address of the second search results page is:

http://search.stores.ebay.co/signedpictures_photo_W0QQfcdZ2QQfciZQ2d1QQfclZ4QQfromZR10Q
    QfsnZsignedpicturesQQfsooZ1QQfsopZ1QQsaselZ33440996QQsofpZ0

Ugly and complex as heck, right? But the magic numeric value we seek is embedded in that URL. Here's just the last portion of it with the sasel value (which appears to only be digits) highlighted:

http://search.stores.ebay.com/ ... 1QQsaselZ33440996QQsofpZ0

The "sasel" number? In this case, it's 33440996.

Now, armed with that, here's the form (that I figured out after much experimentation!)

<form name="search" method="get"
action="http://search.stores.ebay.com/search/search.dll?GetResult&">
<input type="text" name="query" maxlength="300" >
<input type="hidden" name="fcd" value="2">
<input type="hidden" name="from" value="R10">
<input type="hidden" name="sasel" value="33440996">
<input name="submit" type="submit" value="Search">
<br />
<input type="checkbox" name="srchdesc" value="y">search titles & descriptions
</form>

Complicated, eh? You can see in the middle the spot where I've added the proper "sasel" value for this to search that eBay merchant store. I highlighted it in red.

This is a rudimentary, fairly unattractive form, but it works, and making it pretty is the easy part.

I hope this is clear and helps you figure out how to identify your own store's "sasel" number and create a form that you can add anywhere on the Web to let people easily search your own merchant store.

And, eBay, how come this is so darn complicated anyway?



Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Stumble Upon    

Subscribe!

Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.

Comments

In the first line of code that began with:

http://search.stores.ebay.co

You forgot the "m" in the ".com" part of the URL.

Posted by: Itamar at December 14, 2008 1:01 PM

Hi,
Actually it aint that complicated.

The search form is as simple as 4 lines of code as shown below.

<form name="search" method="get" style="display: inline;" action="http://search.stores.ebay.com/search/search.dll?GetResult">

<input name="sid" value="26433158" type="hidden">
<input name="submit" id="submit" value="Submit">

</form>


You only have to replace the SID (store id) with yours!

As simple as that!

enjoy!

Posted by: Abbas at December 17, 2008 9:36 AM

That's great to know. Thanks!! Now, how do you figure out your SID?

Posted by: Dave Taylor at December 17, 2008 11:43 AM

Hi Dave,

You can get the store id by hovering over "visit my store" within your "my ebay page".

Ping me if you have any queries :-)

Cheers!

Posted by: abbas at January 21, 2009 5:43 AM

This is great! One question though, is there any way to customize the results page?

On my shop I have all the content centered using CSS, however the search results just take up the whole page. Is there a way to maintain the theme I've created for the rest of my shop?

Massive thanks,

Josh

Posted by: Josh at February 22, 2009 1:09 PM

Hi Josh,

Yes you can!!
:-)

What is your shop id?
Basically, ebay store customization is not that tough. It revolves around tweaking the CSS.

Use this code to size your ebay store

.pagewidth
{
width:980px;
text-align:left;
margin:0px auto 10px auto;
}

.pagecontainer
{
background:url(storebg.jpg);
}

Posted by: ebay shop design at April 7, 2009 8:55 AM

Hi! thanks a lot.

Now the question is: how about a search box for those sellers who don't have a ebay store?

In adavance search, there is an option where you can specify the sellers. I have tried to decode those, guess I am not as smart as I thought I am. : )

David

Posted by: david at April 8, 2009 1:39 PM

I guess I will just answer my own question.

add the following into the html

<input type="hidden" name="userid" value="xxxxx" />

Posted by: david at April 8, 2009 2:00 PM

Thats even simple!
http://shop.ebay.com/merchant/YOUR_USERID_HERE

Just append the search term to the right of this url ..

Cheers!

Posted by: ebay shop design at April 17, 2009 10:28 AM

Worth noting that on ebay.co.uk it's often found under the sid tag rather than sasel, although of course they are the same thing :)

Posted by: Dave at June 30, 2009 3:13 PM

Please tell what I need to do to make my eBay store fit the mobi format. I have put the link to my eBay store on the product page, but have been told that it takes way to long to load for a blackberry user. I know they can add apps for an eBay search, but I would like to know if I can do something for my mobi website and just my eBay store. Thank you for your time.

Posted by: cb at July 1, 2009 10:32 AM

To my my store id for Ebay UK I had to go into 'manage my store', then hover over the red store link.

Posted by: Simon at July 10, 2009 9:43 AM

Is there any way to use this search box while using a custom search button which matches the look of my store. I have the search button as an image and i want to add a search of my entire store with my custom search button. thanks.

Posted by: brian at August 31, 2009 7:37 PM

Thanks for this - just what I was looking for.

One question though. How do I check which eBay site the user is on (eg .com / .co.uk) and amend the URL accordingly?

Posted by: disco at September 3, 2009 2:13 PM

@brian: yes you can "style" the existing 'shop search' button on ebay and display your own image instead of their boring button!

All you have to do is, create a CSS style and embed it in your shop header:


#LeftPanel td.v4mid input {}

Make sure to set the border as 0!

Posted by: ebay store design at October 16, 2009 10:27 PM

I have something to say, now that you mention it, but ...
Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you for all your efforts on this Web site by buying you a cup of coffee!

I do have a comment, now that you mention it!











Remember personal info?


Please note that I will never send you any unsolicited email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.








Ask Dave Taylor: The iPhone App: Advertisement



Follow me on Twitter @DaveTaylor

Search
Find just the answers you seek from among our 2300+ free tech support articles by using our Lijit search engine.


Help!





Subscribe to
Ask Dave Taylor!

Add to Google Reader
Add to My Yahoo!
Subscribe in NewsGator Online

RDF   XML

Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.


Recent Entries
Book Links
© 2002 - 2010 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.