SELECT
a.*,
b.option_name,
b.internal_option_name,
b.option_text,
b.description,
b.inner_hint,
b.incorrect_message,
b.comment
FROM
cscart_product_options as a
LEFT JOIN cscart_product_options_descriptions as b ON a.option_id = b.option_id
AND b.lang_code = 'en'
INNER JOIN cscart_ult_objects_sharing ON (
cscart_ult_objects_sharing.share_object_id = a.option_id
AND cscart_ult_objects_sharing.share_company_id = 1
AND cscart_ult_objects_sharing.share_object_type = 'product_options'
)
WHERE
a.product_id IN (
1735, 1602, 1601, 1692, 1696, 1682, 1743,
1045, 1046, 1187, 1556, 1555, 1435,
1554, 1577, 1194, 1766, 368, 1253, 1553,
1371, 1372, 1373, 1374, 1219, 1220,
1440, 1441, 1681, 1680, 1800, 1902,
1804, 1803, 1221, 1224, 1762, 408, 39,
1798, 1797, 1445
)
AND a.status = 'A'
ORDER BY
a.position