View Single Post
  #2  
Old 10-25-2014, 10:01 AM
 
notgrass notgrass is offline
 

Advanced Member
  
Join Date: Dec 2011
Location: Tennessee
Posts: 33
 

Default 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.
__________________
X-Cart v4.6.5
www.notgrass.com/notgrass/
Reply With Quote