OpenSearch

Last updated

OpenSearch is a collection of technologies that allows publishing search results in a format suitable for syndication and aggregation. It is a way for websites and search engines to publish search results in a standard and accessible format.

Wikipedia about OpenSearch: http://en.wikipedia.org/wiki/OpenSearch

Official website: http://www.opensearch.org/Home

How to add OpenSearch support to your Ecwid store

  1. Create an opensearch.xml text file with the following content:

 <?xml version="1.0" encoding="UTF-8"?>  <OpenSearchDescription 
xmlns="http://a9.com/-/spec/opensearch/1.1/"> 
 <ShortName>Store Name </ShortName> <Description>Description </Description> 
<Image width="16" height="16" type="image/x-icon">SITE_URL/favicon.ico 
</Image>  <Url type="text/html" template="STORE_URL#ecwid:keywords=searchTerms}
&mode=search& offset=0&sort=relevance"/>  </OpenSearchDescription> 

where

  • Store Name is your store name
  • Description is the description of your store and site
  • SITE_URL is your site domain. For example 'https://example.com'
  • STORE_URL is the URL of the page where Ecwid store is installed. For example 'https://example.com/store.html'.

Example of an XML file:


<?xml version="1.0" encoding="UTF-8"?> <OpenSearchDescription 
xmlns="http://a9.com/-/spec/opensearch/1.1/">
 <ShortName>My Cool Store</ShortName> 
<Description>We sell cool products.</Description>
 <Image width="16" height="16" 
type="image/x-icon">http://example.com/favicon.ico</Image>
 <Url type="text/html" 
template="http://example.com/store.html#ecwid:keywords={searchTerms}&
mode=search&offset=0&sort=relevance"/> </OpenSearchDescription> 
    1. Upload this file to the root web directory of your site. Usually it's httpdocs or htdocs or public_html directory.
    2. Add the following line to each page of your site between the head tags.

 <link rel=search href="/SITE_URL/opensearch.xml" title="Your_Store_Search" 
type="application/opensearchdescription+xml"> 

You should replace SITE_URL with your site's domain(with the http:// prefix) and Your_Store_Search with the name of your store's search or the name of your site.</p.

E.g.:


 <link rel=search href="/http://example.com/opensearch.xml" title="Cool Store Search" 
type="application/opensearchdescription+xml">  

That's all.

As an addition you can submit your search plugin here: 

Back to top
Has the article answered your question?

Awesome! Thanks for your feedback!

Please send us that question. We will be happy to help by email.

Send a message