SELECT
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'
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
a.product_id IN (
1343, 1338, 1337, 1174, 1486, 718, 1339,
1417, 341, 1324, 1275, 1216, 1458, 819,
1460, 1464, 1455, 1450, 1382, 1385,
1383, 1386, 25, 1758, 1757, 1734, 1176,
1201, 1191, 1182, 1825, 1824, 1821,
1761, 1823, 1822, 1459, 1477, 1193,
1546, 1254, 1684, 1379, 1378, 701, 699,
711, 703
)
AND a.status = 'A'
ORDER BY
a.position