[MOD] Admin>Product>Search : On product Name or SKU
Posted: Wed Jul 28, 2010 2:32 pm
This Mod allows you to search your product list based on a part of the SKU rather than having to know the whole thing.
Open: /admin/includes/classes/class.product.php
Find:
Replace with:
For 5.5.2 it's subtly different so try this...
Find:
Replace with:
Open: /admin/includes/classes/class.product.php
Find:
Code: Select all
$queryWhere .= "OR lower(ps.prodcode) = '" . $GLOBALS['ISC_CLASS_DB']->Quote($search_query) . "' ";
Code: Select all
//MOD Search using partial SKU
//$queryWhere .= "OR lower(ps.prodcode) = '" . $GLOBALS['ISC_CLASS_DB']->Quote($search_query) . "' ";
$queryWhere .= "OR lower(ps.prodcode) like '%" . $GLOBALS['ISC_CLASS_DB']->Quote($search_query) . "%' ";
//MOD END Search using partial SKU
For 5.5.2 it's subtly different so try this...
Find:
Code: Select all
$queryWhere .= "OR ps.prodcode = '" . $GLOBALS['ISC_CLASS_DB']->Quote($search_query) . "' ";
Code: Select all
//MOD Search using partial SKU
//$queryWhere .= "OR ps.prodcode = '" . $GLOBALS['ISC_CLASS_DB']->Quote($search_query) . "' ";
$queryWhere .= "OR ps.prodcode like '%" . $GLOBALS['ISC_CLASS_DB']->Quote($search_query) . "%' ";
//MOD END Search using partial SKU