Unknown column 'stockterm' in 'field list'
SELECT SQL_CALC_FOUND_ROWS p.*, IF(stockterm < 3, 1, 0 ) AS is_stock, IF(ordering_available > 0, 1, 0 ) AS is_buy, IF(Price > 0, 1, 0 ) AS is_price, name_ru AS _name_sort FROM SC_products p WHERE (categoryID IN (690)) AND ( enabled=1) ORDER BY is_buy DESC, is_price DESC, is_stock DESC, sort_order, _name_sort ASC LIMIT 0,100