Jump to content

Help needed to create a backoffice module with custom template


Patrick T.
 Share

Recommended Posts

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 by Patrick T. (see edit history)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More