Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions catalog/admin/includes/languages/english/store_logo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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. (<a href="%s">click here to review the directory permissions</a>)');
?>
1 change: 1 addition & 0 deletions catalog/admin/includes/template_top.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<meta name="robots" content="noindex,nofollow">
<title><?php echo TITLE; ?></title>
<base href="<?php echo ($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_ADMIN : HTTP_SERVER . DIR_WS_ADMIN; ?>" />
<link rel="shortcut icon" href="/catalog/favicon.ico" />
<!--[if IE]><script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/excanvas.min.js', '', 'SSL'); ?>"></script><![endif]-->
<link rel="stylesheet" type="text/css" href="<?php echo tep_catalog_href_link('ext/jquery/ui/redmond/jquery-ui-1.10.4.min.css', '', 'SSL'); ?>">
<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/jquery-1.11.1.min.js', '', 'SSL'); ?>"></script>
Expand Down
33 changes: 33 additions & 0 deletions catalog/admin/store_logo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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));
Expand Down Expand Up @@ -71,6 +87,11 @@
<td class="main"><?php echo tep_draw_file_field('store_logo'); ?></td>
<td class="smallText"><?php echo tep_draw_button(IMAGE_SAVE, 'disk', null, 'primary'); ?></td>
</tr>
<tr>
<td class="main" valign="top"><?php echo TEXT_FAVICON_IMAGE; ?></td>
<td class="main"><?php echo tep_draw_file_field('store_favicon'); ?></td>
<td class="smallText"><?php echo tep_draw_button(IMAGE_SAVE, 'disk', null, 'primary'); ?></td>
</tr>
</table>
</form></td>
</tr>
Expand All @@ -86,6 +107,18 @@
<tr>
<td class="main"><?php echo DIR_FS_CATALOG_IMAGES . STORE_LOGO; ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php echo TEXT_FAVICON_FORMAT_AND_LOCATION; ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php echo DIR_FS_CATALOG . 'favicon.ico'; ?></td>
</tr>
</table>

<?php
Expand Down
Binary file added catalog/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions catalog/includes/template_top.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />
<link rel="shortcut icon" href="favicon.ico" />

<!-- Bootstrap -->
<link href="ext/bootstrap/css/bootstrap.min.css" rel="stylesheet">
Expand Down