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 (
85113, 78852, 6427, 2237, 2236, 2235,
2231, 2233, 2232, 6665, 2227, 2230,
2228, 42056, 2225, 6642, 2226, 6457,
2223, 2222, 2211, 2221, 2220, 2217,
2216, 2214, 2213, 2212, 2218, 2219,
2194, 2210, 2209, 2208, 2207, 2206,
2205, 2204, 2203, 2202, 2201, 2200,
2199, 2198, 2197, 2196, 2195, 2193,
2192, 2191, 2190, 2189, 2188, 2187,
2186, 2185, 2184, 2183, 2182, 2181,
2180, 2179, 2178, 2177, 2176, 2175,
2174, 2173, 2172, 6881, 6880, 7042,
2170, 2169, 2171, 2167, 2168, 14349,
14348, 14345
)
AND a.status = 'A'
ORDER BY
a.position