Page 1 of 1

in admin click "Apply" to stay on same page

Posted: Sat Aug 06, 2011 11:35 pm
by Webb
Someone might have already suggested this here in the great OC community.
In admin panel after making any modification in any section (product, categories, modules etc) when 'save' button is pressed it takes you to the main page from where you came from.

For example you searched and edit the product in the admin panel and hit save button. It takes you back to the product list page. What if you want to make another minor change to the same product. Then you may have to search and press the edit button again to enter into the edit mode.

What I'm suggesting here that it will be great option to have the "Apply" button along with the "Save" button.(Just like Joomla Admin). After making the changes when the "Apply" button is hit the admin stays on the same page instead of going back and looking at the long list again. When he is satisfied with the changes can hit the save button. Thanks

Re: in admin click "Apply" to stay on same page

Posted: Sat Aug 13, 2011 11:59 am
by jdw_id
yes i'm looking for this feature too....

it's a must have feature because it can make us works faster... expecially when we want to look at the result first in front end...

Re: in admin click "Apply" to stay on same page

Posted: Wed Dec 28, 2011 12:20 pm
by straightlight
The problem by creating such feature would be for the CSRF protection to refresh the token when actions are directly applied on form without page refresh. Doing so wouldn't allow OpenCart to rely on the header to execute its next call when generating a new token which wouldn't be quite safe for admins.

Re: in admin click "Apply" to stay on same page

Posted: Wed Dec 28, 2011 1:35 pm
by Qphoria
straightlight wrote:The problem by creating such feature would be for the CSRF protection to refresh the token when actions are directly applied on form without page refresh. Doing so wouldn't allow OpenCart to rely on the header to execute its next call when generating a new token which wouldn't be quite safe for admins.
Interesting thought but I can't foresee that being a problem.
The page would still load the same. The only change would be to change the redirect to go back to the current page instead of the list.

So in the update function

Code: Select all

$this->redirect($this->url->link('catalog/product', 'token=' . $this->session->data['token'] . $url, 'SSL'));
could be

Code: Select all

$this->redirect($this->url->link('catalog/product', 'product_id=' . $this->request->get['product_id'] . '&' . token=' . $this->session->data['token'] . $url, 'SSL'));

Re: in admin click "Apply" to stay on same page

Posted: Wed Dec 28, 2011 6:37 pm
by webpie it.
I've seen this added on i Believe in Jonathan's Mods. He calls it Apply and Continue Editing in the his modules (i think) but i have always wondered why this isn't core.

Matter of preference i guess and what you are trying to achieve!

But thanks Q!

I am going to apply that logic to some places within OC admin where i think its logical.

Chris

Re: in admin click "Apply" to stay on same page

Posted: Wed Dec 28, 2011 10:17 pm
by straightlight
The page would still load the same. The only change would be to change the redirect to go back to the current page instead of the list.
Doing it the way you did above simply is a matter of changing the target name which still recalls the header while I thought this issue was about a jQuery call when using the Apply button on the same page.

Re: in admin click "Apply" to stay on same page

Posted: Thu Dec 29, 2011 1:43 am
by Qphoria
Ah.. you mean as an ajax update.. tho the ajax update would also use the token. I guess we'd have to try it and see. If we used an ajax method, we could even set auto-save every 10 secs or so

Re: in admin click "Apply" to stay on same page

Posted: Thu Dec 29, 2011 1:54 am
by straightlight
Qphoria wrote:Ah.. you mean as an ajax update.. tho the ajax update would also use the token. I guess we'd have to try it and see. If we used an ajax method, we could even set auto-save every 10 secs or so
If this could be done on OpenCart without recalling the header navigation (without the token to get expired from URL), it would be a unique opportunity for online merchants.

Re: in admin click "Apply" to stay on same page

Posted: Sun May 26, 2013 6:41 pm
by iplocker
Hello.

Really any updates about this one ?
Its so annoying not to have an apply button and we have to re-edit on the product for further modifications.

Thanks
Theo

Re: in admin click "Apply" to stay on same page

Posted: Sun May 26, 2013 10:46 pm
by Johnathan
I don't believe Daniel has this planned at this time, but I do have an Admin Save & Keep Editing extension that does this.

Re: in admin click "Apply" to stay on same page

Posted: Fri Jun 14, 2013 3:40 am
by iplocker
Hello.

BUT really now, how is possible a so popular cart not to have some basic features!!!!!

I dont understand that , a so basic feature an apply button is missing from a so famous cart !!!
I believe that devs of OC has to run a really eshop and found how not practical is to save and edit again on the product.

Thanks
Theo