Page 1 of 1

Opencart 2.2. Source edit doesnt save changes

Posted: Sun May 22, 2016 4:27 am
by garyw75
The editor doesnt save your changes if source is left selected

Re: Opencart 2.2. Source edit doesnt save changes

Posted: Sun May 22, 2016 7:57 am
by straightlight
Would it be possible to elaborate the encountered issue a little bit?

Re: Opencart 2.2. Source edit doesnt save changes

Posted: Sun May 22, 2016 11:18 pm
by garyw75
Edit a product description using the editor in view source mode.

Image

Save the product.

You will see the changes you have made have not been saved.

You have to toggle the view source button off after you have made your adjustments and then save the product to get the description to save.

The editor is Opencart 1.* did not do this. It would save things regardless if it was in source mode or not

Re: Opencart 2.2. Source edit doesnt save changes

Posted: Mon May 23, 2016 12:13 am
by straightlight
In admin/model/catalog/product.php file,

find twice:

Code: Select all

description = '" . $this->db->escape($value['description']) . "'
replace both with:

Code: Select all

`description` = '" . $this->db->escape($value['description']) . "'
This should resolved the problem.

Re: Opencart 2.2. Source edit doesnt save changes

Posted: Mon May 23, 2016 10:44 pm
by garyw75
Thanks very much. I will adjust

Re: Opencart 2.2. Source edit doesnt save changes

Posted: Wed May 25, 2016 4:27 pm
by garyw75
I am afraid this code edit you suggested didnt work

Re: Opencart 2.2. Source edit doesnt save changes

Posted: Wed May 25, 2016 8:22 pm
by straightlight
Option 1: On the same file, above the 2nd instance of:

Code: Select all

$this->cache->delete('product');
(in the editProduct method), add:

Code: Select all

exit;
Run the edit save changes again and see if you notice on screen any error messages. If so, please paste them on your next reply and remove the exit; command afterwards.

Option 2: Check your admin error logs and see if you notice a recent error message on the top based on the product.php model file.

Re: Opencart 2.2. Source edit doesnt save changes

Posted: Wed Aug 10, 2016 7:01 am
by platinum
I need help on this as well. I don't understand the 'exit code' you speak of. The $this->cache->delete('product'); shows up 3 times in that file.

Any more advice.

Re: Opencart 2.2. Source edit doesnt save changes

Posted: Wed Aug 10, 2016 7:32 am
by straightlight
platinum wrote:I need help on this as well. I don't understand the 'exit code' you speak of. The $this->cache->delete('product'); shows up 3 times in that file.

Any more advice.
On my instruction above, I did indicated the 2nd instance of