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 (
47488, 47234, 47232, 51280, 47452, 47248,
47058, 51278, 47051, 47046, 47045,
47044, 47043, 47042, 47041, 47040,
47039, 47038, 47037, 47036, 47035,
47034, 47235, 47115, 47113, 47112,
47111, 47110, 47109, 47108, 47107,
47106, 47105, 47104, 47103, 47102,
47101, 46931, 46946, 46945, 46944,
47214, 47213, 47212, 47211, 47210,
47209, 47208, 47207, 47206, 47205,
47204, 47203, 47202, 47201, 47200,
47199, 47196, 46936, 46876, 46875,
46918, 46785, 46746, 46943, 46942,
46941, 46940, 46910, 46703, 47010,
47009, 47008, 46935, 46929, 46928,
46927, 46926, 46688, 46925
)
AND a.product_id = 0
AND a.status = 'A'
ORDER BY
a.position