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 = 'uk'
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 (
21626, 18985, 18986, 19418, 18988, 21627,
18987, 18908, 18989, 18990, 18991,
18992, 21628, 18994, 21630, 21629,
21631, 21632, 18961, 21634, 18995,
19007, 9348, 9347, 18960, 18959, 20565,
18970, 18971, 18973, 21641, 18975,
18976, 18977, 21640, 22461, 21639,
18958, 18981, 18982, 21637, 18984,
22048, 22055, 22052, 22054, 22064,
22063, 22062, 22056, 22061, 22058,
22044, 22046, 22060, 18998, 18996,
18997, 18999, 19000, 19001, 19002,
19003, 19004, 19006, 19005, 22051,
22053, 22047, 22050, 22045, 22479,
22049, 22057, 22059, 21638, 21635,
18911, 18912, 19011, 18913, 19066,
21636, 19013, 18915, 19014, 20602,
18917, 18918, 21642, 19016, 18920,
19017, 20603, 20601, 18924, 18914,
18925, 18926
)
AND a.status = 'A'
ORDER BY
a.position