PDA

View Full Version : Advanced Search - Attributes



michael_s
03-01-2012, 10:50 PM
in the instant search the returned results will include products which have been set inactive in the catalog admin area.

in older versions the facilaty to turn a products status off may not have existed so ive only included this as a information file not a complete package.

this bug is very easy to fix - see below



in searches.php replace


$sqlquery = "SELECT distinct(p.products_id),
pd.products_name,
p.products_price,
p.products_tax_class_id
FROM " . TABLE_PRODUCTS_DESCRIPTION . " pd,
" . TABLE_PRODUCTS ." p
WHERE" . $like_statement . " AND
pd.products_id = p.products_id";


with

$sqlquery = "SELECT distinct(p.products_id),
pd.products_name,
p.products_price,
p.products_tax_class_id
FROM " . TABLE_PRODUCTS_DESCRIPTION . " pd,
" . TABLE_PRODUCTS ." p
WHERE" . $like_statement . " AND
pd.products_id = p.products_id AND p.products_status =1";

More... (http://addons.oscommerce.com/info/7985)