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 (
1562, 1509, 1952, 1700, 1589, 1492, 1316,
1690, 1729, 1637, 1731, 1636, 1638,
1639, 1629, 1631, 1630, 1622, 1615,
1621, 1907, 1955, 1663, 1674, 1490,
1746, 1831, 1832, 1591, 1737, 1805,
1647, 1774, 281, 1617, 282, 1503, 285,
1826, 1646, 1580, 1906, 1611, 1166,
67, 1252, 1930, 1561
)
AND a.status = 'A'
ORDER BY
a.position