diff --git a/catalog/admin/includes/languages/english/store_logo.php b/catalog/admin/includes/languages/english/store_logo.php index 62f1799ff..fa74b9fdc 100644 --- a/catalog/admin/includes/languages/english/store_logo.php +++ b/catalog/admin/includes/languages/english/store_logo.php @@ -15,7 +15,11 @@ define('TEXT_LOGO_IMAGE', 'New Logo:'); define('TEXT_FORMAT_AND_LOCATION', 'The store logo must be in .png or .jpg or .gif format and will be saved into:'); +define('TEXT_FAVICON_IMAGE', 'New Favicon:'); +define('TEXT_FAVICON_FORMAT_AND_LOCATION', 'The store favicon must be in ICO format with size 16x16px and will be saved as:'); + define('SUCCESS_LOGO_UPDATED', 'Success: The store logo has successfully been updated!'); +define('SUCCESS_FAVICON_UPDATED', 'Success: The favicon image has successfully been updated!'); define('ERROR_IMAGES_DIRECTORY_NOT_WRITEABLE', 'Error: The images directory cannot be uploaded to. (click here to review the directory permissions)'); ?> diff --git a/catalog/admin/includes/template_top.php b/catalog/admin/includes/template_top.php index ca0ac3f05..a06f0ad77 100644 --- a/catalog/admin/includes/template_top.php +++ b/catalog/admin/includes/template_top.php @@ -17,6 +17,7 @@ <?php echo TITLE; ?> + diff --git a/catalog/admin/store_logo.php b/catalog/admin/store_logo.php index 0958b51a6..438005c1e 100644 --- a/catalog/admin/store_logo.php +++ b/catalog/admin/store_logo.php @@ -23,6 +23,10 @@ $store_logo->set_extensions(array('png', 'gif', 'jpg')); $store_logo->set_destination(DIR_FS_CATALOG_IMAGES); + $store_favicon = new upload('store_favicon'); + $store_favicon->set_extensions('ico'); + $store_favicon->set_destination(DIR_FS_CATALOG); + if ($store_logo->parse()) { if ($store_logo->save()) { $messageStack->add_session(SUCCESS_LOGO_UPDATED, 'success'); @@ -33,6 +37,18 @@ } else { $error = true; } + + if ($store_favicon->parse()) { + $store_favicon->set_filename('favicon.ico'); + + if ($store_favicon->save()) { + $messageStack->add_session(SUCCESS_FAVICON_UPDATED, 'success'); + } else { + $error = true; + } + } else { + $error = true; + } if ($error == false) { tep_redirect(tep_href_link(FILENAME_STORE_LOGO)); @@ -71,6 +87,11 @@ + + + + + @@ -86,6 +107,18 @@ + + + + + + + + + + + + <?php echo tep_output_string_protected($oscTemplate->getTitle()); ?> +