Totally Zenned
- Join Date:
- Feb 2007
- Location:
- Pennsylvania
- Posts:
- 856
- Plugin Contributions:
- 0
Isolating Part Number in Search Term
Hey All,
In ZC 2.2.2. At a complete loss here. So customers often use very long search terms which do include a model number. What I figured would be pretty simple is actually turning out to be quite a challenge. I've tried working in the includes/modules/pages/search_result/header_php.php as well as classes/class.search.php and I could really use some help here.
This was my plan to basically find a model number included in a search term and essentially change the search term to be just that model number.
$kewordTerms = explode(' ', $_GET['keyword']);
foreach($kewordTerms as $thisKeyword){
$modelMatch = $db->Execute("SELECT products_id as COUNT from products where products_model = '".$thisKeyword."'");
if($modelMatch){$keywords= $thisKeyword;}
}
For example, we have a customer search for microsoft wireless mouse MS12399 for win11 desktop pc. Now we do carry the MS12399, but the customer is taken to the search page and given the message "Warning There is no product that matches the search criteria." I would rather he were taken to the product page for the MS12399 mouse.
Please help.
Thank you,
John