Jump to content

[solved]How can I catch a hook? (admin pages -> orders -> an order)


E.D.

Recommended Posts

I write a module, which does this:

- watch the Admin pages -> Orders -> An Order

- if this order's OrderStatus is updating then sends a post

But how could I catch the updateOrderStatus hook?

This is correct?

class MiroxRendelesExport extends Module
{
...
   public function hookUpdateOrderStatus()
       {
       file_put_contents("test.txt", "aassdd");
       ...
       }


Or do I use other extend? But what?

Link to comment
Share on other sites

Argh... I'm an idiot!

I wrote this into the code:

public function install()
       {
       parent::install();

       if (!$this->registerHook('updateOrderStatus'))
           {
           return false;
           }
       }


And I updated this code to my PrestaShop server (ftp copy).
But I didn't click on "Uninstall" and then neither "Install" button in the "Admin pages -> Modules page"
...well, the problem solved... Only I should click on "Uninstall" and then "Install" button :P

Thank you for your attention!

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...