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 (
62636, 62635, 62634, 62633, 62632, 62631,
62630, 62629, 62628, 62627, 62626,
62625, 62611, 62609, 62607, 62569,
62456, 61887, 60269, 62370, 62342,
62098, 62097, 61770, 61769, 61704,
60784, 60268, 62217, 61403, 61442,
62055, 61886, 61768, 60787, 60267,
62105, 61512, 62019, 61960
)
AND a.product_id = 0
AND a.status = 'A'
ORDER BY
a.position