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 (
5618, 5676, 5661, 5634, 5619, 6216, 2458,
2457, 2456, 2455, 2454, 2451, 2450,
6164, 2443, 2448, 2447, 2446, 2445,
2444, 85065, 85064, 78818, 78817, 2441,
2440, 2439, 5885, 2442, 78201, 5897,
2434, 2435, 2437, 2438, 2436, 6059,
2433, 2432, 2431, 2430, 6189, 6130,
6129, 6126, 6125, 6124, 6123, 6122,
5940, 2428, 2427, 2426, 2425, 6183,
2422, 2423, 2421, 2420, 2424, 2419,
2418, 2416, 2414, 6181, 5985, 77579,
6321, 26680, 6174, 6306, 2408, 2412,
2413, 2411, 2410, 2409, 2407, 6186,
103458
)
AND a.product_id = 0
AND a.status = 'A'
ORDER BY
a.position