Customzing Customer Search Bar Results

General ShopSite user discussion

Customzing Customer Search Bar Results

Postby jontaco » Mon Feb 21, 2011 2:06 pm

I am working on customizing a search bar for my customers.

Here is the page where you will find the search bar on the left side above the navigation bar:
http://mulberrystreetgifts.com/store/TEST_2011Spring.php

However, I performed a test search as a customer would, and noticed something missing.

If I were a customer and I did a product search, but my search returned nothing, I would want to know that right away.
However, my current search engine does not show anything if I perform a search for a product that does not exist. This needs to be explicit.

If you do a search for something random, like "yyyyyyyyyy", the results page does not say something explicit, like "Your search returned no results".
I have seen this feature added in Demo Shopsite WebSites, but I have not found how to add it on my own.

Does anyone know how to add an explicit statement, like "Your Search Returned No Results"?

Thanks
jontaco
 
Posts: 39
Joined: Sun Apr 20, 2008 8:05 pm
Location: Huntsville, AL

Re: Customzing Customer Search Bar Results

Postby Jim » Mon Feb 21, 2011 8:50 pm

Here is the code from the basicsearch.sst that displays the search results and if no results are found the message the merchant configured for no results.
======================================
<table border="0" cellpadding="3" width="100%" id="search_results">
[-- VAR.pa_search_result "false" --]
<tr>
<td colspan="3">
[-- LOOP SEARCH --]

[-- SEARCHRESULT --]

[-- VAR.pa_search_result "true" --]
[-- END_LOOP SEARCH--]
</td>
</tr>
[-- IF VAR.pa_search_result "false" --]
<tr>
<td align="left" valign="top" colspan="3">[-- STORE.88 --] [-- SEARCHSTRING --]</td>
</tr>
[-- END_IF --]

[-- IF VAR.Quantityproduct "yes" --]
<tr>
<td colspan="3">
[-- Store.QuantityPricingFlag --] [-- Store.QuantityPricingMsg --]
</td>
</tr>
[-- END_IF --]

[-- IF VAR.Variableproduct "yes" --]
<tr>
<td colspan="3">
[-- Store.VariablePricingFlag --] [-- Store.VariablePricingMsg --]
</td>
</tr>
[-- END_IF --]
</table>
======================================

The code [-- VAR.pa_search_result "false" --] sets a variable to tell if any products were found for the search
In the [-- Loop Search --] section the [-- VAR.pa_search_result "true" --] sets the variable to true meaning that some search result was found.
After the loop has finished this code
[-- IF VAR.pa_search_result "false" --]
<tr>
<td align="left" valign="top" colspan="3">[-- STORE.88 --] [-- SEARCHSTRING --]</td>
</tr>
[-- END_IF --]

outputs the text indicating that there were no search results for the word that was searched for.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: Bing [Bot] and 111 guests

cron