SELECT p.product_id,p.image_p FROM oc_product_to_category p2c LEFT JOIN oc_product p ON (p2c.product_id = p.product_id) LEFT JOIN oc_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN oc_product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = '3' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND p.quantity>0 AND p2c.category_id = '392' GROUP BY p.product_id ORDER BY IF(p.image_p = '', 1, 0), LCASE(pd.name) ASC LIMIT 0,15