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 (
6730, 7172, 6924, 7084, 6814, 6683, 7411,
6684, 6685, 6686, 6687, 6688, 6689,
6690, 6693, 11052, 6694, 6912, 6691,
6913, 6682, 6695, 6696, 11104, 6692,
8688, 6697, 8000, 6698, 6699, 6700,
6701, 6702, 6703, 6704, 6705, 6707,
6708, 6709, 6710, 6714, 6706, 6716,
6717, 6718, 6715, 6719, 6720, 6721,
6711, 6723, 6722, 6724, 6712, 6725,
6726, 6727, 6728, 6729, 6731, 6732,
8742, 6733, 6734, 6735, 6736, 6713,
6737, 6738, 6739, 6740, 6741, 6742,
6748, 8801, 8802, 11103, 6744, 6745,
6746, 6747, 10992, 6749, 6750, 8743,
6751, 6752, 6753, 6754, 6755, 6756,
6757, 6758, 6759, 6760, 6915, 6916,
6761, 6762, 11378
)
AND a.status = 'A'
ORDER BY
a.position