// fix save and stay in product page

This commit is contained in:
mMarinetti
2011-11-23 20:52:52 +00:00
parent 66b8291927
commit eaa0a81d6f
3 changed files with 12 additions and 5 deletions
+2
View File
@@ -600,9 +600,11 @@ class AdminControllerCore extends Controller
if ($back = Tools::getValue('back'))
$this->redirect_after = urldecode($back).'&conf=4';
// Specific scene feature
// @todo change stay_here submit name (not clear for redirect to scene ... )
if (Tools::getValue('stay_here') == 'on' || Tools::getValue('stay_here') == 'true' || Tools::getValue('stay_here') == '1')
$this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.$object->id.'&conf=4&updatescene&token='.$token;
// Save and stay on same form
// @todo on the to following if, we may prefer to avoid override redirect_after previous value
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay'))
$this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.$object->id.'&conf=4&update'.$this->table.'&token='.$token;
// Save and back to parent