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 (
1230, 1229, 1228, 1227, 1226, 1225, 1224,
1223, 1222, 1221, 1220, 1219, 1218,
1217, 1216, 1215, 1170, 1171, 1177,
1175, 1168, 1183, 1184, 1174, 1187,
67, 1191, 1176, 1167, 1169, 1194, 1179,
1180, 1181, 1197, 1182, 1201, 1202,
1198, 1178, 603, 1185, 1209, 1186, 1210,
1211, 1203, 1212, 1213, 1188, 1190,
1193, 1207, 1208, 1195, 1196, 1199,
1205, 1173, 1200, 1172, 15, 16, 17, 18,
19, 20, 21, 22, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
52
)
AND a.status = 'A'
ORDER BY
a.position