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 (
48473, 48713, 48706, 48297, 48920, 48671,
48670, 48302, 48276, 48275, 48238,
48270, 48271, 48266, 48265, 48264,
48263, 48246, 48277, 48247, 48259,
48258, 48257, 48256, 48255, 48248,
48237, 48236, 48233, 48201, 48103,
48102, 48267, 48047, 48192, 48120,
48101, 48100, 48099, 48097, 47985,
47984, 48078, 48046, 48410, 48409,
48408, 48407, 48406, 48405, 48404,
48403, 48402, 48401, 48400, 48399,
48398, 48397, 48396, 48395, 48394,
48393, 48392, 48391, 48390, 48389,
48388, 48387, 48386, 48385, 48384,
48383, 48382, 48381, 48380, 48379,
48378, 48377, 48376, 48375
)
AND a.product_id = 0
AND a.status = 'A'
ORDER BY
a.position