SELECT
tconnect_settings_objects.object_id as object_id,
tconnect_settings_objects.type as object_type,
tconnect_settings_objects.name as description,
(
CASE WHEN storefront_values.object_id IS NOT NULL THEN storefront_values.value ELSE tconnect_settings_objects.value END
) AS value
FROM
tconnect_settings_objects
LEFT JOIN tconnect_settings_vendor_values AS storefront_values ON storefront_values.object_id = tconnect_settings_objects.object_id
AND storefront_values.storefront_id = 3
AND storefront_values.company_id = 0
WHERE
1
AND (
FIND_IN_SET(
'STOREFRONT', tconnect_settings_objects.edition_type
)
OR FIND_IN_SET(
'ROOT', tconnect_settings_objects.edition_type
)
OR FIND_IN_SET(
'MVE:STOREFRONT', tconnect_settings_objects.edition_type
)
OR FIND_IN_SET(
'MVE:ROOT', tconnect_settings_objects.edition_type
)
)
AND tconnect_settings_objects.object_id = 5962
ORDER BY
tconnect_settings_objects.position