Error filtering template: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'at_sale.value' in 'where clause', query was: SELECT COUNT(DISTINCT e.entity_id) FROM `catalog_product_flat_5` AS `e` INNER JOIN `catalog_category_product_index_store5` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=5 AND cat_index.visibility IN(2, 4) AND cat_index.category_id=34 INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.customer_group_id = 0 AND price_index.website_id = '5' INNER JOIN `cataloginventory_stock_status` AS `stock_status_index` ON e.entity_id = stock_status_index.product_id AND stock_status_index.website_id = 0 AND stock_status_index.stock_id = 1 WHERE (e.entity_id IN('71', '33', '8146', '8141', '39', '72', '20889', '50', '12', '85', '78', '86', '131', '90', '32', '19204', '27', '22', '20849', '13967', '58', '75', '69', '20885', '20876', '68', '62', '31', '76', '10', '55', '23', '18', '7955', '49', '8043', '8056', '21245', '83', '13', '8005', '98', '103', '9', '20883', '14', '119', '37', '20872', '38', '25', '87', '80', '8136', '108', '51', '20874', '7009', '26', '70', '7275', '41', '53', '44', '13288', '60', '15', '17', '8', '88', '7865', '7452', '82', '93', '7996', '16', '8131', '46', '36', '7834', '35', '8069', '13286', '114', '19', '59', '20', '63', '105', '11', '64', '24', '56', '96', '6920', '45', '7142', '113', '13239', '101', '13284', '20868', '77', '28', '66', '20881', '13236', '65', '8030', '40', '34', '21', '57', '67', '7820', '54', '81', '20879', '21246', '52', '8129', '47')) AND (((at_sale.value = 1) OR (IF(at_special_from_date.value_id > 0, at_special_from_date.value, at_special_from_date_default.value) <= '2021-05-12 23:59:59') AND (((((IF(at_special_to_date.value_id > 0, at_special_to_date.value, at_special_to_date_default.value) >= '2021-05-12 00:00:00') OR (IF(at_special_to_date.value_id > 0, at_special_to_date.value, at_special_to_date_default.value) IS null))))))) AND (stock_status_index.stock_status = 1)