=' . $low . ' and ' . 'p.products_price_sorter<=' . $high; $prvKey = $key; // attributes } else { if($key != $prvHaving) { if($prvHaving != '') { $having .= ') and ('; } else { $having .= 'HAVING ('; } } else { $having .= ' or '; } $having .= ' FIND_IN_SET("' . $key . $value . '", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name)))'; $filter_attr = true; $prvHaving = $key; } } } } if($filter != '') $filter .= ')'; if($having != '') $having .= ')'; if($filter_attr == true && defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK')) $filter .= ' AND p2as.quantity > 0 AND FIND_IN_SET(p2a.products_attributes_id, p2as.stock_attributes)'; ?>