Redirect trigger
Posted: 2012-10-02 21:05
Hi
There is something I like to do if is possible?
//start Trigger_Redirect trigger
//remove this line if you want to edit the code by hand
function Trigger_Redirect(&$tNG) {
$redObj = new tNG_Redirect($tNG);
$redObj->setURL("/this_page.php");
$redObj->setKeepURLParams(true);
return $redObj->Execute();
}
//end Trigger_Redirect trigger
later on......
$upd_pv_order_marknad->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update1");
$upd_pv_order_marknad->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);
$upd_pv_order_marknad->registerTrigger("END", "Trigger_Default_Redirect", 99, "/pv/akt_tmp.php?akt_id={GET.akt_id}&order=1");
$upd_pv_order_marknad->registerTrigger("AFTER", "Trigger_LinkTransactions", 98);
$upd_pv_order_marknad->registerTrigger("ERROR", "Trigger_LinkTransactions", 98);
$upd_pv_order_marknad->registerTrigger("AFTER", "Trigger_Default_ManyToMany", 50);
$upd_pv_order_marknad->registerTrigger("AFTER", "Trigger_Default_ManyToMany3", 50);
$upd_pv_order_marknad->registerConditionalTrigger("{POST.KT_Update2} == \"\"", "END", "Trigger_Redirect", 90);
<form........
<input type="submit" name="KT_Update1" id="KT_Update1" value="Save and go to this page" /> <input type="submit" name="KT_Update1" id="KT_Update2" value="save and go to another page" />
Thanks for any suggestions
There is something I like to do if is possible?
//start Trigger_Redirect trigger
//remove this line if you want to edit the code by hand
function Trigger_Redirect(&$tNG) {
$redObj = new tNG_Redirect($tNG);
$redObj->setURL("/this_page.php");
$redObj->setKeepURLParams(true);
return $redObj->Execute();
}
//end Trigger_Redirect trigger
later on......
$upd_pv_order_marknad->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update1");
$upd_pv_order_marknad->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);
$upd_pv_order_marknad->registerTrigger("END", "Trigger_Default_Redirect", 99, "/pv/akt_tmp.php?akt_id={GET.akt_id}&order=1");
$upd_pv_order_marknad->registerTrigger("AFTER", "Trigger_LinkTransactions", 98);
$upd_pv_order_marknad->registerTrigger("ERROR", "Trigger_LinkTransactions", 98);
$upd_pv_order_marknad->registerTrigger("AFTER", "Trigger_Default_ManyToMany", 50);
$upd_pv_order_marknad->registerTrigger("AFTER", "Trigger_Default_ManyToMany3", 50);
$upd_pv_order_marknad->registerConditionalTrigger("{POST.KT_Update2} == \"\"", "END", "Trigger_Redirect", 90);
<form........
<input type="submit" name="KT_Update1" id="KT_Update1" value="Save and go to this page" /> <input type="submit" name="KT_Update1" id="KT_Update2" value="save and go to another page" />
Thanks for any suggestions