SELECT
cscart_product_filters.feature_id,
cscart_product_filters.filter_id,
cscart_product_filters.field_type,
cscart_product_filters.round_to,
cscart_product_filters.display,
cscart_product_filters.display_count,
cscart_product_filter_descriptions.filter,
cscart_product_features.feature_type,
cscart_product_features.filter_style,
cscart_product_features_descriptions.prefix,
cscart_product_features_descriptions.suffix
FROM
cscart_product_filters
LEFT JOIN cscart_product_filter_descriptions ON cscart_product_filter_descriptions.filter_id = cscart_product_filters.filter_id
AND cscart_product_filter_descriptions.lang_code = 'en'
LEFT JOIN cscart_product_features ON cscart_product_features.feature_id = cscart_product_filters.feature_id
LEFT JOIN cscart_product_features_descriptions ON cscart_product_features_descriptions.feature_id = cscart_product_filters.feature_id
AND cscart_product_features_descriptions.lang_code = 'en'
INNER JOIN cscart_ult_objects_sharing ON (
cscart_ult_objects_sharing.share_object_id = cscart_product_filters.filter_id
AND cscart_ult_objects_sharing.share_company_id = 1
AND cscart_ult_objects_sharing.share_object_type = 'product_filters'
)
WHERE
cscart_product_filters.status = 'A'
AND (
cscart_product_filters.categories_path = ''
OR FIND_IN_SET(
267, cscart_product_filters.categories_path
)
)
ORDER BY
cscart_product_filters.position,
cscart_product_filter_descriptions.filter