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 (
982, 981, 983, 828, 421, 647, 315, 624,
937, 1131, 671, 670, 42, 43, 1051, 936,
935, 599, 900, 44, 404, 835, 836, 1263,
322, 311, 312, 744, 742, 837, 537, 839,
621, 1048, 1049, 1014, 575, 1034, 1243,
1073, 1295, 497, 704, 700, 702, 705,
709, 698, 1273, 1134, 607, 1092, 584,
1132, 446, 492, 461, 399, 649, 1129,
930, 931, 977, 929, 1020, 928, 749, 40,
416, 405, 427, 444, 827, 826, 595, 485,
486, 838, 549, 660, 546, 1260, 978, 979,
401, 400, 457, 462, 516, 564, 321, 989,
987, 988, 748, 502
)
AND a.status = 'A'
ORDER BY
a.position