Industry guru Dave Taylor offers tech support on technical and business topics, including iPhone, iPod, Microsoft Windows, Sony PSP, cellphones, online advertising, CSS, Web design, business, Unix, Linux, SEO, Mac OS X, and shell script programming.     


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?


More Useful Auctions and Online Shopping Articles:
✔   How can I sell a used gadget on Amazon.com?
I have a bunch of electronic gadgets in my office that are just sitting around and I notice that they're worth a decent...
✔   How do I return something to Amazon.com?
Hey Dave, I bought a new backpack through Amazon.com and when it arrived, I realized I didn't like it and really want to...
✔   What annual subscriptions do I have set up in PayPal?
As it's the last day of the year, I'm thinking about recurring billing that's going to kick in starting again in 2013 through...
✔   What's a used computer really worth?
Hi Dave. I bumped into this note on Facebook, a post from a friend: "Thinking about selling my 17" MacBook Pro. It's 3...
✔   How long have I been a member of eBay?
I was arguing with a friend the other day and he said that he'd been on eBay since it first came online. I...

Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
    Enter your name: and your email addr:  





Categorized: Auctions and Online Shopping , HTML, JavaScript and Web Site Programming   (Article 8650, Written by )
Tagged: ebay, ebay merchant, hacking, online auctions, reverse engineering
Previous: Can an eBay seller really cancel a transaction?
Next: How can I tell if an eBay Second Chance Offer is legit?




Reader Comments To Date: 25

Itamar said, on December 14, 2008 1:01 PM:

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.

Abbas said, on December 17, 2008 9:36 AM:

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!

Dave Taylor said, on December 17, 2008 11:43 AM:

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

abbas said, on January 21, 2009 5: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!

Josh said, on February 22, 2009 1:09 PM:

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

ebay shop design said, on April 7, 2009 8:55 AM:

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);
}

david said, on April 8, 2009 1:39 PM:

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

david said, on April 8, 2009 2:00 PM:

I guess I will just answer my own question.

add the following into the html

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

ebay shop design said, on April 17, 2009 10:28 AM:

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

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

Cheers!

Dave said, on June 30, 2009 3:13 PM:

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 :)

cb said, on July 1, 2009 10:32 AM:

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.

Simon said, on July 10, 2009 9:43 AM:

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

brian said, on August 31, 2009 7:37 PM:

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.

disco said, on September 3, 2009 2:13 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?

ebay store design said, on October 16, 2009 10:27 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!

Chris said, on June 9, 2010 5:20 PM:

Hi Dave,

Not sure if this thread is still active or not, but i'm hoping you can help me.

I am wanting to create a customized search feature that searches my stores items & descriptions by default without the option of the titels & descriptions checkbox.

I'm also wanting to use the code on all my auction pages, i'm guessing this will be ok?

Thanks in advance!

Chris said, on June 9, 2010 5:23 PM:

Dave,

I just stumbled across your answer regarding hiding the checkbox option.

Too easy!

Jake said, on November 2, 2011 12:09 PM:

The search titles and item description check box no longer works. Does anyone know a way to get it to work?

This value included in the search html no longer works:

<input type="checkbox" name="srchdesc" value="y">

Jake said, on November 2, 2011 12:12 PM:

Looks like it won't let me post the html code for the check box. Its literally the last input type line of html code from Dave's original post before the form is closed.

Dave Bowman said, on January 29, 2013 9:52 AM:

I use turbo lister and I have written a script in TCL to read a csv and create the turbo lister file

I have added the following

append info ""
append info ""
append info ""
append info ""


I get the search box - with the word Submit in it. I change that to say BASINSTOKE and press enter
What is returned is EVERY item (19000+) rather than items containing BASINSTOKE

What am I doing wrong

Dave Bowman said, on January 29, 2013 9:55 AM:

Just noticed the code between the "" got removed
but basically it was exactly as per Abbas said on 19th Dec

Mark said, on February 19, 2013 6:17 PM:

Is there's a way to custom my result page on ebay? when I try to search a product to my store, the result is on a plain page, without the banner,left bar and the footer. is there's a code that holds the search result and put it on a custom pages so that when a customer use my store they will see one design only,


Thanks in advance.

wiyono said, on March 22, 2013 3:01 PM:

can you tell me how to make custom footer?
Thank you

Mark said, on April 12, 2013 1:14 AM:

Hi, i have a problem regarding ebay search, I already done with my custom search engine, the problem is when i tried to search my store using my custom search engine, the result is on the old template that we have on our ebay store. How to put the search result in my template.? so that it will have 1 design on template. Thanks! Please Advice

Mark said, on April 16, 2013 5:56 PM:

Hi Dave,

How can i modify the result page for search.? to become same as the template that i have on my store. So that if i use to search a product using my custom code the result will be like on same page.


Thanks!

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, Dave, for all your helpful information by buying you a cup of coffee!

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











I will never send you any unsolicited email. Ever.






Check This Out Too...

 
Look for Answers
Need Help? Ask Dave Taylor!


Follow Me on Pinterest

Find Me on Google+
ADT on G+
© 2002 - 2013 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. Further, 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. My lawyer says "Thanks".
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.