Jump to content

hook in AdminProduct, save and stay


flobrflo

Recommended Posts

Hi,

In my module i create a new hook for AdminProductController :

public function hookdisplayAdminProductsExtra ($params){
        echo 'hello world';
// + cancel / save / save and stay button
}

I got a problem when i try to use the button "save and stay", my "hello world" he's on the top of the web site.

I'm try to debug, and arrived in AdminController :

public function initContent(){
...
if ($this->display == 'edit' || $this->display == 'add')
{
    if (!$this->loadObject(true))
        return;
    p('$this->content : '. $this->content . ' ;');
    $this->content .= $this->renderForm();
    d('$this->content : '. $this->content . ' ;');
}

...
}
...

public function renderForm()
{
   return 'ok';
}

I get :

$this->content : ;
hello world
$this->content : ok ;

END

So i don't rly understand why my hook are executed know. and why not other process like Supplier, Price ...

 

Help! =D

 

EDIT : forgot to say, i'm in prestashop 1.6.0.5 =)

Edited by flobrflo (see edit history)
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...