Query failed with error. 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 's Milk' AND pi.size= '2 x 1L' AND pi.product_id='14673' AND pi.status='1' AND ( ' at line 3.
[SELECT * FROM product_image pi LEFT JOIN product p ON pi.product_id=p.product_id WHERE pi.color='With Goat's Milk' AND pi.size= '2 x 1L' AND pi.product_id='14673' AND pi.status='1' AND ( (SELECT COUNT(*) FROM product_variant WHERE product_id=pi.product_id AND color=pi.color AND size=pi.size AND quantity>stock_buffer AND discounted_price>0) > 0 OR p.backorder='1' ) GROUP BY pi.image ORDER BY pi.sort, pi.color, pi.size]