Jump to content

create custom admin module


cirodev

Recommended Posts

Hello to all, 

I'm creating a module for 1.5 ps which MUST only works for the back end. The guide explains how to view the contents of files dwt for modules that work in the front end. 

 

How do I integrate the tpl file? 

 

How do I get more and more actions to a dwt single module? 

 

 

For example, I would like to index the module was displayed index.tpl which is located in the views / templates / admin 

 

in it I would like to create a link that leads to a new action on the same controller, it shows that such test.tpl 

 

Thanks in advance

Link to comment
Share on other sites

module works the same for back office as it works for front office,

just use back office hooks instead of front office hooks

http://doc.prestashop.com/display/PS15/Hooks+in+PrestaShop+1.5#HooksinPrestaShop1.5-Existingback-officehooks

 

So I have a bit of confusion. 
I inserted this code in the constructor of my controller 
 
$this-> context-> smarty-> assign ('HOOK_DISPLAY_BACK_OFFICE_HOME', Module :: hookExec ('displayBackOfficeHome')); 
$this-> display (__FILE__, 'test.tpl'); 
 
i put test.tpl in template/admin e under templates/hook
 
But I get the blank page 
 
I am accustomed to using zend I define each action in this way 
 
actionTest () 
 
and automatically invokes the view test 
 
still not clear to me how it works at this point MVC prestashop since I can not see any tpl
 
how can I get more views on a form? I need to create controllers for many as the number of views? comre renderizzo the template? 
 
how to call the other controller module? 
 
thanks
Link to comment
Share on other sites

i smiply  add this code 

 

 

his-> context-> smarty-> assign ('HOOK_DISPLAY_BACK_OFFICE_HOME', Module :: hookExec ('displayBackOfficeHome')); 
$this-> display (__FILE__, 'test.tpl'); 

 

in the __construct function

Link to comment
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
×
×
  • Create New...