Search results issue and query


https://forum.kartris.com/Topic1514.aspx
Print Topic | Close Window

By amscompanies - Fri 13 Jan 2012
When I do a search for something I KNOW is on my store, it returns the result but states:

Your search for 'arsenal' produced 0 match(es)

How can I get the results to ONLY display items that have a quantity greater than 0
By saturation - Fri 13 Jan 2012
I can't say for sure, but I'm guessing you'll need to find the code that evaluates the search results and puts an if statement in there telling it to only return if it's greater than 0.
By Mohammad - Sun 15 Jan 2012
You need to modify the search stored procedure in order to do that.

Quantities are linked to versions not directly to products, so if you have multiple versions product that could slow down your search - anyway, you need to make sure that the products returned are exist in the result of the below query:
"SELECT DISTINCT V_ProductID FROM tblKartrisVersions WHERE V_Quantity > 0" 

A better solution is to set all the out of stock products as "Not Live" and automatically they will appear in the search results.