SELECT
c.product_id AS cur_product_id,
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'
LEFT JOIN cscart_product_global_option_links as c ON c.option_id = a.option_id
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
c.product_id IN (
627, 927, 864, 470, 916, 638, 606, 560,
625, 1018, 787, 476, 652, 1128, 884,
918, 1122, 1125, 1126, 473, 513, 1094,
398, 412, 422, 443, 406, 455, 917, 888,
618, 636, 553, 429, 901, 459, 410, 552,
551, 842, 1123, 912, 910, 911, 913, 914,
915, 967, 417, 433, 580, 514, 471, 654,
263, 1037, 574, 495, 813, 1086, 844,
756, 755, 434, 863, 220, 823, 610, 867,
858, 635, 1044, 579, 578, 1127, 1042,
868, 517, 938, 946, 456, 559, 542, 407,
866, 515, 561, 491, 493, 573, 651, 562,
435, 523, 650, 583
)
AND a.product_id = 0
AND a.status = 'A'
ORDER BY
a.position