3

when you create an invoice in the admin panel, what is the name of that event for an observer? I've tried *sales_order_invoice_register* and *sales_order_invoice_pay* but it doesn't work.

Infrid
  • 723
  • 5
  • 12
  • 28
  • 2
    This should be `sales_order_invoice_register`. Please define "but it doesn't work" more specifically and show the code that's causing trouble. – Jürgen Thelen Oct 05 '11 at 13:36

1 Answers1

8

For Magento >= 1.4 there are a couple of options - the best choice would be the event which you've listed, sales_order_invoice_register.

Because the invoice model sets the _eventPrefix property to sales_order_invoice, you can observe sales_order_invoice_save_after.

Make sure that you are using the correct event configuration area: adminhtml vs frontend vs global.

benmarks
  • 23,384
  • 1
  • 62
  • 84