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