Re: Exclude Products from Products Map
The code in modules/Products_Map/func.php changed in v4.6. I changed this code in the pmap_get_products($symb) function:
if ($symb == '0-9') {
$query['query'] = " AND $sql_tbl[products_lng_current].product REGEXP '^[{$symb}]' AND INSTR($sql_tbl[products_lng_current].product,'Clearance') = 0";
} else {
$query['query'] = " AND $sql_tbl[products_lng_current].product LIKE '" . addslashes($symb) . "%' AND INSTR($sql_tbl[products_lng_current].product,'Clearance') = 0";
}
It wasn't working to check the product code, so I checked the product title for the word "Clearance" to exclude those products from the Products Map.
|