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 (
48374, 48373, 48372, 48371, 48370, 48369,
48368, 48367, 48366, 48365, 48364,
48363, 48362, 48361, 48360, 48359,
48358, 48357, 48356, 48355, 48354,
48353, 48352, 48351, 70736, 70735,
70734, 70733, 48051, 48033, 48032,
48031, 47866, 48025, 47884, 47883,
47851, 47885, 48028, 47854, 47850,
47849, 47813, 47723, 90955, 90954,
90953, 90952, 90951, 90950, 90949,
47810, 48013, 47836, 47815, 47814,
47808, 47689, 47818, 47778, 47777,
47776, 47775, 47763, 47762, 47761,
47760, 47639, 47744, 47743, 47742,
47746, 47604, 47603, 47602, 47601,
47600, 47599, 47598, 47597
)
AND a.product_id = 0
AND a.status = 'A'
ORDER BY
a.position