Jump to content

How to add save and stay button to HeaderToolbar in back office ?


Recommended Posts

I achieved the target by adding a piece of code to method initPageHeaderToolbar() in AdminProductController.php file:
 
 // add link and action save to header tool bar
    $this->page_header_toolbar_btn['save'] = array(
    'short' => 'Save',
    'href' => '#',
    'desc' => $this->l('Save'),
    'js' => $this->l('$( \'[name=submitAddproduct]\' ).click();')
);

// add link and action save and stay to header tool bar
$this->page_header_toolbar_btn['save-and-stay'] = array(
    'short' => 'SaveAndStay',
    'href' => '#',
    'desc' => $this->l('Save and stay'),
    'js' => $this->l('$( \'[name=submitAddproductAndStay]\' ).click();')
);

but this solution is so slow and weak... I'm not satisfied. This is not way what I want get.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...