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 = 'ru'
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 (
315954, 323397, 325134, 14991, 85379,
276603, 279485, 301669, 302229, 304271,
311272, 311276, 311278, 315849, 315875,
315879, 315890, 315907, 315918, 315940,
316080, 316422, 323401, 325341, 254793,
292592, 299513, 299552, 301767, 312729,
315858, 315917, 315937, 315944, 315949,
316051, 316079, 316206, 64640, 293151,
296861, 305641, 307613, 311268, 311277,
314526, 315213, 315900, 315936, 316049,
323291, 324558, 324559, 325117, 325288,
133629, 265179, 273025, 298721, 306823,
307582, 311271, 315901, 315919, 315950,
316050, 323287, 323292, 323649, 200976,
300745, 311269, 312681, 312769, 315946,
323483, 325116, 301456, 307583, 311270
)
AND a.status = 'A'
ORDER BY
a.position