Patrick T. Posted September 12, 2013 Share Posted September 12, 2013 (edited) Hi to all, i'm developing a tab for vendors. In that tab i need to have the functionalities to show customer list, adding customer, show orders, make new one, chow the returned orders, if needed add new one and check the credit notes. To accomplish this task i've created one single controller in which i process the request. I need help to create the order chain system. I've tried with use of ajax, after read the AdminOrdersController. The interface is based on custom template file, one for the menu, and other to show the customized parts. My problem arises when i need to render the form for placing orders. If i create a template with smarty createTemplate method. I'm using this method twice, one to create menu and this is ok, and the second time to get the form template, but when i call the method i lose most of the default smarty variable, like $link, $currentIndex and so on. My request is, how to create back office template with customized and ad-hoc template file. if you need i can send my module in private message. Prestashop version is 1.5.4.1 Any help is appreciated. regards, Patrick Trabocchi Edited September 12, 2013 by Patrick T. (see edit history) Link to comment Share on other sites More sharing options...
jgullstr Posted September 13, 2013 Share Posted September 13, 2013 Not sure if I understand you correctly, but might fetch() be what you're looking for?Ex. $smarty->assign(array( 'your_var' => $your_value, )); return $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'your_module/your_tpl.tpl'); Link to comment Share on other sites More sharing options...
Patrick T. Posted September 14, 2013 Author Share Posted September 14, 2013 Thank for reply jgullstr, i'm using the fetch after i've created template with $this->context->smarty->createTemplate(tpl_file, parent), assigning the right variable and finally fetch the result. I've attached the debug console result after first loading of custom template file:debug_output_module_tab_home.htm And here the debug output on second call to method file:debug_output_module_tab_home.htm Thank's for any suggestion and help regards, Patrick T. 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