I want to know the file and location of function which works on click of "Save and continue Edit". And how i change redirect url in that function.
2 Answers
The redirection URL is in app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php -> public function saveAction()
and more specifically this:
if ($redirectBack) {
$this->_redirect('*/*/edit', array(
'id' => $productId,
'_current'=>true
));
}
you can see code in app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php
Mage_Adminhtml_Block_Catalog_Product_Edit
but It's not good to change core file please place your file in
app/code/local/Mage/Adminhtml/Block/Catalog/Product/Edit.php
and change it as per your requirement
if (!$this->getRequest()->getParam('popup')) {
if (!$this->getProduct()->isReadonly()) {
$this->setChild('save_and_edit_button',
$this->getLayout()->createBlock('adminhtml/widget_button')
->setData(array(
'label' => Mage::helper('catalog')->__('Save and Continue Edit'),
'onclick' => 'saveAndContinueEdit(\''.$this->getSaveAndContinueUrl().'\')',
'class' => 'save'
))
);
}
-
But which function calls on the button. Means after click on button page refresh so which function redirect page.– MathewOct 23, 2015 at 11:18
-