Hello everyone.
I am trying to call a new controller from order_package_list.tpl file like this:
<form class="js-oxValidate" name="fertig" action="index.php?force_admin_sid=siccb6fc2adu8mcuidsejolre3&stoken=4F66373A&cl=fertig&fnc=fertig_gepacht" method="post" role="form" novalidate="novalidate">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="fertig">
<input type="hidden" name="fnc" value="fertig_gepacht">
<input type="hidden" name="ordernr" value="[{ $order->oxorder__oxordernr->value}]">
<input type="submit" value="Fertig gepackt!">
</form>
This is how my controller looks like in application/controller/admin/fertig.php:
class fertig extends oxAdminDetails
{
/**
* Executes parent method parent::render(), fetches order info from DB,
* passes it to Smarty engine and returns name of template file.
* "order_package.tpl"
*
* @return string
*/
public function fertig_gepacht(){
// $fertig = oxNew('fertig');
//$fertig -> update_order();
$myConfig = $this->getConfig();
parent::render();
$aOrders = oxNew('oxlist');
$aOrders->init('oxorder');
$sSql = "select * from oxorder where oxorder.oxsenddate = '0000-00-00 00:00:00' and oxorder.oxshopid = '" .
$myConfig->getShopId() . "' order by oxorder.oxorderdate asc limit 5000";
$aOrders->selectString($sSql);
$this->_aViewData['resultset'] = $aOrders;
return "order_package.tpl";
}
}
Problem is that I am getting front page of the shop