mercredi 8 janvier 2014

Prestashop create admin controller with back office overload

this post talk about the implementation of admin controller in prestashop and tpl file, in cases we are not using standard CRUD operations on database tables via dao models(see ObjectModel mother class)
if your are interested by the standard way (in major cases, this article can help you)
http://doc.prestashop.com/display/PS15/Using+helpers+to+overload+a+back-office+template
if your template does not meet with usual templates (list, form, toolbar ....)
you can :

1- create your tpl file
2- put it in admin/themes/the_theme/template

3- set the template at the constructor by wrting:

    public function __construct() {
        parent::__construct();
        $this->template = 'your____tpl.tpl';
    }
you can see the source of adminController
http://searchcode.com/codesearch/view/50600141
it may be helpful