Jump to content

Edit History

Butch0071

Butch0071

OK.

class myModuleDefaultModuleFrontController extends ModuleFrontController

it is controller - frontController in mymodule/controllers/front/default.php

it handles POST request from Back Office where my tpl with form is hooked. (product page edition )

my form action (in .tpl)  is:

<form action="{Context::getContext()->link->getModuleLink('mymodule', 'default')}" method="post">

I need to redirect to product edit page on tab-step3 after submitting the form on product edition page.

$openTab = 3; 
$pController = $this->context->link->getAdminLink('AdminProducts', true, ['id_product' => $product_ID]); 
$pController .= '#tab-step'.$openTab;

I can use in my controller (default.php): tools::redirect and give url like "index.php" - and it works fine but I am trying to construct the url link with getAdminLink - and can not do that..

I am missing something..

Hope that everything is quite clear.

Butch0071

Butch0071

OK.

class myModuleDefaultModuleFrontController extends ModuleFrontController

it is controller - fronController in mymodule/controllers/front/default.php

it handles POST request from Back Office where my tpl with form is hooked. (product page edition )

my form action (in .tpl)  is:

<form action="{Context::getContext()->link->getModuleLink('mymodule', 'default')}" method="post">

I need to redirect to product edit page on tab-step3 after submitting the form on product edition page.

$openTab = 3; 
$pController = $this->context->link->getAdminLink('AdminProducts', true, ['id_product' => $product_ID]); 
$pController .= '#tab-step'.$openTab;

I can use in my controller (default.php): tools::redirect and give url like "index.php" - and it works fine but I am trying to construct the url link with getAdminLink - and can not do that..

I am missing something..

Hope that everything is quite clear.

×
×
  • Create New...