ahmed_Rabii Posted December 26, 2018 Share Posted December 26, 2018 Hi Guys, Since Prestashop 1.7.5 allow the usage of Symfony controllers and routing : https://devdocs.prestashop.com/1.7/modules/concepts/controllers/admin-controllers/. My problem now is to link the controller action to a tab in the back office, unfortunately the Prestashop docs does not really help in this area: https://devdocs.prestashop.com/1.7/modules/concepts/controllers/admin-controllers/tabs/. If any one has crossed this problem and has any kind of a solution i would really appreciate the help. Link to comment Share on other sites More sharing options...
Napolar Posted March 24, 2019 Share Posted March 24, 2019 ✌️ @ahmed_Rabii same problem... Did you find any solution ? Link to comment Share on other sites More sharing options...
Janett Posted March 24, 2019 Share Posted March 24, 2019 It only work if you declare _legacy_controller and _legacy_link options in you config.yml like https://github.com/PrestaShop/ps_linklist/blob/master/config/routes.yml More about : https://github.com/PrestaShop/docs/issues/210 https://github.com/PrestaShop/docs/issues/211 1 Link to comment Share on other sites More sharing options...
ahmed_Rabii Posted March 25, 2019 Author Share Posted March 25, 2019 On 3/24/2019 at 5:43 PM, Napolar said: ✌️ @ahmed_Rabii same problem... Did you find any solution ? Expand i just used the Prestashop tabs with redirect: Prestashop Controller: mymodule\controllers\admin\AdminMyModuleConfigController.php use PrestaShop\PrestaShop\Adapter\SymfonyContainer; class AdminMyModuleConfigController extends ModuleAdminController { public function init() { $sfContainer = SymfonyContainer::getInstance(); if (!is_null($sfContainer)) { $sfRouter = $sfContainer->get('router'); Tools::redirectAdmin($sfRouter->generate('edit_mymodule_config')); } } } Module Class: mymodule\mymodule.php public $tabs = array( array( 'name' => 'Configure', 'class_name' => 'AdminMyModuleConfig', 'visible' => true, 'parent_class_name' => 'AdminMyModuleParent', ) ); 1 Link to comment Share on other sites More sharing options...
Napolar Posted March 28, 2019 Share Posted March 28, 2019 ✌️@Janett@ahmed_Rabii Thank you ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now