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 (
712, 693, 691, 1013, 762, 1241, 1264,
723, 751, 503, 628, 467, 754, 752, 655,
761, 1142, 1141, 1146, 721, 722, 615,
524, 1140, 1143, 1144, 293, 924, 750,
898, 565, 447, 460, 482, 1408, 1047,
463, 824, 521, 54, 292, 351, 343, 384,
340, 1139, 825, 672
)
AND a.status = 'A'
ORDER BY
a.position