Database query failed: 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 ') AND ((SELECT MIN(o.stock) FROM shop_productoptions WHERE product = p.id) > 0 O' at line 1
Last SQL query: SELECT p.id FROM `shop_products` p LEFT JOIN shop_productcategories pc ON pc.product = p.id LEFT JOIN shop_productoptions o ON o.product = p.id WHERE p.active = 1 AND pc.category IN () AND ((SELECT MIN(o.stock) FROM shop_productoptions WHERE product = p.id) > 0 OR o.stock IS NULL) GROUP BY p.id