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 (
1652, 1309, 1653, 1668, 1634, 1688, 1499,
1613, 1648, 1723, 1590, 1510, 1950,
1951, 1924, 1949, 1745, 1654, 1501,
69, 89, 1643, 1645, 1925, 1666, 1664,
1557, 1695, 1559, 1315, 1310, 1471,
1502, 86, 1504, 33, 1944, 1942, 1900,
1777, 1748, 1679, 1702, 1610, 1706,
1683, 1946, 1524, 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