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 (
1414, 1453, 1452, 1407, 1432, 1451, 1445,
1411, 1449, 1406, 1448, 1447, 1413,
1439, 1419, 1444, 1443, 1418, 1442,
1420, 1441, 1440, 1433, 1438, 1436,
1435, 1434, 1415, 1431, 1430, 1429,
1428, 1427, 1426, 1425, 1424, 1423,
1422, 1421, 1417, 1416, 1412, 1410,
153, 1409, 1408, 1405, 297
)
AND a.status = 'A'
ORDER BY
a.position