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 (
94625, 94624, 94623, 94622, 94621, 94620,
94619, 94618, 94617, 94616, 94615,
94614, 94613, 94612, 94611, 94610,
94609, 94608, 94607, 94606, 94605,
94604, 94603, 94602, 94601, 94600,
94599, 94598, 94597, 94596, 94595,
94594, 94593, 95222, 95221, 95220,
95219, 94863, 94862, 94697
)
AND a.product_id = 0
AND a.status = 'A'
ORDER BY
a.position