SELECT
c.product_id AS cur_product_id,
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'
LEFT JOIN cscart_product_global_option_links as c ON c.option_id = a.option_id
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
c.product_id IN (
19, 1814, 1813, 1874, 1875, 974, 1574,
1575, 1812, 1811, 1507, 1853, 1856,
1918, 1919, 1862, 1861, 1857, 1883,
1860, 1859, 1854, 1923, 1858, 1922,
1855, 1920, 1469, 344, 1850, 1551, 284,
1475, 1276, 1569, 1198, 1179, 1281,
926, 1258, 1168, 1394, 1259, 1865, 390,
1204, 1864, 1863
)
AND a.product_id = 0
AND a.status = 'A'
ORDER BY
a.position