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 (
95595, 95594, 95593, 95592, 95591, 95590,
95589, 95588, 95587, 95586, 95585,
95584, 95583, 95582, 95581, 95580,
95579, 95578, 95577, 95576, 95575,
95574, 95573, 95572, 95571, 94905,
95440, 95439, 94679, 94678, 94677,
94676, 94675, 94674, 94673, 94672,
94659, 94629, 94628, 94626
)
AND a.product_id = 0
AND a.status = 'A'
ORDER BY
a.position