David_Presta Posted April 13, 2015 Share Posted April 13, 2015 Hi there I'm developing a new backoffice module on PS 1.6. I have read the documentation but I'm stuck at this moment. Hope the community can help. My module adds new items on the main backoffice menu: Dashboard Catalog Orders .... .... MyCustomMenu ->MyChildCustomMenu I have already created the controller class for "MyChildCustomMenu" option in mymodule/controllers/admin/AdminNewItemController.php it has something like: <?php class AdminNewItemController extends ModuleAdminController { public function __construct() { // Enable bootstrap $this->bootstrap = true; // Call of the parent constructor method parent::__construct(); } } I failed to load a custom form (when the user click on "MyChildCustomMenu") from a tpl file (mymodule/views/templates/admin/customform.tpl) using fetch or diplay methods I don't know what is correct place to call the tpl (could be on the constructor? ) as well the correct form to load it. I really appreciatte if somebody could explain what is the process flow once the user click on one option of the menu just in order to get a better understood of PS. Thanks in advance Link to comment Share on other sites More sharing options...
Tuni-Soft Posted April 14, 2015 Share Posted April 14, 2015 Add this method public function initContent() { parent::initContent(); $this->setTemplate('customform.tpl'); } Link to comment Share on other sites More sharing options...
David_Presta Posted April 19, 2015 Author Share Posted April 19, 2015 Thank you Tuni-Soft Link to comment Share on other sites More sharing options...
juliodiaz Posted May 5, 2015 Share Posted May 5, 2015 I have the same trouble but the proposed solution it doesn't works I get: Fatal error: Uncaught --> Smarty: Unable to load template file '/home/juliodiaz/public_html/develop/www.peloniopress.org/admin3010/themes/default/template/configure.tpl' <-- thrown in /home/juliodiaz/public_html/develop/www.peloniopress.org/tools/smarty/sysplugins/smarty_internal_templatebase.php on line 129 Why is it not searching the file at module/view/templates/admin? My Admin Controller is: class AdminDypRefundController extends ModuleAdminController{ public function __construct() { // Enable bootstrap $this->bootstrap = true; // Call of the parent constructor method parent::__construct(); } public function initContent() { parent::initContent(); $this->setTemplate('configure.tpl'); }} And the file "configure.tpl" is in the path: dyprefund/views/templates/admin Thank you in advance Julio Link to comment Share on other sites More sharing options...
apositivo Posted August 14, 2015 Share Posted August 14, 2015 hi ! juliodiaz ,any solution ?, in the spanish forum i publish similar issue : https://www.prestashop.com/forums/topic/462676-retornar-contenido-de-un-tpl-via-ajax/ hola juliodiaz ,alguna solucion ? en el foro en español yo publique un problemas similar https://www.prestashop.com/forums/topic/462676-retornar-contenido-de-un-tpl-via-ajax/ 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