<?php include_once(dirname(__FILE__) . '../../../mymodule.php'); class myModuleDefaultModuleFrontController extends ModuleFrontController { public function __construct() { parent::__construct(); $this->context = Context::getContext(); } public function initContent() { parent::initContent(); if(isset($_POST['take_data'])) { //HANDLE THE POST HERE $product_ID = $_POST['product_ID']; $ID_product_attribute = $_POST['ID_product_attribute']; /* action */ /* when job done then redirect */ $openTab = 3; // $pController = $this->context->link->getAdminLink('AdminProducts', true, ['id_product' => $product_ID]); // $pController .= '#tab-step'.$openTab; $link = $this->context->link; $url = $link->getAdminLink('AdminProducts', true, array( 'route' => 'admin_product_catalog' )); $url.= '#tab-step'.$openTab; /* i have tried also: $url = $link->getAdminLink('AdminOrders', true, [], ['orderId' => 44, 'vieworder' => 1]); */ /*that works */ // Tools::redirect('index.php'); } } }
Sure here is myModule front controller. Actions are fine - I have problem with getAdminLink() - probably some stupid mistake.