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 (
1230, 1227, 77, 1235, 1958, 1712, 1759,
1002, 1381, 1320, 359, 1892, 1176, 1201,
1191, 1182, 1825, 1824, 1821, 1761,
1823, 1822, 1193, 701, 699, 711, 703,
710, 706, 1760, 1844, 1689, 1754, 1755,
1840, 1756, 1753, 1472, 1145, 1202,
247, 296, 1765, 820, 1816, 1766, 1219,
1220
)
AND a.status = 'A'
ORDER BY
a.position