Search behavior in eCommerce

Options

The search function is quite useful in eCommerce but doesn't behave as our customers would expect.

From a store homepage or catalog page, search appears to search all items and display the results--great!

But when the user has selected a particular category of product, search appears to only search WITHIN that category. What's worse, in this situation the search returns a message along the lines of "no items were found," definitely a recepie for sales success. As far as I can figure, to go back to the global item search requires the user to navigate back to the store homepage or full product listing page. This is confusing for people.

Anyone know how to change this behavior so that a search request is always searching the full item catalog, no matter what part of the store the user is currently viewing?

Tagged:

Comments

  • I'd like to second this question.

    We have the same usability issue with the search.

  • gperry :

    I'd like to second this question.

    We have the same usability issue with the search.

    There is no option to do this within the store configuration, but it is possible using a little Javascript. Edit your store, go to "Configure Pages", and select the "Catalog Page". In the HTML area, add the following:

    <script type="text/javascript">

    addOnLoadHandler(function(){

        var eCommerceSearch=document.getElementById('CatalogBottom').action;

        if(eCommerceSearch.indexOf('?')==-1){

            document.getElementById('CatalogSearch').action=eCommerceSearch+'?FOLDER=0';

        }

        else{

            document.getElementById('CatalogSearch').action=eCommerceSearch+'&FOLDER=0';

        }

    });

    </script>

    This will make it so that regardless of what category you are viewing, the search will be performed on All Products.

    A related issue is that when you perform a search, then click on one of the product categories in the "Browse", your search is retained. If you'd like to get around this, you can expand the Javascript above:



    <script type="text/javascript">

    addOnLoadHandler(function(){

        var eCommerceSearch=document.getElementById('CatalogBottom').action;

        if(eCommerceSearch.indexOf('?')==-1){

            document.getElementById('CatalogSearch').action=eCommerceSearch+'?FOLDER=0';

        }

        else{

            document.getElementById('CatalogSearch').action=eCommerceSearch+'&FOLDER=0';

        }

        var i,allLinks;

        allLinks=document.getElementsByTagName('a');

        for(i in allLinks){

            if(allLinks.className=='ShoppingBrowse'){

                allLinks
    .href=allLinks.href+'&NAME=&PRICE=&TYPE=';

            }

        }

    });

    </script>

    This will make it so that the search is performed on All Products AND the category links will all reset the search fields when clicked.

  • Noah Cooper:

    There is no option to do this within the store configuration, but it is possible using a little Javascript. Edit your store, go to "Configure Pages", and select the "Catalog Page". In the HTML area, add the following:

    <script type="text/javascript">

    addOnLoadHandler(function(){

        var eCommerceSearch=document.getElementById('CatalogBottom').action;

        if(eCommerceSearch.indexOf('?')==-1){

            document.getElementById('CatalogSearch').action=eCommerceSearch+'?FOLDER=0';

        }

        else{

            document.getElementById('CatalogSearch').action=eCommerceSearch+'&FOLDER=0';

        }

    });

    </script>

    This will make it so that regardless of what category you are viewing, the search will be performed on All Products.

    A related issue is that when you perform a search, then click on one of the product categories in the "Browse", your search is retained. If you'd like to get around this, you can expand the Javascript above:



    <script type="text/javascript">

    addOnLoadHandler(function(){

        var eCommerceSearch=document.getElementById('CatalogBottom').action;

        if(eCommerceSearch.indexOf('?')==-1){

            document.getElementById('CatalogSearch').action=eCommerceSearch+'?FOLDER=0';

        }

        else{

            document.getElementById('CatalogSearch').action=eCommerceSearch+'&FOLDER=0';

        }

        var i,allLinks;

        allLinks=document.getElementsByTagName('a');

        for(i in allLinks){

            if(allLinks.className=='ShoppingBrowse'){

                allLinks
    .href=allLinks.href+'&NAME=&PRICE=&TYPE=';

            }

        }

    });

    </script>

    This will make it so that the search is performed on All Products AND the category links will all reset the search fields when clicked.

    One thing to note: the current ActiveX WYSIWYG will delete Javascript, so in order to use this you'd have to disable the WYSIWYG before editing the Catalog Page. After the Summer '09 release, the new TinyMCE WYSIWYG will not delete Javascript so you would be able to edit the page with the WYSIWYG enabled.

Categories