Error filtering template: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JOIN `cataloginventory_stock_status` AS `stock_status_index` ON e.entity_id = st' at line 3, query was: SELECT 1 AS `status`, `e`.`entity_id`, `e`.`sorting_value`, `e`.`attribute_set_id`, `e`.`type_id`, `e`.`created_at`, `e`.`updated_at`, `e`.`sku`, `e`.`name`, `e`.`small_image`, `e`.`thumbnail`, `e`.`url_key`, `e`.`url_path`, `e`.`image`, `e`.`number_of_downloads`, `stock_status_index`.`stock_status` AS `is_salable` FROM `catalog_product_flat_1` AS `e` INNER JOIN `catalog_category_product_index_store1` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.visibility IN (3,2,4) AND cat_index.category_id= LEFT JOIN `cataloginventory_stock_status` AS `stock_status_index` ON e.entity_id = stock_status_index.product_id ORDER BY `e`.`sorting_value` desc