Page 1 of 1

[v1.3.2] Solution for Store Logo & Icon GONE after re-Save

Posted: Sat Sep 19, 2009 12:34 am
by ck.kong
After study admin/controller/setting/setting.php & admin/model/setting/setting.php files, i guest this might be the solution for solving the above problems.

Edit this file admin/controller/setting/setting.php

from line 12 to 36, I added 4 lines in red color

if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$data = array();
if (is_uploaded_file($this->request->files['config_logo']['tmp_name']) && is_writable(DIR_IMAGE) && is_writable(DIR_IMAGE . 'cache/')) {
move_uploaded_file($this->request->files['config_logo']['tmp_name'], DIR_IMAGE . $this->request->files['config_logo']['name']);
if (file_exists(DIR_IMAGE . $this->request->files['config_logo']['name'])) {
$data['config_logo'] = $this->request->files['config_logo']['name'];
}
} else {
$data['config_logo'] = $this->config->get('config_logo');
}

if (is_uploaded_file($this->request->files['config_icon']['tmp_name']) && is_writable(DIR_IMAGE) && is_writable(DIR_IMAGE . 'cache/')) {
move_uploaded_file($this->request->files['config_icon']['tmp_name'], DIR_IMAGE . $this->request->files['config_icon']['name']);
if (file_exists(DIR_IMAGE . $this->request->files['config_icon']['name'])) {
$data['config_icon'] = $this->request->files['config_icon']['name'];
}
} else {
$data['config_icon'] = $this->config->get('config_icon');
}

$this->model_setting_setting->editSetting('config', array_merge($this->request->post, $data));
$this->session->data['success'] = $this->language->get('text_success');
$this->redirect($this->url->https('setting/setting'));
}

Code: Select all

		if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
			$data = array();
			
			if (is_uploaded_file($this->request->files['config_logo']['tmp_name']) && is_writable(DIR_IMAGE) && is_writable(DIR_IMAGE . 'cache/')) {
				move_uploaded_file($this->request->files['config_logo']['tmp_name'], DIR_IMAGE . $this->request->files['config_logo']['name']);
				
				if (file_exists(DIR_IMAGE . $this->request->files['config_logo']['name'])) {
					$data['config_logo'] = $this->request->files['config_logo']['name'];
				}				
			} else {
				$data['config_logo'] = $this->config->get('config_logo');
                     }

			if (is_uploaded_file($this->request->files['config_icon']['tmp_name']) && is_writable(DIR_IMAGE) && is_writable(DIR_IMAGE . 'cache/')) {
				move_uploaded_file($this->request->files['config_icon']['tmp_name'], DIR_IMAGE . $this->request->files['config_icon']['name']);

				if (file_exists(DIR_IMAGE . $this->request->files['config_icon']['name'])) {
					$data['config_icon'] = $this->request->files['config_icon']['name'];
				}	
			} else {
				$data['config_icon'] = $this->config->get('config_icon');
			}
			
			$this->model_setting_setting->editSetting('config', array_merge($this->request->post, $data));

			$this->session->data['success'] = $this->language->get('text_success');

			$this->redirect($this->url->https('setting/setting'));
		}

Re: [v1.3.2] Solution for Store Logo & Icon GONE after re-Save

Posted: Sat Sep 19, 2009 12:40 am
by Qphoria
I am not seeing this problem.. You are the first I've heard to have this issue.

Re: [v1.3.2] Solution for Store Logo & Icon GONE after re-Save

Posted: Sat Sep 19, 2009 1:01 am
by ck.kong
How I try before the changes made. Add new logo via admin->configuration->setting->image then save it. and the screen back to shop tab. You can still view the logo is there if you go back to image tab. (Browser 01)

Go to you 'online shop' with another browser (Browser 02), bingo, your new logo is there now.

Back to your setting page (Browser 01) that you can see your new logo. Now, just click the save button again, and the screen go back to shop tab.

Go back to your 'online shop' browser (Browser 02), F5 to refresh. Oops!!! my logo is GONE.

And But when u go back to image tab (Browser 01), your logo is disappear.

Some one also found the same problems @ http://forum.opencart.com/viewtopic.php?f=31&t=6357

Re: [v1.3.2] Solution for Store Logo & Icon GONE after re-Save

Posted: Mon Sep 28, 2009 4:32 am
by idoso
Thank you.
It works with your fix.

Re: [v1.3.2] Solution for Store Logo & Icon GONE after re-Save

Posted: Tue Nov 10, 2009 6:51 am
by Ach3r0n
Qphoria wrote:I am not seeing this problem.. You are the first I've heard to have this issue.
He's right. If you save any other setting it wipes out the store logo setting.

Re: [v1.3.2] Solution for Store Logo & Icon GONE after re-Save

Posted: Tue Nov 10, 2009 7:17 am
by Daniel
does 1.3.3 fix the problem?

Re: [v1.3.2] Solution for Store Logo & Icon GONE after re-Sa

Posted: Wed Dec 07, 2011 11:44 am
by leonymus
Hi

Using OC Ver 1.5.1.3, on IE8 the store icon does not show - instead a red circle star shaped one comes up.

The store icon works well with other browsers such firefox, opera and crome.

(I've also tried inserting HTML code shown below, as suggested online, at the end of the index.php file:
<HTML>
<link rel="icon" href="http://www.officeandbusiness.net.au/favicon.ico" type="image/vnd.microsoft.icon">
</HTML>
)

Why does it not work with IE?

Leonymus